diff --git a/.gitignore b/.gitignore index f0e828aab1..00c76a3d41 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__/ CMakeLists.txt cmake-build-debug venv/ +.venv/ tags # Project-specific ignores @@ -19,12 +20,14 @@ tags *.sra *.bin *.elf +*.flash archive/ build/ baserom/ decomp/ asm/ data/ +extracted/ expected/ nonmatchings/ diff --git a/Jenkinsfile b/Jenkinsfile index acd0093f3a..52b9ae0a3f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,25 +22,18 @@ pipeline { } stage('Install Python dependencies') { steps { - echo 'Installing Python dependencies' - sh 'python3 -m venv .venv' - sh '''. .venv/bin/activate - python3 -m pip install -U -r requirements.txt - python3 -m pip install -U GitPython - ''' + sh 'bash -c "make -j venv"' } } stage('Copy ROM') { steps { echo 'Setting up ROM...' - sh 'cp /usr/local/etc/roms/mm.us.rev1.z64 baserom.mm.us.rev1.z64' + sh 'cp /usr/local/etc/roms/mm.us.rev1.z64 baseroms/n64-us/baserom.z64' } } stage('Setup') { steps { - sh '''. .venv/bin/activate - bash -c "make -j setup 2> >(tee tools/warnings_count/warnings_setup_new.txt)" - ''' + sh 'bash -c "make -j setup 2> >(tee tools/warnings_count/warnings_setup_new.txt)"' } } stage('Check setup warnings') { @@ -50,9 +43,7 @@ pipeline { } stage('Assets') { steps { - sh '''. .venv/bin/activate - bash -c "make -j assets 2> >(tee tools/warnings_count/warnings_assets_new.txt)" - ''' + sh 'bash -c "make -j assets 2> >(tee tools/warnings_count/warnings_assets_new.txt)"' } } stage('Check assets warnings') { @@ -62,9 +53,7 @@ pipeline { } stage('Disasm') { steps { - sh '''. .venv/bin/activate - bash -c "make -j disasm 2> >(tee tools/warnings_count/warnings_disasm_new.txt)" - ''' + sh 'bash -c "make -j disasm 2> >(tee tools/warnings_count/warnings_disasm_new.txt)"' } } stage('Check disasm warnings') { @@ -74,9 +63,7 @@ pipeline { } stage('Build') { steps { - sh '''. .venv/bin/activate - bash -c "make -j uncompressed 2> >(tee tools/warnings_count/warnings_build_new.txt)" - ''' + sh 'bash -c "make -j rom 2> >(tee tools/warnings_count/warnings_build_new.txt)"' } } stage('Check build warnings') { @@ -86,9 +73,7 @@ pipeline { } stage('Compress') { steps { - sh '''. .venv/bin/activate - bash -c "make -j compressed 2> >(tee tools/warnings_count/warnings_compress_new.txt)" - ''' + sh 'bash -c "make -j compress 2> >(tee tools/warnings_count/warnings_compress_new.txt)"' } } stage('Check compress warnings') { @@ -102,15 +87,9 @@ pipeline { } steps { sh 'mkdir reports' - sh '''. .venv/bin/activate - python3 ./tools/progress.py csv >> reports/progress-mm-nonmatching.csv - ''' - sh '''. .venv/bin/activate - python3 ./tools/progress.py csv -m >> reports/progress-mm-matching.csv - ''' - sh '''. .venv/bin/activate - python3 ./tools/progress.py shield-json > reports/progress-mm-shield.json - ''' + sh '.venv/bin/python3 ./tools/progress.py csv >> reports/progress-mm-nonmatching.csv' + sh '.venv/bin/python3 ./tools/progress.py csv -m >> reports/progress-mm-matching.csv' + sh '.venv/bin/python3 ./tools/progress.py shield-json > reports/progress-mm-shield.json' stash includes: 'reports/*', name: 'reports' } } diff --git a/Makefile b/Makefile index aacbfdf25d..113be97f90 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,35 @@ MAKEFLAGS += --no-builtin-rules +# Ensure the build fails if a piped command fails +SHELL = /bin/bash +.SHELLFLAGS = -o pipefail -c + +# OS Detection +ifeq ($(OS),Windows_NT) + DETECTED_OS = windows + MAKE = make + VENV_BIN_DIR = Scripts +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + DETECTED_OS = linux + MAKE = make + VENV_BIN_DIR = bin + endif + ifeq ($(UNAME_S),Darwin) + DETECTED_OS = macos + MAKE = gmake + VENV_BIN_DIR = bin + endif +endif + + #### Defaults #### +# Target game version. Currently only the following version is supported: +# n64-us N64 USA (default) +VERSION ?= n64-us # If COMPARE is 1, check the output md5sum after building COMPARE ?= 1 # If NON_MATCHING is 1, define the NON_MATCHING C flag when building @@ -29,15 +56,20 @@ ASM_PROC_FORCE ?= 0 N_THREADS ?= $(shell nproc) # MIPS toolchain prefix MIPS_BINUTILS_PREFIX ?= mips-linux-gnu- +# Python virtual environment +VENV ?= .venv # Python interpreter -PYTHON ?= python3 +PYTHON ?= $(VENV)/$(VENV_BIN_DIR)/python3 +# Emulator w/ flags +N64_EMULATOR ?= + #### Setup #### # Ensure the map file being created using English localization export LANG := C -ifeq ($(NON_MATCHING),1) +ifneq ($(NON_MATCHING),0) CFLAGS := -DNON_MATCHING CPPFLAGS := -DNON_MATCHING COMPARE := 0 @@ -48,25 +80,19 @@ ifneq ($(FULL_DISASM), 0) DISASM_FLAGS += --all endif -PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) +PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +BASEROM_DIR := baseroms/$(VERSION) +BUILD_DIR := build/$(VERSION) +EXTRACTED_DIR := extracted/$(VERSION) -MAKE = make CPPFLAGS += -P -ifeq ($(OS),Windows_NT) - DETECTED_OS=windows -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - DETECTED_OS=linux - endif - ifeq ($(UNAME_S),Darwin) - DETECTED_OS=macos - MAKE=gmake - CPPFLAGS += -xc++ - endif +ifeq ($(DETECTED_OS), macos) + CPPFLAGS += -xc++ endif + #### Tools #### ifneq ($(shell type $(MIPS_BINUTILS_PREFIX)ld >/dev/null 2>/dev/null; echo $$?), 0) $(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)) @@ -87,19 +113,20 @@ ifeq ($(ORIG_COMPILER),1) CC_OLD = $(QEMU_IRIX) -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc endif -AS := $(MIPS_BINUTILS_PREFIX)as -LD := $(MIPS_BINUTILS_PREFIX)ld -OBJCOPY := $(MIPS_BINUTILS_PREFIX)objcopy -OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump -ASM_PROC := $(PYTHON) tools/asm-processor/build.py +AS := $(MIPS_BINUTILS_PREFIX)as +LD := $(MIPS_BINUTILS_PREFIX)ld +NM := $(MIPS_BINUTILS_PREFIX)nm +OBJCOPY := $(MIPS_BINUTILS_PREFIX)objcopy +OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump +ASM_PROC := $(PYTHON) tools/asm-processor/build.py ASM_PROC_FLAGS := --input-enc=utf-8 --output-enc=euc-jp --convert-statics=global-with-filename ifneq ($(ASM_PROC_FORCE), 0) - ASM_PROC_FLAGS += --force + ASM_PROC_FLAGS += --force endif -IINC := -Iinclude -Isrc -Iassets -Ibuild -I. +IINC := -Iinclude -Isrc -Iassets -I$(BUILD_DIR) -I. ifeq ($(KEEP_MDEBUG),0) RM_MDEBUG = $(OBJCOPY) --remove-section .mdebug $@ @@ -125,11 +152,15 @@ ZAPD := tools/ZAPD/ZAPD.out FADO := tools/fado/fado.elf MAKEYAR := $(PYTHON) tools/buildtools/makeyar.py CHECKSUMMER := $(PYTHON) tools/buildtools/checksummer.py -SHIFTJIS_CONV := $(PYTHON) tools/shiftjis_conv.py +SHIFTJIS_CONV := $(PYTHON) tools/buildtools/shiftjis_conv.py SCHC := $(PYTHON) tools/buildtools/schc.py SCHC_FLAGS := +# Command to replace path variables in the spec file. We can't use the C +# preprocessor for this because it won't substitute inside string literals. +SPEC_REPLACE_VARS := sed -e 's|$$(BUILD_DIR)|$(BUILD_DIR)|g' + OPTFLAGS := -O2 -g3 ASFLAGS := -march=vr4300 -32 -Iinclude MIPS_VERSION := -mips2 @@ -156,23 +187,20 @@ else ifneq ($(RUN_CC_CHECK),0) CC_CHECK += -m32 endif -# rom compression flags -COMPFLAGS := --threads $(N_THREADS) -ifneq ($(NON_MATCHING),1) - COMPFLAGS += --matching -endif #### Files #### # ROM image -ROMC := mm.us.rev1.rom.z64 -ROM := $(ROMC:.rom.z64=.rom_uncompressed.z64) -ELF := $(ROM:.z64=.elf) +ROM := $(BUILD_DIR)/mm-$(VERSION).z64 +ROMC := $(ROM:.z64=-compressed.z64) +ELF := $(ROM:.z64=.elf) +MAP := $(ROM:.z64=.map) +LDSCRIPT := $(ROM:.z64=.ld) # description of ROM segments SPEC := spec # create asm directories -$(shell mkdir -p asm data) +$(shell mkdir -p asm data extracted) SRC_DIRS := $(shell find src -type d) ASM_DIRS := $(shell find asm -type d -not -path "asm/non_matchings*") $(shell find data -type d) @@ -183,117 +211,116 @@ ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*" -not -p ASSET_BIN_DIRS_C_FILES := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/code*" -not -path "assets/overlays*") ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin)) -ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f) +ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),$(BUILD_DIR)/$f) TEXTURE_FILES_PNG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.png)) TEXTURE_FILES_JPG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.jpg)) -TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \ - $(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \ +TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),$(BUILD_DIR)/$f) \ + $(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),$(BUILD_DIR)/$f) \ C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS_C_FILES),$(wildcard $(dir)/*.c)) -S_FILES := $(shell grep -F "build/asm" spec | sed 's/.*build\/// ; s/\.o\".*/.s/') \ - $(shell grep -F "build/data" spec | sed 's/.*build\/// ; s/\.o\".*/.s/') +S_FILES := $(shell grep -F "\$$(BUILD_DIR)/asm" spec | sed 's/.*$$(BUILD_DIR)\/// ; s/\.o\".*/.s/') \ + $(shell grep -F "\$$(BUILD_DIR)/data" spec | sed 's/.*$$(BUILD_DIR)\/// ; s/\.o\".*/.s/') SCHEDULE_FILES:= $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.schl)) -BASEROM_FILES := $(shell grep -F "build/baserom" spec | sed 's/.*build\/// ; s/\.o\".*//') -ARCHIVES_O := $(shell grep -F ".yar.o" spec | sed 's/.*include "// ; s/\.o\".*/.o/') -O_FILES := $(foreach f,$(S_FILES:.s=.o),build/$f) \ - $(foreach f,$(C_FILES:.c=.o),build/$f) \ - $(foreach f,$(BASEROM_FILES),build/$f.o) \ - $(ARCHIVES_O) +BASEROM_FILES := $(shell grep -F "\$$(BUILD_DIR)/baserom" spec | sed 's/.*$$(BUILD_DIR)\/// ; s/\.o\".*//') +ARCHIVES_O := $(shell grep -F ".yar.o" spec | sed 's/.*include "// ; s/.*$$(BUILD_DIR)\/// ; s/\.o\".*/.o/') +O_FILES := $(foreach f,$(S_FILES:.s=.o),$(BUILD_DIR)/$f) \ + $(foreach f,$(C_FILES:.c=.o),$(BUILD_DIR)/$f) \ + $(foreach f,$(BASEROM_FILES),$(BUILD_DIR)/$f.o) \ + $(foreach f,$(ARCHIVES_O),$(BUILD_DIR)/$f) SHIFTJIS_C_FILES := src/libultra/voice/voicecheckword.c src/audio/voice_external.c src/code/z_message.c src/code/z_message_nes.c -SHIFTJIS_O_FILES := $(foreach f,$(SHIFTJIS_C_FILES:.c=.o),build/$f) +SHIFTJIS_O_FILES := $(foreach f,$(SHIFTJIS_C_FILES:.c=.o),$(BUILD_DIR)/$f) -OVL_RELOC_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | grep -o '[^"]*_reloc.o' ) +OVL_RELOC_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | $(SPEC_REPLACE_VARS) | grep -o '[^"]*_reloc.o' ) -SCHEDULE_INC_FILES := $(foreach f,$(SCHEDULE_FILES:.schl=.schl.inc),build/$f) +SCHEDULE_INC_FILES := $(foreach f,$(SCHEDULE_FILES:.schl=.schl.inc),$(BUILD_DIR)/$f) # Automatic dependency files # (Only asm_processor dependencies and reloc dependencies are handled for now) DEP_FILES := $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d) # create build directories -$(shell mkdir -p build/baserom $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(ASSET_BIN_DIRS) $(ASSET_BIN_DIRS_C_FILES),build/$(dir))) +$(shell mkdir -p $(BUILD_DIR)/baserom $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(ASSET_BIN_DIRS) $(ASSET_BIN_DIRS_C_FILES),$(BUILD_DIR)/$(dir))) # directory flags -build/src/boot/O2/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/libultra/os/%.o: OPTFLAGS := -O1 +$(BUILD_DIR)/src/libultra/voice/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/libultra/io/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/libultra/libc/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/libultra/gu/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/libultra/rmon/%.o: OPTFLAGS := -O2 -build/src/boot/libc/%.o: OPTFLAGS := -O2 -build/src/boot/libm/%.o: OPTFLAGS := -O2 -build/src/boot/libc64/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/boot/O2/%.o: OPTFLAGS := -O2 -build/src/libultra/os/%.o: OPTFLAGS := -O1 -build/src/libultra/voice/%.o: OPTFLAGS := -O2 -build/src/libultra/io/%.o: OPTFLAGS := -O2 -build/src/libultra/libc/%.o: OPTFLAGS := -O2 -build/src/libultra/gu/%.o: OPTFLAGS := -O2 -build/src/libultra/rmon/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/boot/libc/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/boot/libm/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/boot/libc64/%.o: OPTFLAGS := -O2 -build/src/audio/%.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/audio/%.o: OPTFLAGS := -O2 -build/assets/%.o: OPTFLAGS := -O1 -build/assets/%.o: ASM_PROC_FLAGS := +$(BUILD_DIR)/assets/%.o: OPTFLAGS := -O1 +$(BUILD_DIR)/assets/%.o: ASM_PROC_FLAGS := # file flags -build/src/boot/fault.o: CFLAGS += -trapuv -build/src/boot/fault_drawer.o: CFLAGS += -trapuv +$(BUILD_DIR)/src/libultra/libc/ll.o: OPTFLAGS := -O1 +$(BUILD_DIR)/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 -32 +$(BUILD_DIR)/src/libultra/libc/llcvt.o: OPTFLAGS := -O1 +$(BUILD_DIR)/src/libultra/libc/llcvt.o: MIPS_VERSION := -mips3 -32 -build/src/code/jpegutils.o: OPTFLAGS := -O2 -build/src/code/jpegdecoder.o: OPTFLAGS := -O2 -build/src/code/jpegutils.o: CC := $(CC_OLD) -build/src/code/jpegdecoder.o: CC := $(CC_OLD) +$(BUILD_DIR)/src/boot/fault.o: CFLAGS += -trapuv +$(BUILD_DIR)/src/boot/fault_drawer.o: CFLAGS += -trapuv -build/src/code/osFlash.o: OPTFLAGS := -g -build/src/code/osFlash.o: MIPS_VERSION := -mips1 -build/src/code/osFlash.o: CC := $(CC_OLD) +$(BUILD_DIR)/src/code/jpegdecoder.o: CC := $(CC_OLD) +$(BUILD_DIR)/src/code/jpegdecoder.o: OPTFLAGS := -O2 +$(BUILD_DIR)/src/code/jpegutils.o: CC := $(CC_OLD) +$(BUILD_DIR)/src/code/jpegutils.o: OPTFLAGS := -O2 -build/src/libultra/libc/ll.o: OPTFLAGS := -O1 -build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 -32 -build/src/libultra/libc/llcvt.o: OPTFLAGS := -O1 -build/src/libultra/libc/llcvt.o: MIPS_VERSION := -mips3 -32 +$(BUILD_DIR)/src/code/osFlash.o: CC := $(CC_OLD) +$(BUILD_DIR)/src/code/osFlash.o: OPTFLAGS := -g +$(BUILD_DIR)/src/code/osFlash.o: MIPS_VERSION := -mips1 # cc & asm-processor -build/src/boot/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- -build/src/boot/O2/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- +$(BUILD_DIR)/src/libultra/%.o: CC := $(CC_OLD) -build/src/libultra/%.o: CC := $(CC_OLD) +$(BUILD_DIR)/src/boot/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- +$(BUILD_DIR)/src/boot/O2/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- -build/src/code/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- -build/src/audio/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- +$(BUILD_DIR)/src/code/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- +$(BUILD_DIR)/src/audio/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- -build/src/overlays/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- +$(BUILD_DIR)/src/overlays/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- + +$(BUILD_DIR)/assets/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- -build/assets/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) -- $(SHIFTJIS_O_FILES): CC_CHECK += -Wno-multichar -Wno-type-limits -Wno-overflow #### Main Targets ### -uncompressed: $(ROM) -ifeq ($(COMPARE),1) +rom: $(ROM) +ifneq ($(COMPARE),0) @md5sum $(ROM) - @md5sum -c checksum_uncompressed.md5 + @md5sum -c $(BASEROM_DIR)/checksum.md5 endif -compressed: $(ROMC) -ifeq ($(COMPARE),1) +compress: $(ROMC) +ifneq ($(COMPARE),0) @md5sum $(ROMC) - @md5sum -c checksum.md5 + @md5sum -c $(BASEROM_DIR)/checksum-compressed.md5 endif -.PHONY: all uncompressed compressed clean assetclean distclean assets disasm init setup -.DEFAULT_GOAL := uncompressed -all: uncompressed compressed $(ROM): $(ELF) $(OBJCOPY) --gap-fill=0x00 -O binary $< $@ $(CHECKSUMMER) $@ -$(ROMC): $(ROM) - $(PYTHON) tools/z64compress_wrapper.py $(COMPFLAGS) $(ROM) $@ $(ELF) build/$(SPEC) +$(ROMC): $(ROM) $(ELF) $(BUILD_DIR)/compress_ranges.txt + $(PYTHON) tools/buildtools/compress.py --in $(ROM) --out $@ --dma-start `tools/buildtools/dmadata_start.sh $(NM) $(ELF)` --compress `cat $(BUILD_DIR)/compress_ranges.txt` --threads $(N_THREADS) + $(PYTHON) -m ipl3checksum sum --cic 6105 --update $@ -$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) build/ldscript.txt build/undefined_syms.txt - $(LD) -T build/undefined_syms.txt -T build/ldscript.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map build/mm.map -o $@ +$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) $(LDSCRIPT) $(BUILD_DIR)/undefined_syms.txt + $(LD) -T $(LDSCRIPT) -T $(BUILD_DIR)/undefined_syms.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map $(MAP) -o $@ ## Order-only prerequisites # These ensure e.g. the O_FILES are built before the OVL_RELOC_FILES. @@ -310,127 +337,144 @@ $(O_FILES): | schedule_inc_files .PHONY: o_files asset_files schedule_inc_files + #### Main commands #### ## Cleaning ## clean: - $(RM) -rf $(ROMC) $(ROM) $(ELF) build + $(RM) -r $(BUILD_DIR) assetclean: - $(RM) -rf $(ASSET_BIN_DIRS) - $(RM) -rf assets/text/*.h - $(RM) -rf build/assets - $(RM) -rf .extracted-assets.json + $(RM) -r $(ASSET_BIN_DIRS) + $(RM) -r $(BUILD_DIR)/assets + $(RM) -r assets/text/*.h + $(RM) -r .extracted-assets.json distclean: assetclean clean - $(RM) -rf asm baserom data + $(RM) -r asm data extracted $(MAKE) -C tools clean +venv: + test -d $(VENV) || python3 -m venv $(VENV) + $(PYTHON) -m pip install -U pip + $(PYTHON) -m pip install -U -r requirements.txt + ## Extraction step setup: $(MAKE) -C tools - $(PYTHON) tools/fixbaserom.py - $(PYTHON) tools/extract_baserom.py - $(PYTHON) tools/decompress_yars.py + $(PYTHON) tools/buildtools/decompress_baserom.py $(VERSION) + $(PYTHON) tools/buildtools/extract_baserom.py $(BASEROM_DIR)/baserom-decompressed.z64 -o $(EXTRACTED_DIR)/baserom --dmadata-start `cat $(BASEROM_DIR)/dmadata_start.txt` --dmadata-names $(BASEROM_DIR)/dmadata_names.txt + $(PYTHON) tools/buildtools/extract_yars.py $(VERSION) assets: $(PYTHON) extract_assets.py -j $(N_THREADS) -Z Wno-hardcoded-pointer ## Assembly generation disasm: - $(RM) -rf asm data + $(RM) -r asm data $(PYTHON) tools/disasm/disasm.py -j $(N_THREADS) $(DISASM_FLAGS) -diff-init: uncompressed - $(RM) -rf expected/ +diff-init: rom + $(RM) -r expected/ mkdir -p expected/ cp -r build expected/build -init: - $(MAKE) distclean +init: distclean + $(MAKE) venv $(MAKE) setup $(MAKE) assets $(MAKE) disasm $(MAKE) all $(MAKE) diff-init +run: $(ROM) +ifeq ($(N64_EMULATOR),) + $(error Emulator path not set. Set N64_EMULATOR in the Makefile, .make_options, or define it as an environment variable) +endif + $(N64_EMULATOR) $< + +.PHONY: all rom compress clean assetclean distclean assets disasm init venv setup run +.DEFAULT_GOAL := rom +all: rom compress + + #### Various Recipes #### -build/undefined_syms.txt: undefined_syms.txt - $(CPP) $(CPPFLAGS) $< > build/undefined_syms.txt +$(BUILD_DIR)/undefined_syms.txt: undefined_syms.txt + $(CPP) $(CPPFLAGS) $< > $(BUILD_DIR)/undefined_syms.txt -build/$(SPEC): $(SPEC) - $(CPP) $(CPPFLAGS) $< > $@ +$(BUILD_DIR)/$(SPEC): $(SPEC) + $(CPP) $(CPPFLAGS) $< | $(SPEC_REPLACE_VARS) > $@ -build/ldscript.txt: build/$(SPEC) +$(LDSCRIPT): $(BUILD_DIR)/$(SPEC) $(MKLDSCRIPT) $< $@ -build/dmadata_table_spec.h: build/$(SPEC) - $(MKDMADATA) $< $@ +$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/$(SPEC) + $(MKDMADATA) $< $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt # Dependencies for files that may include the dmadata header automatically generated from the spec file -build/src/boot/z_std_dma.o: build/dmadata_table_spec.h -build/src/dmadata/dmadata.o: build/dmadata_table_spec.h +$(BUILD_DIR)/src/boot/z_std_dma.o: $(BUILD_DIR)/dmadata_table_spec.h +$(BUILD_DIR)/src/dmadata/dmadata.o: $(BUILD_DIR)/dmadata_table_spec.h -build/asm/%.o: asm/%.s +$(BUILD_DIR)/asm/%.o: asm/%.s $(AS) $(ASFLAGS) $< -o $@ -build/assets/%.o: assets/%.c +$(BUILD_DIR)/assets/%.o: assets/%.c $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< $(OBJCOPY_BIN) $(RM_MDEBUG) -build/%.yar.o: build/%.o +$(BUILD_DIR)/%.yar.o: $(BUILD_DIR)/%.o $(MAKEYAR) $< $(@:.yar.o=.yar.bin) $(@:.yar.o=.symbols.o) $(OBJCOPY) -I binary -O elf32-big $(@:.yar.o=.yar.bin) $@ -build/baserom/%.o: baserom/% +$(BUILD_DIR)/baserom/%.o: $(EXTRACTED_DIR)/baserom/% $(OBJCOPY) -I binary -O elf32-big $< $@ -build/data/%.o: data/%.s +$(BUILD_DIR)/data/%.o: data/%.s $(AS) $(ASFLAGS) $< -o $@ -build/assets/text/message_data.enc.h: assets/text/message_data.h +$(BUILD_DIR)/assets/text/message_data.enc.h: assets/text/message_data.h python3 tools/msg/nes/msgencNES.py -o $@ $< -build/assets/text/staff_message_data.enc.h: assets/text/staff_message_data.h +$(BUILD_DIR)/assets/text/staff_message_data.enc.h: assets/text/staff_message_data.h python3 tools/msg/staff/msgencStaff.py -o $@ $< -build/assets/text/message_data_static.o: build/assets/text/message_data.enc.h -build/assets/text/staff_message_data_static.o: build/assets/text/staff_message_data.enc.h -build/src/code/z_message.o: build/assets/text/message_data.enc.h build/assets/text/staff_message_data.enc.h +$(BUILD_DIR)/assets/text/message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.h +$(BUILD_DIR)/assets/text/staff_message_data_static.o: $(BUILD_DIR)/assets/text/staff_message_data.enc.h +$(BUILD_DIR)/src/code/z_message.o: $(BUILD_DIR)/assets/text/message_data.enc.h $(BUILD_DIR)/assets/text/staff_message_data.enc.h -build/src/overlays/%.o: src/overlays/%.c - $(CC_CHECK) $< - $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< - @$(OBJDUMP) -d $@ > $(@:.o=.s) - $(RM_MDEBUG) - -build/src/overlays/%_reloc.o: build/$(SPEC) - $(FADO) $$(tools/buildtools/reloc_prereq $< $(notdir $*)) -n $(notdir $*) -o $(@:.o=.s) -M $(@:.o=.d) - $(AS) $(ASFLAGS) $(@:.o=.s) -o $@ - -build/src/%.o: src/%.c - $(CC_CHECK) $< - $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< - $(OBJDUMP_CMD) - $(RM_MDEBUG) - -$(SHIFTJIS_O_FILES): build/src/%.o: src/%.c +$(SHIFTJIS_O_FILES): $(BUILD_DIR)/src/%.o: src/%.c $(SHIFTJIS_CONV) -o $(@:.o=.enc.c) $< $(CC_CHECK) $(@:.o=.enc.c) $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $(@:.o=.enc.c) $(OBJDUMP_CMD) $(RM_MDEBUG) -build/src/libultra/libc/ll.o: src/libultra/libc/ll.c +$(BUILD_DIR)/src/overlays/%.o: src/overlays/%.c + $(CC_CHECK) $< + $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< + $(OBJDUMP_CMD) + $(RM_MDEBUG) + +$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/$(SPEC) + $(FADO) $$(tools/buildtools/reloc_prereq $< $(notdir $*)) -n $(notdir $*) -o $(@:.o=.s) -M $(@:.o=.d) + $(AS) $(ASFLAGS) $(@:.o=.s) -o $@ + +$(BUILD_DIR)/src/%.o: src/%.c + $(CC_CHECK) $< + $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< + $(OBJDUMP_CMD) + $(RM_MDEBUG) + +$(BUILD_DIR)/src/libultra/libc/ll.o: src/libultra/libc/ll.c $(CC_CHECK) $< $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< $(PYTHON) tools/set_o32abi_bit.py $@ $(OBJDUMP_CMD) $(RM_MDEBUG) -build/src/libultra/libc/llcvt.o: src/libultra/libc/llcvt.c +$(BUILD_DIR)/src/libultra/libc/llcvt.o: src/libultra/libc/llcvt.c $(CC_CHECK) $< $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $< $(PYTHON) tools/set_o32abi_bit.py $@ @@ -439,16 +483,16 @@ build/src/libultra/libc/llcvt.o: src/libultra/libc/llcvt.c # Build C files from assets -build/%.inc.c: %.png +$(BUILD_DIR)/%.inc.c: %.png $(ZAPD) btex -eh -tt $(subst .,,$(suffix $*)) -i $< -o $@ -build/assets/%.bin.inc.c: assets/%.bin +$(BUILD_DIR)/assets/%.bin.inc.c: assets/%.bin $(ZAPD) bblb -eh -i $< -o $@ -build/assets/%.jpg.inc.c: assets/%.jpg +$(BUILD_DIR)/assets/%.jpg.inc.c: assets/%.jpg $(ZAPD) bren -eh -i $< -o $@ -build/%.schl.inc: %.schl +$(BUILD_DIR)/%.schl.inc: %.schl $(SCHC) $(SCHC_FLAGS) -o $@ $< -include $(DEP_FILES) diff --git a/README.md b/README.md index d5f2255fdb..5cbe474d2f 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,10 @@ This is a WIP **decompilation** of ***The Legend of Zelda: Majora's Mask***. The The only version currently supported is N64 US, but we intend to eventually support every retail version of the original game (i.e. not versions of MM3D, which is a totally different game). -It currently builds the following ROM: +It currently builds the following ROM and compressed ROM: -* mm.us.rev1.rom.z64 `md5: 2a0a8acb61538235bc1094d297fb6556` +* mm-n64-us.z64 `md5: f46493eaa0628827dbd6ad3ecd8d65d6` +* mm-n64-us-compressed.z64 `md5: 2a0a8acb61538235bc1094d297fb6556` **This repo does not include any assets or assembly code necessary for compiling the ROM. A prior copy of the game is required to extract the required assets.** @@ -66,15 +67,15 @@ The build process has the following package requirements: * build-essential * binutils-mips-linux-gnu * python3 -* pip3 -* libpng-dev +* python3-pip * python3-venv +* libpng-dev Under Debian / Ubuntu (which we recommend using), you can install them with the following commands: ```bash sudo apt update -sudo apt install make git build-essential binutils-mips-linux-gnu python3 python3-pip libpng-dev python3-venv +sudo apt install make git build-essential binutils-mips-linux-gnu python3 python3-pip python3-venv libpng-dev ``` #### 2. Clone the repository @@ -91,36 +92,13 @@ This will copy the GitHub repository contents into a new folder in the current d cd mm ``` -#### 3. Install python dependencies +#### 3. Prepare a base ROM -The build process has a few python packages required that are located in `requirements.txt`. +Place a copy of the US ROM inside the `baseroms/n64-us/` folder. -It is recommend to setup a virtual environment for python to localize all dependencies. To create a virtual environment: +Rename the file to `baserom.z64`, `baserom.n64` or `baserom.v64`, depending on the original extension. -```bash -python3 -m venv .mm-env -``` - -To activate or deactivate the virtual environment run either: -```bash -# Activates the mm-env virtual environment -source .mm-env/bin/activate -# Deactivates the active virtual environment -deactivate -``` - -Once activated you can install the required dependencies: -```bash -pip install -r requirements.txt # or python3 -m pip if you want -``` - -**Important:** This virtual environment will need to be activated everytime you enter the repo. - -#### 4. Prepare a base ROM - -Copy your ROM to inside the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.mm.us.rev1.z64` - -#### 5. Make and Build the ROM +#### 4. Make and Build the ROM To start the extraction/build process, run the following command: @@ -128,18 +106,43 @@ To start the extraction/build process, run the following command: make init ``` -This will extract all the individual files in the ROM into a newly created baserom folder, as well as decompress the compressed files in a newly created decomp folder. This will create the build folders as well as a new folder with the ASM as well as containing the disassemblies of nearly all the files containing code. +The extraction/build process: +1. Prepares build environment: + - Creates a Python virtual environment + - Downloads necessary tools from pip + - Compiles tools for the build process +2. Extracts ROM contents: + - Decompresses the ROM + - Extracts individual files + - Extracts archive files +3. Extracts assets: + - Extracts assets based on the XML files found in `assets/xml` +4. Disassembles code: + - Disassembles code-containing files + - Disassembles data (data, rodata, and bss) +5. Builds the ROM: + - Compiles the code and assets into a new ROM + - Generates a compressed version of the ROM -This make target will also build the ROM. If all goes well, a new ROM called "mm.us.rev1.rom.z64" should be built and the following text should be printed: +If all goes well, the new ROM should be built at `build/n64-us/mm-n64-us.z64`, a compressed version generated at `build/n64-us/mm-n64-us-compressed.z64`, and the following text printed: ```bash -mm.us.rev1.rom.z64: OK +build/n64-us/mm-n64-us.z64: OK +``` +and +```bash +build/n64-us/mm-n64-us-compressed.z64: OK ``` If you instead see the following: ```bash -mm.us.rev1.rom.z64: FAILED +build/n64-us/mm-n64-us.z64: FAILED +md5sum: WARNING: 1 computed checksum did NOT match +``` +or +```bash +build/n64-us/mm-n64-us-compressed.z64: FAILED md5sum: WARNING: 1 computed checksum did NOT match ``` diff --git a/baseroms/n64-us/checksum-compressed.md5 b/baseroms/n64-us/checksum-compressed.md5 new file mode 100644 index 0000000000..8b6646f832 --- /dev/null +++ b/baseroms/n64-us/checksum-compressed.md5 @@ -0,0 +1 @@ +2a0a8acb61538235bc1094d297fb6556 build/n64-us/mm-n64-us-compressed.z64 diff --git a/baseroms/n64-us/checksum.md5 b/baseroms/n64-us/checksum.md5 new file mode 100644 index 0000000000..6733c85f2d --- /dev/null +++ b/baseroms/n64-us/checksum.md5 @@ -0,0 +1 @@ +f46493eaa0628827dbd6ad3ecd8d65d6 build/n64-us/mm-n64-us.z64 diff --git a/baseroms/n64-us/dmadata_names.txt b/baseroms/n64-us/dmadata_names.txt new file mode 100644 index 0000000000..fe58146644 --- /dev/null +++ b/baseroms/n64-us/dmadata_names.txt @@ -0,0 +1,1552 @@ +makerom +boot +dmadata +Audiobank +Audioseq +Audiotable +kanji +link_animetion +icon_item_static_syms +icon_item_24_static_syms +icon_item_field_static +icon_item_dungeon_static +icon_item_gameover_static +icon_item_jpn_static +icon_item_vtx_static +map_i_static +map_grand_static +item_name_static +map_name_static +icon_item_static_yar +icon_item_24_static_yar +schedule_dma_static_syms +schedule_dma_static_yar +schedule_static +story_static +do_action_static +message_static +message_texture_static +nes_font_static +message_data_static +staff_message_data_static +code +ovl_title +ovl_select +ovl_opening +ovl_file_choose +ovl_daytelop +ovl_kaleido_scope +ovl_player_actor +ovl_En_Test +ovl_En_GirlA +ovl_En_Part +ovl_En_Light +ovl_En_Door +ovl_En_Box +ovl_En_Pametfrog +ovl_En_Okuta +ovl_En_Bom +ovl_En_Wallmas +ovl_En_Dodongo +ovl_En_Firefly +ovl_En_Horse +ovl_En_Arrow +ovl_En_Elf +ovl_En_Niw +ovl_En_Tite +ovl_En_Peehat +ovl_En_Holl +ovl_En_Dinofos +ovl_En_Hata +ovl_En_Zl1 +ovl_En_Viewer +ovl_En_Bubble +ovl_Door_Shutter +ovl_En_Boom +ovl_En_Torch2 +ovl_En_Minifrog +ovl_En_St +ovl_Obj_Wturn +ovl_En_River_Sound +ovl_En_Ossan +ovl_En_Famos +ovl_En_Bombf +ovl_En_Am +ovl_En_Dekubaba +ovl_En_M_Fire1 +ovl_En_M_Thunder +ovl_Bg_Breakwall +ovl_Door_Warp1 +ovl_Obj_Syokudai +ovl_Item_B_Heart +ovl_En_Dekunuts +ovl_En_Bbfall +ovl_Arms_Hook +ovl_En_Bb +ovl_Bg_Keikoku_Spr +ovl_En_Wood02 +ovl_En_Death +ovl_En_Minideath +ovl_En_Vm +ovl_Demo_Effect +ovl_Demo_Kankyo +ovl_En_Floormas +ovl_En_Rd +ovl_Bg_F40_Flift +ovl_Obj_Mure +ovl_En_Sw +ovl_Object_Kankyo +ovl_En_Horse_Link_Child +ovl_Door_Ana +ovl_En_Encount1 +ovl_Demo_Tre_Lgt +ovl_En_Encount2 +ovl_En_Fire_Rock +ovl_Bg_Ctower_Rot +ovl_Mir_Ray +ovl_En_Sb +ovl_En_Bigslime +ovl_En_Karebaba +ovl_En_In +ovl_En_Bom_Chu +ovl_En_Horse_Game_Check +ovl_En_Rr +ovl_En_Fr +ovl_En_Fishing +ovl_Obj_Oshihiki +ovl_Eff_Dust +ovl_Bg_Umajump +ovl_En_Insect +ovl_En_Butte +ovl_En_Fish +ovl_Item_Etcetera +ovl_Arrow_Fire +ovl_Arrow_Ice +ovl_Arrow_Light +ovl_Obj_Kibako +ovl_Obj_Tsubo +ovl_En_Ik +ovl_Demo_Shd +ovl_En_Dns +ovl_Elf_Msg +ovl_En_Honotrap +ovl_En_Tubo_Trap +ovl_Obj_Ice_Poly +ovl_En_Fz +ovl_En_Kusa +ovl_Obj_Bean +ovl_Obj_Bombiwa +ovl_Obj_Switch +ovl_Obj_Lift +ovl_Obj_Hsblock +ovl_En_Okarina_Tag +ovl_En_Goroiwa +ovl_En_Daiku +ovl_En_Nwc +ovl_Item_Inbox +ovl_En_Ge1 +ovl_Obj_Blockstop +ovl_En_Sda +ovl_En_Clear_Tag +ovl_En_Gm +ovl_En_Ms +ovl_En_Hs +ovl_Bg_Ingate +ovl_En_Kanban +ovl_En_Attack_Niw +ovl_En_Mk +ovl_En_Owl +ovl_En_Ishi +ovl_Obj_Hana +ovl_Obj_Lightswitch +ovl_Obj_Mure2 +ovl_En_Fu +ovl_En_Stream +ovl_En_Mm +ovl_En_Weather_Tag +ovl_En_Ani +ovl_En_Js +ovl_En_Okarina_Effect +ovl_En_Mag +ovl_Elf_Msg2 +ovl_Bg_F40_Swlift +ovl_En_Kakasi +ovl_Obj_Makeoshihiki +ovl_Oceff_Spot +ovl_En_Torch +ovl_Shot_Sun +ovl_Obj_Roomtimer +ovl_En_Ssh +ovl_Oceff_Wipe +ovl_Effect_Ss_Dust +ovl_Effect_Ss_Kirakira +ovl_Effect_Ss_Bomb2 +ovl_Effect_Ss_Blast +ovl_Effect_Ss_G_Spk +ovl_Effect_Ss_D_Fire +ovl_Effect_Ss_Bubble +ovl_Effect_Ss_G_Ripple +ovl_Effect_Ss_G_Splash +ovl_Effect_Ss_G_Fire +ovl_Effect_Ss_Lightning +ovl_Effect_Ss_Dt_Bubble +ovl_Effect_Ss_Hahen +ovl_Effect_Ss_Stick +ovl_Effect_Ss_Sibuki +ovl_Effect_Ss_Stone1 +ovl_Effect_Ss_Hitmark +ovl_Effect_Ss_Fhg_Flash +ovl_Effect_Ss_K_Fire +ovl_Effect_Ss_Solder_Srch_Ball +ovl_Effect_Ss_Kakera +ovl_Effect_Ss_Ice_Piece +ovl_Effect_Ss_En_Ice +ovl_Effect_Ss_Fire_Tail +ovl_Effect_Ss_En_Fire +ovl_Effect_Ss_Extra +ovl_Effect_Ss_Dead_Db +ovl_Effect_Ss_Dead_Dd +ovl_Effect_Ss_Dead_Ds +ovl_Oceff_Storm +ovl_Obj_Demo +ovl_En_Minislime +ovl_En_Nutsball +ovl_Oceff_Wipe2 +ovl_Oceff_Wipe3 +ovl_En_Dg +ovl_En_Si +ovl_Obj_Comb +ovl_Obj_Kibako2 +ovl_En_Hs2 +ovl_Obj_Mure3 +ovl_En_Tg +ovl_En_Wf +ovl_En_Skb +ovl_En_Gs +ovl_Obj_Sound +ovl_En_Crow +ovl_En_Cow +ovl_Oceff_Wipe4 +ovl_En_Zo +ovl_Effect_Ss_Ice_Smoke +ovl_Obj_Makekinsuta +ovl_En_Ge3 +ovl_Obj_Hamishi +ovl_En_Zl4 +ovl_En_Mm2 +ovl_Door_Spiral +ovl_Obj_Pzlblock +ovl_Obj_Toge +ovl_Obj_Armos +ovl_Obj_Boyo +ovl_En_Grasshopper +ovl_Obj_Grass +ovl_Obj_Grass_Carry +ovl_Obj_Grass_Unit +ovl_Bg_Fire_Wall +ovl_En_Bu +ovl_En_Encount3 +ovl_En_Jso +ovl_Obj_Chikuwa +ovl_En_Knight +ovl_En_Warp_tag +ovl_En_Aob_01 +ovl_En_Boj_01 +ovl_En_Boj_02 +ovl_En_Boj_03 +ovl_En_Encount4 +ovl_En_Bom_Bowl_Man +ovl_En_Syateki_Man +ovl_Bg_Icicle +ovl_En_Syateki_Crow +ovl_En_Boj_04 +ovl_En_Cne_01 +ovl_En_Bba_01 +ovl_En_Bji_01 +ovl_Bg_Spdweb +ovl_En_Mt_tag +ovl_Boss_01 +ovl_Boss_02 +ovl_Boss_03 +ovl_Boss_04 +ovl_Boss_05 +ovl_Boss_06 +ovl_Boss_07 +ovl_Bg_Dy_Yoseizo +ovl_En_Boj_05 +ovl_En_Sob1 +ovl_En_Go +ovl_En_Raf +ovl_Obj_Funen +ovl_Obj_Raillift +ovl_Bg_Numa_Hana +ovl_Obj_Flowerpot +ovl_Obj_Spinyroll +ovl_Dm_Hina +ovl_En_Syateki_Wf +ovl_Obj_Skateblock +ovl_Effect_En_Ice_Block +ovl_Obj_Iceblock +ovl_En_Bigpamet +ovl_Bg_Dblue_Movebg +ovl_En_Syateki_Dekunuts +ovl_Elf_Msg3 +ovl_En_Fg +ovl_Dm_Ravine +ovl_Dm_Sa +ovl_En_Slime +ovl_En_Pr +ovl_Obj_Toudai +ovl_Obj_Entotu +ovl_Obj_Bell +ovl_En_Syateki_Okuta +ovl_Obj_Shutter +ovl_Dm_Zl +ovl_En_Ru +ovl_En_Elfgrp +ovl_Dm_Tsg +ovl_En_Baguo +ovl_Obj_Vspinyroll +ovl_Obj_Smork +ovl_En_Test2 +ovl_En_Test3 +ovl_En_Test4 +ovl_En_Bat +ovl_En_Sekihi +ovl_En_Wiz +ovl_En_Wiz_Brock +ovl_En_Wiz_Fire +ovl_Eff_Change +ovl_Dm_Statue +ovl_Obj_Fireshield +ovl_Bg_Ladder +ovl_En_Mkk +ovl_Demo_Getitem +ovl_En_Dnb +ovl_En_Dnh +ovl_En_Dnk +ovl_En_Dnq +ovl_Bg_Keikoku_Saku +ovl_Obj_Hugebombiwa +ovl_En_Firefly2 +ovl_En_Rat +ovl_En_Water_Effect +ovl_En_Kusa2 +ovl_Bg_Spout_Fire +ovl_En_Dy_Extra +ovl_En_Bal +ovl_En_Ginko_Man +ovl_En_Warp_Uzu +ovl_Obj_Driftice +ovl_En_Look_Nuts +ovl_En_Mushi2 +ovl_En_Fall +ovl_En_Mm3 +ovl_Bg_Crace_Movebg +ovl_En_Dno +ovl_En_Pr2 +ovl_En_Prz +ovl_En_Jso2 +ovl_Obj_Etcetera +ovl_En_Egol +ovl_Obj_Mine +ovl_Obj_Purify +ovl_En_Tru +ovl_En_Trt +ovl_En_Test5 +ovl_En_Test6 +ovl_En_Az +ovl_En_Estone +ovl_Bg_Hakugin_Post +ovl_Dm_Opstage +ovl_Dm_Stk +ovl_Dm_Char00 +ovl_Dm_Char01 +ovl_Dm_Char02 +ovl_Dm_Char03 +ovl_Dm_Char04 +ovl_Dm_Char05 +ovl_Dm_Char06 +ovl_Dm_Char07 +ovl_Dm_Char08 +ovl_Dm_Char09 +ovl_Obj_Tokeidai +ovl_En_Mnk +ovl_En_Egblock +ovl_En_Guard_Nuts +ovl_Bg_Hakugin_Bombwall +ovl_Obj_Tokei_Tobira +ovl_Bg_Hakugin_Elvpole +ovl_En_Ma4 +ovl_En_Twig +ovl_En_Po_Fusen +ovl_En_Door_Etc +ovl_En_Bigokuta +ovl_Bg_Icefloe +ovl_fbdemo_triforce +ovl_fbdemo_wipe1 +ovl_fbdemo_wipe3 +ovl_fbdemo_wipe4 +ovl_fbdemo_wipe5 +ovl_Effect_Ss_Sbn +ovl_Obj_Ocarinalift +ovl_En_Time_Tag +ovl_Bg_Open_Shutter +ovl_Bg_Open_Spot +ovl_Bg_Fu_Kaiten +ovl_Obj_Aqua +ovl_En_Elforg +ovl_En_Elfbub +ovl_En_Fu_Mato +ovl_En_Fu_Kago +ovl_En_Osn +ovl_Bg_Ctower_Gear +ovl_En_Trt2 +ovl_Obj_Tokei_Step +ovl_Bg_Lotus +ovl_En_Kame +ovl_Obj_Takaraya_Wall +ovl_Bg_Fu_Mizu +ovl_En_Sellnuts +ovl_Bg_Dkjail_Ivy +ovl_Obj_Visiblock +ovl_En_Takaraya +ovl_En_Tsn +ovl_En_Ds2n +ovl_En_Fsn +ovl_En_Shn +ovl_En_Stop_heishi +ovl_Obj_Bigicicle +ovl_En_Lift_Nuts +ovl_En_Tk +ovl_Bg_Market_Step +ovl_Obj_Lupygamelift +ovl_En_Test7 +ovl_Obj_Lightblock +ovl_Mir_Ray2 +ovl_En_Wdhand +ovl_En_Gamelupy +ovl_Bg_Danpei_Movebg +ovl_En_Snowwd +ovl_En_Pm +ovl_En_Gakufu +ovl_Elf_Msg4 +ovl_Elf_Msg5 +ovl_En_Col_Man +ovl_En_Talk_Gibud +ovl_En_Giant +ovl_Obj_Snowball +ovl_Boss_Hakugin +ovl_En_Gb2 +ovl_En_Onpuman +ovl_Bg_Tobira01 +ovl_En_Tag_Obj +ovl_Obj_Dhouse +ovl_Obj_Hakaisi +ovl_Bg_Hakugin_Switch +ovl_En_Snowman +ovl_TG_Sw +ovl_En_Po_Sisters +ovl_En_Pp +ovl_En_Hakurock +ovl_En_Hanabi +ovl_Obj_Dowsing +ovl_Obj_Wind +ovl_En_Racedog +ovl_En_Kendo_Js +ovl_Bg_Botihasira +ovl_En_Fish2 +ovl_En_Pst +ovl_En_Poh +ovl_Obj_Spidertent +ovl_En_Zoraegg +ovl_En_Kbt +ovl_En_Gg +ovl_En_Maruta +ovl_Obj_Snowball2 +ovl_En_Gg2 +ovl_Obj_Ghaka +ovl_En_Dnp +ovl_En_Dai +ovl_Bg_Goron_Oyu +ovl_En_Kgy +ovl_En_Invadepoh +ovl_En_Gk +ovl_En_An +ovl_En_Bee +ovl_En_Ot +ovl_En_Dragon +ovl_Obj_Dora +ovl_En_Bigpo +ovl_Obj_Kendo_Kanban +ovl_Obj_Hariko +ovl_En_Sth +ovl_Bg_Sinkai_Kabe +ovl_Bg_Haka_Curtain +ovl_Bg_Kin2_Bombwall +ovl_Bg_Kin2_Fence +ovl_Bg_Kin2_Picture +ovl_Bg_Kin2_Shelf +ovl_En_Rail_Skb +ovl_En_Jg +ovl_En_Tru_Mt +ovl_Obj_Um +ovl_En_Neo_Reeba +ovl_Bg_Mbar_Chair +ovl_Bg_Ikana_Block +ovl_Bg_Ikana_Mirror +ovl_Bg_Ikana_Rotaryroom +ovl_Bg_Dblue_Balance +ovl_Bg_Dblue_Waterfall +ovl_En_Kaizoku +ovl_En_Ge2 +ovl_En_Ma_Yts +ovl_En_Ma_Yto +ovl_Obj_Tokei_Turret +ovl_Bg_Dblue_Elevator +ovl_Obj_Warpstone +ovl_En_Zog +ovl_Obj_Rotlift +ovl_Obj_Jg_Gakki +ovl_Bg_Inibs_Movebg +ovl_En_Zot +ovl_Obj_Tree +ovl_Obj_Y2lift +ovl_Obj_Y2shutter +ovl_Obj_Boat +ovl_Obj_Taru +ovl_Obj_Hunsui +ovl_En_Jc_Mato +ovl_Mir_Ray3 +ovl_En_Zob +ovl_Elf_Msg6 +ovl_Obj_Nozoki +ovl_En_Toto +ovl_En_Railgibud +ovl_En_Baba +ovl_En_Suttari +ovl_En_Zod +ovl_En_Kujiya +ovl_En_Geg +ovl_Obj_Kinoko +ovl_Obj_Yasi +ovl_En_Tanron1 +ovl_En_Tanron2 +ovl_En_Tanron3 +ovl_Obj_Chan +ovl_En_Zos +ovl_En_S_Goro +ovl_En_Nb +ovl_En_Ja +ovl_Bg_F40_Block +ovl_Bg_F40_Switch +ovl_En_Po_Composer +ovl_En_Guruguru +ovl_Oceff_Wipe5 +ovl_En_Stone_heishi +ovl_Oceff_Wipe6 +ovl_En_Scopenuts +ovl_En_Scopecrow +ovl_Oceff_Wipe7 +ovl_Eff_Kamejima_Wave +ovl_En_Hg +ovl_En_Hgo +ovl_En_Zov +ovl_En_Ah +ovl_Obj_Hgdoor +ovl_Bg_Ikana_Bombwall +ovl_Bg_Ikana_Ray +ovl_Bg_Ikana_Shutter +ovl_Bg_Haka_Bombwall +ovl_Bg_Haka_Tomb +ovl_En_Sc_Ruppe +ovl_Bg_Iknv_Doukutu +ovl_Bg_Iknv_Obj +ovl_En_Pamera +ovl_Obj_HsStump +ovl_En_Hidden_Nuts +ovl_En_Zow +ovl_En_Talk +ovl_En_Al +ovl_En_Tab +ovl_En_Nimotsu +ovl_En_Hit_Tag +ovl_En_Ruppecrow +ovl_En_Tanron4 +ovl_En_Tanron5 +ovl_En_Tanron6 +ovl_En_Daiku2 +ovl_En_Muto +ovl_En_Baisen +ovl_En_Heishi +ovl_En_Demo_heishi +ovl_En_Dt +ovl_En_Cha +ovl_Obj_Dinner +ovl_Eff_Lastday +ovl_Bg_Ikana_Dharma +ovl_En_Akindonuts +ovl_Eff_Stk +ovl_En_Ig +ovl_En_Rg +ovl_En_Osk +ovl_En_Sth2 +ovl_En_Yb +ovl_En_Rz +ovl_En_Scopecoin +ovl_En_Bjt +ovl_En_Bomjima +ovl_En_Bomjimb +ovl_En_Bombers +ovl_En_Bombers2 +ovl_En_Bombal +ovl_Obj_Moon_Stone +ovl_Obj_Mu_Pict +ovl_Bg_Ikninside +ovl_Eff_Zoraband +ovl_Obj_Kepn_Koya +ovl_Obj_Usiyane +ovl_En_Nnh +ovl_Obj_Kzsaku +ovl_Obj_Milk_Bin +ovl_En_Kitan +ovl_Bg_Astr_Bombwall +ovl_Bg_Iknin_Susceil +ovl_En_Bsb +ovl_En_Recepgirl +ovl_En_Thiefbird +ovl_En_Jgame_Tsn +ovl_Obj_Jgame_Light +ovl_Obj_Yado +ovl_Demo_Syoten +ovl_Demo_Moonend +ovl_Bg_Lbfshot +ovl_Bg_Last_Bwall +ovl_En_And +ovl_En_Invadepoh_Demo +ovl_Obj_Danpeilift +ovl_En_Fall2 +ovl_Dm_Al +ovl_Dm_An +ovl_Dm_Ah +ovl_Dm_Nb +ovl_En_Drs +ovl_En_Ending_Hero +ovl_Dm_Bal +ovl_En_Paper +ovl_En_Hint_Skb +ovl_Dm_Tag +ovl_En_Bh +ovl_En_Ending_Hero2 +ovl_En_Ending_Hero3 +ovl_En_Ending_Hero4 +ovl_En_Ending_Hero5 +ovl_En_Ending_Hero6 +ovl_Dm_Gm +ovl_Obj_Swprize +ovl_En_Invisible_Ruppe +ovl_Obj_Ending +ovl_En_Rsn +gameplay_keep +gameplay_field_keep +gameplay_dangeon_keep +gameplay_object_exchange_static +object_link_boy +object_link_child +object_link_goron +object_link_zora +object_link_nuts +object_mask_ki_tan +object_mask_rabit +object_mask_skj +object_mask_truth +object_mask_gibudo +object_mask_json +object_mask_kerfay +object_mask_bigelf +object_mask_kyojin +object_mask_romerny +object_mask_posthat +object_mask_zacho +object_mask_stone +object_mask_bree +object_mask_gero +object_mask_yofukasi +object_mask_meoto +object_mask_dancer +object_mask_bakuretu +object_mask_bu_san +object_mask_goron +object_mask_zora +object_mask_nuts +object_mask_boy +object_box +object_okuta +object_wallmaster +object_dy_obj +object_firefly +object_dodongo +object_niw +object_tite +object_ph +object_dinofos +object_zl1 +object_bubble +object_test3 +object_famos +object_st +object_thiefbird +object_bombf +object_am +object_dekubaba +object_warp1 +object_b_heart +object_dekunuts +object_bb +object_death +object_hata +object_wood02 +object_trap +object_vm +object_efc_star_field +object_rd +object_yukimura_obj +object_horse_link_child +object_syokudai +object_efc_tw +object_gi_key +object_mir_ray +object_ctower_rot +object_bdoor +object_sb +object_gi_melody +object_gi_heart +object_gi_compass +object_gi_bosskey +object_gi_nuts +object_gi_hearts +object_gi_arrowcase +object_gi_bombpouch +object_in +object_os_anime +object_gi_bottle +object_gi_stick +object_gi_map +object_oF1d_map +object_ru2 +object_gi_magicpot +object_gi_bomb_1 +object_ma2 +object_gi_purse +object_rr +object_gi_arrow +object_gi_bomb_2 +object_gi_shield_2 +object_gi_hookshot +object_gi_ocarina +object_gi_milk +object_ma1 +object_ny +object_fr +object_gi_bow +object_gi_glasses +object_gi_liquid +object_ani +object_gi_shield_3 +object_gi_bean +object_gi_fish +object_gi_longsword +object_zo +object_umajump +object_mastergolon +object_masterzoora +object_aob +object_ik +object_ahg +object_cne +object_bji +object_bba +object_an1 +object_boj +object_fz +object_bob +object_ge1 +object_yabusame_point +object_d_hsblock +object_d_lift +object_mamenoki +object_goroiwa +object_toryo +object_daiku +object_nwc +object_gm +object_ms +object_hs +object_lightswitch +object_kusa +object_tsubo +object_kanban +object_owl +object_mk +object_fu +object_gi_ki_tan_mask +object_gi_mask18 +object_gi_rabit_mask +object_gi_truth_mask +object_stream +object_mm +object_js +object_cs +object_gi_soldout +object_mag +object_gi_golonmask +object_gi_zoramask +object_ka +object_zg +object_gi_m_arrow +object_ds2 +object_fish +object_gi_sutaru +object_ssh +object_bigslime +object_bg +object_bombiwa +object_hintnuts +object_rsn +object_gla +object_geldb +object_dog +object_kibako2 +object_dns +object_dnk +object_gi_insect +object_gi_ghost +object_gi_soul +object_f40_obj +object_gi_rupy +object_po_composer +object_mu +object_wf +object_skb +object_gs +object_ps +object_omoya_obj +object_crow +object_cow +object_gi_sword_1 +object_zl4 +object_grasshopper +object_boyo +object_fwall +object_jso +object_knight +object_icicle +object_spdweb +object_boss01 +object_boss02 +object_boss03 +object_boss04 +object_boss05 +object_boss07 +object_raf +object_funen +object_raillift +object_numa_obj +object_flowerpot +object_spinyroll +object_ice_block +object_keikoku_demo +object_slime +object_pr +object_f52_obj +object_f53_obj +object_kibako +object_sek +object_gmo +object_bat +object_sekihil +object_sekihig +object_sekihin +object_sekihiz +object_wiz +object_ladder +object_mkk +object_keikoku_obj +object_sichitai_obj +object_dekucity_ana_obj +object_rat +object_water_effect +object_dblue_object +object_bal +object_warp_uzu +object_driftice +object_fall +object_hanareyama_obj +object_crace_object +object_dno +object_obj_tokeidai +object_eg +object_tru +object_trt +object_hakugin_obj +object_horse_game_check +object_stk +object_mnk +object_gi_bottle_red +object_tokei_tobira +object_az +object_twig +object_dekucity_obj +object_po_fusen +object_racetsubo +object_ha +object_bigokuta +object_open_obj +object_fu_kaiten +object_fu_mato +object_mtoride +object_osn +object_tokei_step +object_lotus +object_tl +object_dkjail_obj +object_visiblock +object_tsn +object_ds2n +object_fsn +object_shn +object_bigicicle +object_gi_bottle_15 +object_tk +object_market_obj +object_gi_reserve00 +object_gi_reserve01 +object_lightblock +object_takaraya_objects +object_wdhand +object_sdn +object_snowwd +object_giant +object_comb +object_hana +object_boss_hakugin +object_meganeana_obj +object_gi_nutsmask +object_stk2 +object_spot11_obj +object_danpei_object +object_dhouse +object_hakaisi +object_po +object_snowman +object_po_sisters +object_pp +object_goronswitch +object_delf +object_botihasira +object_gi_bigbomb +object_pst +object_bsmask +object_spidertent +object_zoraegg +object_kbt +object_gg +object_maruta +object_ghaka +object_oyu +object_dnq +object_dai +object_kgy +object_fb +object_taisou +object_gk +object_haka_obj +object_dnt +object_yukiyama +object_icefloe +object_gi_gold_dust +object_gi_bottle_16 +object_gi_bottle_22 +object_bee +object_ot +object_utubo +object_dora +object_gi_loach +object_gi_seahorse +object_bigpo +object_hariko +object_dnj +object_sinkai_kabe +object_kin2_obj +object_ishi +object_hakugin_demo +object_jg +object_gi_sword_2 +object_gi_sword_3 +object_gi_sword_4 +object_um +object_rb +object_mbar_obj +object_ikana_obj +object_kz +object_tokei_turret +object_zog +object_rotlift +object_posthouse_obj +object_gi_mask09 +object_gi_mask14 +object_gi_mask15 +object_inibs_object +object_tree +object_kaizoku_obj +object_gi_reserve_b_00 +object_gi_reserve_c_00 +object_zob +object_milkbar +object_dmask +object_gi_reserve_c_01 +object_zod +object_kumo30 +object_obj_yasi +object_tanron1 +object_tanron2 +object_tanron3 +object_gi_magicmushroom +object_obj_chan +object_gi_mask10 +object_zos +object_an2 +object_an3 +object_f40_switch +object_lodmoon +object_tro +object_gi_mask12 +object_gi_mask23 +object_gi_bottle_21 +object_gi_camera +object_kamejima +object_nb +object_harfgibud +object_zov +object_ah +object_hgdoor +object_dor01 +object_dor02 +object_dor03 +object_dor04 +object_last_obj +object_redead_obj +object_ikninside_obj +object_iknv_obj +object_pamera +object_hsstump +object_zm +object_al +object_tab +object_secom_obj +object_dt +object_gi_mask03 +object_cha +object_obj_dinner +object_gi_reserve_b_01 +object_lastday +object_bai +object_ikn_demo +object_gi_fieldmap +object_big_fwall +object_hunsui +object_uch +object_tanron4 +object_tanron5 +object_in2 +object_yb +object_rz +object_bjt +object_taru +object_moonston +object_gi_schedule +object_gi_stonemask +object_zoraband +object_kepn_koya +object_obj_usiyane +object_gi_mask05 +object_gi_mask11 +object_gi_mask20 +object_nnh +object_kzsaku +object_obj_milk_bin +object_random_obj +object_kujiya +object_kitan +object_gi_mask06 +object_gi_mask16 +object_astr_obj +object_bsb +object_fall2 +object_sth +object_gi_mssa +object_smtower +object_gi_mask21 +object_yado_obj +object_syoten +object_moonend +object_ob +object_gi_bottle_04 +object_and +object_obj_danpeilift +object_drs +object_msmo +object_an4 +object_wdor01 +object_wdor02 +object_wdor03 +object_wdor04 +object_wdor05 +object_stk3 +object_kinsta1_obj +object_kinsta2_obj +object_bh +object_gi_mask17 +object_gi_mask22 +object_lbfshot +object_fusen +object_ending_obj +object_gi_mask13 +scene_texture_01 +scene_texture_02 +scene_texture_03 +scene_texture_04 +scene_texture_05 +scene_texture_06 +scene_texture_07 +scene_texture_08 +nintendo_rogo_static +title_static +memerrmsg +locerrmsg +parameter_static +week_static +daytelop_static +ger_daytelop_static +fra_daytelop_static +esp_daytelop_static +d2_fine_static +d2_cloud_static +d2_fine_pal_static +elf_message_field +elf_message_ydan +Z2_20SICHITAI2 +Z2_20SICHITAI2_room_00 +Z2_20SICHITAI2_room_01 +Z2_20SICHITAI2_room_02 +Z2_WITCH_SHOP +Z2_WITCH_SHOP_room_00 +Z2_LAST_BS +Z2_LAST_BS_room_00 +Z2_HAKASHITA +Z2_HAKASHITA_room_00 +Z2_HAKASHITA_room_01 +Z2_HAKASHITA_room_02 +Z2_HAKASHITA_room_03 +Z2_HAKASHITA_room_04 +Z2_AYASHIISHOP +Z2_AYASHIISHOP_room_00 +Z2_AYASHIISHOP_room_01 +Z2_OMOYA +Z2_OMOYA_room_00 +Z2_OMOYA_room_01 +Z2_OMOYA_room_02 +Z2_BOWLING +Z2_BOWLING_room_00 +Z2_SONCHONOIE +Z2_SONCHONOIE_room_00 +Z2_SONCHONOIE_room_01 +Z2_SONCHONOIE_room_02 +Z2_SONCHONOIE_room_03 +Z2_IKANA +Z2_IKANA_room_00 +Z2_IKANA_room_01 +Z2_IKANA_room_02 +Z2_IKANA_room_03 +Z2_IKANA_room_04 +Z2_KAIZOKU +Z2_KAIZOKU_room_00 +Z2_MILK_BAR +Z2_MILK_BAR_room_00 +Z2_INISIE_N +Z2_INISIE_N_room_00 +Z2_INISIE_N_room_01 +Z2_INISIE_N_room_02 +Z2_INISIE_N_room_03 +Z2_INISIE_N_room_04 +Z2_INISIE_N_room_05 +Z2_INISIE_N_room_06 +Z2_INISIE_N_room_07 +Z2_INISIE_N_room_08 +Z2_INISIE_N_room_09 +Z2_INISIE_N_room_10 +Z2_INISIE_N_room_11 +Z2_TAKARAYA +Z2_TAKARAYA_room_00 +Z2_INISIE_R +Z2_INISIE_R_room_00 +Z2_INISIE_R_room_01 +Z2_INISIE_R_room_02 +Z2_INISIE_R_room_03 +Z2_INISIE_R_room_04 +Z2_INISIE_R_room_05 +Z2_INISIE_R_room_06 +Z2_INISIE_R_room_07 +Z2_INISIE_R_room_08 +Z2_INISIE_R_room_09 +Z2_INISIE_R_room_10 +Z2_INISIE_R_room_11 +Z2_OKUJOU +Z2_OKUJOU_room_00 +Z2_OPENINGDAN +Z2_OPENINGDAN_room_00 +Z2_OPENINGDAN_room_01 +Z2_MITURIN +Z2_MITURIN_room_00 +Z2_MITURIN_room_01 +Z2_MITURIN_room_02 +Z2_MITURIN_room_03 +Z2_MITURIN_room_04 +Z2_MITURIN_room_05 +Z2_MITURIN_room_06 +Z2_MITURIN_room_07 +Z2_MITURIN_room_08 +Z2_MITURIN_room_09 +Z2_MITURIN_room_10 +Z2_MITURIN_room_11 +Z2_MITURIN_room_12 +Z2_13HUBUKINOMITI +Z2_13HUBUKINOMITI_room_00 +Z2_CASTLE +Z2_CASTLE_room_00 +Z2_CASTLE_room_01 +Z2_CASTLE_room_02 +Z2_CASTLE_room_03 +Z2_CASTLE_room_04 +Z2_CASTLE_room_05 +Z2_CASTLE_room_06 +Z2_CASTLE_room_07 +Z2_CASTLE_room_08 +Z2_CASTLE_room_09 +Z2_DEKUTES +Z2_DEKUTES_room_00 +Z2_MITURIN_BS +Z2_MITURIN_BS_room_00 +Z2_SYATEKI_MIZU +Z2_SYATEKI_MIZU_room_00 +Z2_HAKUGIN +Z2_HAKUGIN_room_00 +Z2_HAKUGIN_room_01 +Z2_HAKUGIN_room_02 +Z2_HAKUGIN_room_03 +Z2_HAKUGIN_room_04 +Z2_HAKUGIN_room_05 +Z2_HAKUGIN_room_06 +Z2_HAKUGIN_room_07 +Z2_HAKUGIN_room_08 +Z2_HAKUGIN_room_09 +Z2_HAKUGIN_room_10 +Z2_HAKUGIN_room_11 +Z2_HAKUGIN_room_12 +Z2_HAKUGIN_room_13 +Z2_ROMANYMAE +Z2_ROMANYMAE_room_00 +Z2_PIRATE +Z2_PIRATE_room_00 +Z2_PIRATE_room_01 +Z2_PIRATE_room_02 +Z2_PIRATE_room_03 +Z2_PIRATE_room_04 +Z2_PIRATE_room_05 +Z2_PIRATE_room_06 +Z2_PIRATE_room_07 +Z2_PIRATE_room_08 +Z2_PIRATE_room_09 +Z2_PIRATE_room_10 +Z2_PIRATE_room_11 +Z2_PIRATE_room_12 +Z2_PIRATE_room_13 +Z2_PIRATE_room_14 +Z2_SYATEKI_MORI +Z2_SYATEKI_MORI_room_00 +Z2_SINKAI +Z2_SINKAI_room_00 +Z2_YOUSEI_IZUMI +Z2_YOUSEI_IZUMI_room_00 +Z2_YOUSEI_IZUMI_room_01 +Z2_YOUSEI_IZUMI_room_02 +Z2_YOUSEI_IZUMI_room_03 +Z2_YOUSEI_IZUMI_room_04 +Z2_KINSTA1 +Z2_KINSTA1_room_00 +Z2_KINSTA1_room_01 +Z2_KINSTA1_room_02 +Z2_KINSTA1_room_03 +Z2_KINSTA1_room_04 +Z2_KINSTA1_room_05 +Z2_KINDAN2 +Z2_KINDAN2_room_00 +Z2_KINDAN2_room_01 +Z2_KINDAN2_room_02 +Z2_KINDAN2_room_03 +Z2_KINDAN2_room_04 +Z2_KINDAN2_room_05 +Z2_TENMON_DAI +Z2_TENMON_DAI_room_00 +Z2_TENMON_DAI_room_01 +Z2_LAST_DEKU +Z2_LAST_DEKU_room_00 +Z2_LAST_DEKU_room_01 +Z2_22DEKUCITY +Z2_22DEKUCITY_room_00 +Z2_22DEKUCITY_room_01 +Z2_22DEKUCITY_room_02 +Z2_KAJIYA +Z2_KAJIYA_room_00 +Z2_00KEIKOKU +Z2_00KEIKOKU_room_00 +Z2_POSTHOUSE +Z2_POSTHOUSE_room_00 +Z2_LABO +Z2_LABO_room_00 +Z2_DANPEI2TEST +Z2_DANPEI2TEST_room_00 +Z2_DANPEI2TEST_room_01 +Z2_16GORON_HOUSE +Z2_16GORON_HOUSE_room_00 +Z2_16GORON_HOUSE_room_01 +Z2_33ZORACITY +Z2_33ZORACITY_room_00 +Z2_8ITEMSHOP +Z2_8ITEMSHOP_room_00 +Z2_F01 +Z2_F01_room_00 +Z2_INISIE_BS +Z2_INISIE_BS_room_00 +Z2_30GYOSON +Z2_30GYOSON_room_00 +Z2_31MISAKI +Z2_31MISAKI_room_00 +Z2_TAKARAKUJI +Z2_TAKARAKUJI_room_00 +Z2_TORIDE +Z2_TORIDE_room_00 +Z2_FISHERMAN +Z2_FISHERMAN_room_00 +Z2_GORONSHOP +Z2_GORONSHOP_room_00 +Z2_DEKU_KING +Z2_DEKU_KING_room_00 +Z2_LAST_GORON +Z2_LAST_GORON_room_00 +Z2_LAST_GORON_room_01 +Z2_24KEMONOMITI +Z2_24KEMONOMITI_room_00 +Z2_F01_B +Z2_F01_B_room_00 +Z2_F01C +Z2_F01C_room_00 +Z2_BOTI +Z2_BOTI_room_00 +Z2_BOTI_room_01 +Z2_HAKUGIN_BS +Z2_HAKUGIN_BS_room_00 +Z2_20SICHITAI +Z2_20SICHITAI_room_00 +Z2_20SICHITAI_room_01 +Z2_20SICHITAI_room_02 +Z2_21MITURINMAE +Z2_21MITURINMAE_room_00 +Z2_LAST_ZORA +Z2_LAST_ZORA_room_00 +Z2_11GORONNOSATO2 +Z2_11GORONNOSATO2_room_00 +Z2_11GORONNOSATO2_room_01 +Z2_SEA +Z2_SEA_room_00 +Z2_SEA_room_01 +Z2_SEA_room_02 +Z2_SEA_room_03 +Z2_SEA_room_04 +Z2_SEA_room_05 +Z2_SEA_room_06 +Z2_SEA_room_07 +Z2_SEA_room_08 +Z2_SEA_room_09 +Z2_SEA_room_10 +Z2_SEA_room_11 +Z2_SEA_room_12 +Z2_SEA_room_13 +Z2_SEA_room_14 +Z2_SEA_room_15 +Z2_35TAKI +Z2_35TAKI_room_00 +Z2_REDEAD +Z2_REDEAD_room_00 +Z2_REDEAD_room_01 +Z2_REDEAD_room_02 +Z2_REDEAD_room_03 +Z2_REDEAD_room_04 +Z2_REDEAD_room_05 +Z2_REDEAD_room_06 +Z2_REDEAD_room_07 +Z2_REDEAD_room_08 +Z2_REDEAD_room_09 +Z2_REDEAD_room_10 +Z2_REDEAD_room_11 +Z2_REDEAD_room_12 +Z2_REDEAD_room_13 +Z2_BANDROOM +Z2_BANDROOM_room_00 +Z2_BANDROOM_room_01 +Z2_BANDROOM_room_02 +Z2_BANDROOM_room_03 +Z2_BANDROOM_room_04 +Z2_11GORONNOSATO +Z2_11GORONNOSATO_room_00 +Z2_11GORONNOSATO_room_01 +Z2_GORON_HAKA +Z2_GORON_HAKA_room_00 +Z2_SECOM +Z2_SECOM_room_00 +Z2_SECOM_room_01 +Z2_10YUKIYAMANOMURA +Z2_10YUKIYAMANOMURA_room_00 +Z2_TOUGITES +Z2_TOUGITES_room_00 +Z2_DANPEI +Z2_DANPEI_room_00 +Z2_DANPEI_room_01 +Z2_DANPEI_room_02 +Z2_DANPEI_room_03 +Z2_DANPEI_room_04 +Z2_DANPEI_room_05 +Z2_DANPEI_room_06 +Z2_DANPEI_room_07 +Z2_DANPEI_room_08 +Z2_IKANAMAE +Z2_IKANAMAE_room_00 +Z2_DOUJOU +Z2_DOUJOU_room_00 +Z2_MUSICHOUSE +Z2_MUSICHOUSE_room_00 +Z2_IKNINSIDE +Z2_IKNINSIDE_room_00 +Z2_IKNINSIDE_room_01 +Z2_MAP_SHOP +Z2_MAP_SHOP_room_00 +Z2_F40 +Z2_F40_room_00 +Z2_F41 +Z2_F41_room_00 +Z2_10YUKIYAMANOMURA2 +Z2_10YUKIYAMANOMURA2_room_00 +Z2_10YUKIYAMANOMURA2_room_01 +Z2_14YUKIDAMANOMITI +Z2_14YUKIDAMANOMITI_room_00 +Z2_12HAKUGINMAE +Z2_12HAKUGINMAE_room_00 +Z2_17SETUGEN +Z2_17SETUGEN_room_00 +Z2_17SETUGEN2 +Z2_17SETUGEN2_room_00 +Z2_SEA_BS +Z2_SEA_BS_room_00 +Z2_RANDOM +Z2_RANDOM_room_00 +Z2_RANDOM_room_01 +Z2_RANDOM_room_02 +Z2_RANDOM_room_03 +Z2_RANDOM_room_04 +Z2_RANDOM_room_05 +Z2_YADOYA +Z2_YADOYA_room_00 +Z2_YADOYA_room_01 +Z2_YADOYA_room_02 +Z2_YADOYA_room_03 +Z2_YADOYA_room_04 +Z2_KONPEKI_ENT +Z2_KONPEKI_ENT_room_00 +Z2_INSIDETOWER +Z2_INSIDETOWER_room_00 +Z2_INSIDETOWER_room_01 +Z2_26SARUNOMORI +Z2_26SARUNOMORI_room_00 +Z2_26SARUNOMORI_room_01 +Z2_26SARUNOMORI_room_02 +Z2_26SARUNOMORI_room_03 +Z2_26SARUNOMORI_room_04 +Z2_26SARUNOMORI_room_05 +Z2_26SARUNOMORI_room_06 +Z2_26SARUNOMORI_room_07 +Z2_26SARUNOMORI_room_08 +Z2_LOST_WOODS +Z2_LOST_WOODS_room_00 +Z2_LOST_WOODS_room_01 +Z2_LOST_WOODS_room_02 +Z2_LAST_LINK +Z2_LAST_LINK_room_00 +Z2_LAST_LINK_room_01 +Z2_LAST_LINK_room_02 +Z2_LAST_LINK_room_03 +Z2_LAST_LINK_room_04 +Z2_LAST_LINK_room_05 +Z2_LAST_LINK_room_06 +Z2_LAST_LINK_room_07 +Z2_SOUGEN +Z2_SOUGEN_room_00 +Z2_BOMYA +Z2_BOMYA_room_00 +Z2_KYOJINNOMA +Z2_KYOJINNOMA_room_00 +Z2_KOEPONARACE +Z2_KOEPONARACE_room_00 +Z2_GORONRACE +Z2_GORONRACE_room_00 +Z2_TOWN +Z2_TOWN_room_00 +Z2_ICHIBA +Z2_ICHIBA_room_00 +Z2_BACKTOWN +Z2_BACKTOWN_room_00 +Z2_CLOCKTOWER +Z2_CLOCKTOWER_room_00 +Z2_ALLEY +Z2_ALLEY_room_00 +SPOT00 +SPOT00_room_00 +KAKUSIANA +KAKUSIANA_room_00 +KAKUSIANA_room_01 +KAKUSIANA_room_02 +KAKUSIANA_room_03 +KAKUSIANA_room_04 +KAKUSIANA_room_05 +KAKUSIANA_room_06 +KAKUSIANA_room_07 +KAKUSIANA_room_08 +KAKUSIANA_room_09 +KAKUSIANA_room_10 +KAKUSIANA_room_11 +KAKUSIANA_room_12 +KAKUSIANA_room_13 +KAKUSIANA_room_14 +bump_texture_static +anime_model_1_static +anime_model_2_static +anime_model_3_static +anime_model_4_static +anime_model_5_static +anime_model_6_static +anime_texture_1_static +anime_texture_2_static +anime_texture_3_static +anime_texture_4_static +anime_texture_5_static +anime_texture_6_static +softsprite_matrix_static diff --git a/baseroms/n64-us/dmadata_start.txt b/baseroms/n64-us/dmadata_start.txt new file mode 100644 index 0000000000..ab6cc1902e --- /dev/null +++ b/baseroms/n64-us/dmadata_start.txt @@ -0,0 +1 @@ +0x1A500 diff --git a/checksum.md5 b/checksum.md5 deleted file mode 100644 index f748fd8e7b..0000000000 --- a/checksum.md5 +++ /dev/null @@ -1 +0,0 @@ -2a0a8acb61538235bc1094d297fb6556 mm.us.rev1.rom.z64 diff --git a/checksum_uncompressed.md5 b/checksum_uncompressed.md5 deleted file mode 100644 index b1248c6dcd..0000000000 --- a/checksum_uncompressed.md5 +++ /dev/null @@ -1 +0,0 @@ -F46493EAA0628827DBD6AD3ECD8D65D6 mm.us.rev1.rom_uncompressed.z64 diff --git a/diff_settings.py b/diff_settings.py index 4eeb4989c1..e0da720b1f 100644 --- a/diff_settings.py +++ b/diff_settings.py @@ -1,9 +1,9 @@ #!/usr/bin/env python3 def apply(config, args): - config['baseimg'] = 'baserom_uncompressed.z64' - config['myimg'] = 'mm.us.rev1.rom_uncompressed.z64' - config['mapfile'] = 'build/mm.map' + config['baseimg'] = 'baseroms/n64-us/baserom-decompressed.z64' + config['myimg'] = 'build/n64-us/mm-n64-us.z64' + config['mapfile'] = 'build/n64-us/mm-n64-us.map' config['source_directories'] = ['./src','./include'] config['objdump_flags'] = ['-M','reg-names=32'] config['makeflags'] = ['KEEP_MDEBUG=1'] diff --git a/docs/schedule_scripting_language.md b/docs/schedule_scripting_language.md index 872eac06a0..1c92d7fe8a 100644 --- a/docs/schedule_scripting_language.md +++ b/docs/schedule_scripting_language.md @@ -279,7 +279,7 @@ static ScheduleScript D_80BD3DB0[] = { In the actor's C code: ```c -#include "build/src/overlays/actors/ovl_En_Ah/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Ah/scheduleScripts.schl.inc" ``` ## Commands diff --git a/docs/tools.md b/docs/tools.md index c307382f9e..9ec4953139 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -42,6 +42,22 @@ There are a variety of tools that are used to assist in the decompilation process. This guide is an introduction to some of the tools that are used. Most of these tools are located in the `mm/tools` directory, others are either in the project root, or are separate programs entirely. Almost all of these programs have more information available via running them with `-h`. +**Important:** Many tools require activating a Python virtual environment that contains Python dependencies. This virtual environment is automatically installed into the `.venv` directory by `make setup`, but you need to **activate** it in your current terminal session in order to run Python tools. To start using the virtual environment in your current terminal run: + +```bash +source .venv/bin/activate +``` + +Keep in mind that for each new terminal session, you will need to activate the Python virtual environment again. That is, run the above `source .venv/bin/activate` command. + +To deactivate the virtual environment, run + +```bash +deactivate +``` + +and your terminal session state will be restored to what it was before. + ## In the repository ### `diff.py` @@ -56,7 +72,7 @@ To use `diff.py`, you need a copy of a matching build folder to diff against. In ./diff.py ObjTree_Init ``` -`diff.py` reads the respective `mm.map` files to find the function. If the function has been renamed, it will not be able to find it. You should not edit map files yourself, but instead rerun `make diff-init` (it is possible to copy the build folder manually, but it's better not to, since `make diff-init` guarantees an OK `expected` folder). +`diff.py` reads the respective `mm-n64-us.map` file to find the function. If the function has been renamed, it will not be able to find it. You should not edit map files yourself, but instead rerun `make diff-init` (it is possible to copy the build folder manually, but it's better not to, since `make diff-init` guarantees an OK `expected` folder). The recommended flags used are `-mwo`, `-mwo3`, or `-mwob`: @@ -102,7 +118,7 @@ Can be given a symbol (function or variable name, for example), and will find it ```bash $ ./sym_info.py ObjTree_Init -Symbol ObjTree_Init (RAM: 0x80B9A0B0, ROM: 0xFFF210, build/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.o) +Symbol ObjTree_Init (RAM: 0x80B9A0B0, ROM: 0xFFF210, build/n64-us/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.o) ``` ### `extract_assets.py` diff --git a/docs/tutorial/data.md b/docs/tutorial/data.md index 2c3f1d2e22..ad3fdda711 100644 --- a/docs/tutorial/data.md +++ b/docs/tutorial/data.md @@ -78,9 +78,9 @@ First, we tell the compiler to ignore the original data file. To do this, open t beginseg name "ovl_En_Recepgirl" compress - include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" - include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o" - include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" + include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o" + include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o" endseg ``` @@ -90,9 +90,9 @@ We will eventually remove both of the bottom two lines and replace them with our beginseg name "ovl_En_Recepgirl" compress - include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" - //include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o" - include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" + //include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o" + include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o" endseg ``` @@ -131,7 +131,7 @@ The game has a convenient system that allows it to sometimes effectively use off There is an obvious problem here, which is that is that these symbols have to be defined *somewhere*, or the linker will complain (indeed, if we change the ones in the array to `D_...`, even if we extern them, we get ``` -mips-linux-gnu-ld: build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o:(.data+0x20): undefined reference to `D_0600F8F0' +mips-linux-gnu-ld: build/n64-us/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o:(.data+0x20): undefined reference to `D_0600F8F0' ``` As we'd expect, of course: we didn't fulfil our promise that they were defined elsewhere.) diff --git a/docs/tutorial/merging.md b/docs/tutorial/merging.md index 88664494db..68c2571cf7 100644 --- a/docs/tutorial/merging.md +++ b/docs/tutorial/merging.md @@ -12,9 +12,9 @@ Specifically, to use the automatically generated reloc, rather than the original ``` beginseg name "ovl_En_Recepgirl" - include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" - //include "build/data/overlays/actors/ovl_En_Recepgirl.data.o" - include "build/data/overlays/actors/ovl_En_Recepgirl.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" + //include "$(BUILD_DIR)/data/overlays/actors/ovl_En_Recepgirl.data.o" + include "$(BUILD_DIR)/data/overlays/actors/ovl_En_Recepgirl.reloc.o" endseg ``` @@ -23,8 +23,8 @@ and change to use our reloc: ``` beginseg name "ovl_En_Recepgirl" - include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" - include "build/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o" endseg ``` @@ -51,11 +51,11 @@ in the C file. Also, due to the way `GLOBAL_ASM` works, we also cannot use gener beginseg name "ovl_En_Recepgirl" compress - include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" #ifdef NON_MATCHING - include "build/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o" #else - include "build/data/overlays/actors/ovl_En_Recepgirl.reloc.o" + include "$(BUILD_DIR)/data/overlays/actors/ovl_En_Recepgirl.reloc.o" #endif endseg ``` diff --git a/docs/tutorial/vscode.md b/docs/tutorial/vscode.md index 288bf0e480..936a64d031 100644 --- a/docs/tutorial/vscode.md +++ b/docs/tutorial/vscode.md @@ -39,18 +39,18 @@ You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configur { "configurations": [ { - "name": "Linux", + "name": "n64-us", "compilerPath": "${default}", // Needs to not be "" for -m32 to work "compilerArgs": [ "-m32" // Removes integer truncation warnings with gbi macros ], "intelliSenseMode": "${default}", // Shouldn't matter "includePath": [ // Matches makefile's includes - "${workspaceFolder}/**", + "include", "src", "assets", - "build", - "include" + "build/n64-us/", + "${workspaceFolder}", ], "defines": [ "_LANGUAGE_C" // For gbi.h @@ -72,10 +72,11 @@ Add the following to (or create) the `.vscode/settings.json` file for VSCode to "search.useIgnoreFiles": false, "search.exclude": { "**/.git": true, - "baserom/**": true, + "baseroms/**": true, "build/**": true, "expected/**": true, "nonmatchings/**": true, + ".venv/**": true }, } ``` diff --git a/extract_assets.py b/extract_assets.py index 3ac78ae942..394d8dd79e 100755 --- a/extract_assets.py +++ b/extract_assets.py @@ -27,7 +27,7 @@ def ExtractFile(xmlPath, outputPath, outputSourcePath): generateSourceFile = "0" break - execStr = f"tools/ZAPD/ZAPD.out e -eh -i {xmlPath} -b baserom/ -o {outputPath} -osf {outputSourcePath} -gsf {generateSourceFile} -rconf tools/ZAPDConfigs/MM/Config.xml {ZAPDArgs}" + execStr = f"tools/ZAPD/ZAPD.out e -eh -i {xmlPath} -b extracted/n64-us/baserom -o {outputPath} -osf {outputSourcePath} -gsf {generateSourceFile} -rconf tools/ZAPDConfigs/MM/Config.xml {ZAPDArgs}" if globalUnaccounted: execStr += " -Wunaccounted" diff --git a/first_diff.py b/first_diff.py index 766161153d..78eaf9975e 100755 --- a/first_diff.py +++ b/first_diff.py @@ -39,17 +39,17 @@ def firstDiffMain(): parser = argparse.ArgumentParser(description="Find the first difference(s) between the built ROM and the base ROM.") parser.add_argument("-c", "--count", type=int, default=5, help="find up to this many instruction difference(s)") - parser.add_argument("-v", "--version", help="Which version should be processed", default="us.rev1") + parser.add_argument("-v", "--version", help="Which version should be processed", default="n64-us") parser.add_argument("-a", "--add-colons", action='store_true', help="Add colon between bytes" ) args = parser.parse_args() - buildFolder = Path("build") + buildFolder = Path(f"build/{args.version}") - BUILTROM = Path(f"mm.{args.version}.rom_uncompressed.z64") - BUILTMAP = buildFolder / f"mm.map" + BUILTROM = buildFolder / f"mm-{args.version}.z64" + BUILTMAP = buildFolder / f"mm-{args.version}.map" - EXPECTEDROM = Path("baserom_uncompressed.z64") + EXPECTEDROM = Path(f"baseroms/{args.version}/baserom-decompressed.z64") EXPECTEDMAP = "expected" / BUILTMAP mapfile_parser.frontends.first_diff.doFirstDiff(BUILTMAP, EXPECTEDMAP, BUILTROM, EXPECTEDROM, args.count, mismatchSize=True, addColons=args.add_colons, bytesConverterCallback=decodeInstruction) diff --git a/format.py b/format.py index fa3bd1f928..ad15c08aae 100755 --- a/format.py +++ b/format.py @@ -29,7 +29,7 @@ APPLY_OPTS = "" # Compiler options used with Clang-Tidy # Normal warnings are disabled with -Wno-everything to focus only on tidying -INCLUDES = "-Iinclude -Isrc -Ibuild -I." +INCLUDES = "-Iinclude -Isrc -Ibuild/n64-us -I." DEFINES = "-D_LANGUAGE_C -DNON_MATCHING" COMPILER_OPTS = f"-fno-builtin -std=gnu90 -m32 -Wno-everything {INCLUDES} {DEFINES}" diff --git a/include/tables/dmadata/dmadata_table_us.h b/include/tables/dmadata/dmadata_table_us.h index b472d076f2..1f578522f9 100644 --- a/include/tables/dmadata/dmadata_table_us.h +++ b/include/tables/dmadata/dmadata_table_us.h @@ -5,7 +5,7 @@ * - Argument 1: Name of the segment * - Argument 2: String matching the original name of the segment * - * DEFINE_DMA_ENTRY_UNSET should be used for empty dmadata entries + * DEFINE_DMA_ENTRY_SYMS should be used for empty dmadata entries that are used to keep track of symbols * - Argument 1: Name of the segment * - Argument 2: String matching the original name of the segment */ @@ -17,8 +17,8 @@ DEFINE_DMA_ENTRY(Audioseq, "Audioseq") DEFINE_DMA_ENTRY(Audiotable, "Audiotable") DEFINE_DMA_ENTRY(kanji, "kanji") DEFINE_DMA_ENTRY(link_animetion, "link_animetion") -DEFINE_DMA_ENTRY_UNSET(icon_item_static_syms, "icon_item_static_syms") -DEFINE_DMA_ENTRY_UNSET(icon_item_24_static_syms, "icon_item_24_static_syms") +DEFINE_DMA_ENTRY_SYMS(icon_item_static_syms, "icon_item_static_syms") +DEFINE_DMA_ENTRY_SYMS(icon_item_24_static_syms, "icon_item_24_static_syms") DEFINE_DMA_ENTRY(icon_item_field_static, "icon_item_field_static") DEFINE_DMA_ENTRY(icon_item_dungeon_static, "icon_item_dungeon_static") DEFINE_DMA_ENTRY(icon_item_gameover_static, "icon_item_gameover_static") @@ -30,7 +30,7 @@ DEFINE_DMA_ENTRY(item_name_static, "item_name_static") DEFINE_DMA_ENTRY(map_name_static, "map_name_static") DEFINE_DMA_ENTRY(icon_item_static_yar, "icon_item_static_yar") DEFINE_DMA_ENTRY(icon_item_24_static_yar, "icon_item_24_static_yar") -DEFINE_DMA_ENTRY_UNSET(schedule_dma_static_syms, "schedule_dma_static_syms") +DEFINE_DMA_ENTRY_SYMS(schedule_dma_static_syms, "schedule_dma_static_syms") DEFINE_DMA_ENTRY(schedule_dma_static_yar, "schedule_dma_static_yar") DEFINE_DMA_ENTRY(schedule_static, "schedule_static") DEFINE_DMA_ENTRY(story_static, "story_static") @@ -661,7 +661,7 @@ DEFINE_DMA_ENTRY(ovl_En_Rsn, "ovl_En_Rsn") DEFINE_DMA_ENTRY(gameplay_keep, "gameplay_keep") DEFINE_DMA_ENTRY(gameplay_field_keep, "gameplay_field_keep") DEFINE_DMA_ENTRY(gameplay_dangeon_keep, "gameplay_dangeon_keep") -DEFINE_DMA_ENTRY_UNSET(gameplay_object_exchange_static, "gameplay_object_exchange_static") +DEFINE_DMA_ENTRY_SYMS(gameplay_object_exchange_static, "gameplay_object_exchange_static") DEFINE_DMA_ENTRY(object_link_boy, "object_link_boy") DEFINE_DMA_ENTRY(object_link_child, "object_link_child") DEFINE_DMA_ENTRY(object_link_goron, "object_link_goron") @@ -1548,16 +1548,16 @@ DEFINE_DMA_ENTRY(KAKUSIANA_room_12, "KAKUSIANA_room_12") DEFINE_DMA_ENTRY(KAKUSIANA_room_13, "KAKUSIANA_room_13") DEFINE_DMA_ENTRY(KAKUSIANA_room_14, "KAKUSIANA_room_14") DEFINE_DMA_ENTRY(bump_texture_static, "bump_texture_static") -DEFINE_DMA_ENTRY_UNSET(anime_model_1_static, "anime_model_1_static") -DEFINE_DMA_ENTRY_UNSET(anime_model_2_static, "anime_model_2_static") -DEFINE_DMA_ENTRY_UNSET(anime_model_3_static, "anime_model_3_static") -DEFINE_DMA_ENTRY_UNSET(anime_model_4_static, "anime_model_4_static") -DEFINE_DMA_ENTRY_UNSET(anime_model_5_static, "anime_model_5_static") -DEFINE_DMA_ENTRY_UNSET(anime_model_6_static, "anime_model_6_static") -DEFINE_DMA_ENTRY_UNSET(anime_texture_1_static, "anime_texture_1_static") -DEFINE_DMA_ENTRY_UNSET(anime_texture_2_static, "anime_texture_2_static") -DEFINE_DMA_ENTRY_UNSET(anime_texture_3_static, "anime_texture_3_static") -DEFINE_DMA_ENTRY_UNSET(anime_texture_4_static, "anime_texture_4_static") -DEFINE_DMA_ENTRY_UNSET(anime_texture_5_static, "anime_texture_5_static") -DEFINE_DMA_ENTRY_UNSET(anime_texture_6_static, "anime_texture_6_static") -DEFINE_DMA_ENTRY_UNSET(softsprite_matrix_static, "softsprite_matrix_static") +DEFINE_DMA_ENTRY_SYMS(anime_model_1_static, "anime_model_1_static") +DEFINE_DMA_ENTRY_SYMS(anime_model_2_static, "anime_model_2_static") +DEFINE_DMA_ENTRY_SYMS(anime_model_3_static, "anime_model_3_static") +DEFINE_DMA_ENTRY_SYMS(anime_model_4_static, "anime_model_4_static") +DEFINE_DMA_ENTRY_SYMS(anime_model_5_static, "anime_model_5_static") +DEFINE_DMA_ENTRY_SYMS(anime_model_6_static, "anime_model_6_static") +DEFINE_DMA_ENTRY_SYMS(anime_texture_1_static, "anime_texture_1_static") +DEFINE_DMA_ENTRY_SYMS(anime_texture_2_static, "anime_texture_2_static") +DEFINE_DMA_ENTRY_SYMS(anime_texture_3_static, "anime_texture_3_static") +DEFINE_DMA_ENTRY_SYMS(anime_texture_4_static, "anime_texture_4_static") +DEFINE_DMA_ENTRY_SYMS(anime_texture_5_static, "anime_texture_5_static") +DEFINE_DMA_ENTRY_SYMS(anime_texture_6_static, "anime_texture_6_static") +DEFINE_DMA_ENTRY_SYMS(softsprite_matrix_static, "softsprite_matrix_static") diff --git a/requirements.txt b/requirements.txt index 26ad4e5e58..9b17a4bfa9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -# Setup +# setup colorama>=0.4.3 crunch64>=0.3.1,<1.0.0 ipl3checksum>=1.2.0,<2.0.0 @@ -6,7 +6,7 @@ ipl3checksum>=1.2.0,<2.0.0 # disasm rabbitizer>=1.3.0,<2.0.0 -# Compression +# yars pyelftools>=0.26 # diff @@ -15,5 +15,9 @@ argcomplete python-Levenshtein cxxfilt +# permuter +pycparser +toml + # map parsing mapfile-parser>=1.2.1,<2.0.0 diff --git a/spec b/spec index c7bd963239..a743892bf7 100644 --- a/spec +++ b/spec @@ -4,277 +4,277 @@ beginseg name "makerom" - include "build/asm/makerom/rom_header.o" - include "build/asm/makerom/ipl3.o" - include "build/asm/makerom/entry.o" + include "$(BUILD_DIR)/asm/makerom/rom_header.o" + include "$(BUILD_DIR)/asm/makerom/ipl3.o" + include "$(BUILD_DIR)/asm/makerom/entry.o" endseg beginseg name "framebuffer_lo" address 0x80000500 flags NOLOAD - include "build/src/buffers/framebuffer_lo.o" + include "$(BUILD_DIR)/src/buffers/framebuffer_lo.o" endseg beginseg name "boot" - include "build/src/boot/boot_main.o" - include "build/data/boot/rspboot.data.o" - include "build/src/boot/idle.o" - include "build/src/boot/viconfig.o" - include "build/src/boot/carthandle.o" - include "build/src/boot/z_std_dma.o" - include "build/src/boot/yaz0.o" - include "build/src/boot/irqmgr.o" - include "build/src/boot/CIC6105.o" - include "build/src/boot/syncprintf.o" - include "build/src/boot/fault.o" - include "build/src/boot/fault_drawer.o" - include "build/src/boot/O2/rcp_utils.o" - include "build/src/boot/O2/loadfragment.o" - include "build/src/boot/O2/loadfragment2.o" - include "build/src/boot/O2/padutils.o" - include "build/src/boot/O2/stackcheck.o" - include "build/src/boot/O2/gfxprint.o" - include "build/data/boot/gfxprint.data.o" - include "build/src/boot/O2/mtxuty-cvt.o" - include "build/src/boot/O2/debug.o" - include "build/src/boot/O2/system_heap.o" - include "build/src/boot/O2/padsetup.o" - include "build/src/boot/libc64/math64.o" - include "build/asm/boot/fp.text.o" // Part of libc64 - include "build/data/boot/fp.data.o" - include "build/src/boot/libc64/malloc.o" - include "build/src/boot/libc64/qrand.o" - include "build/src/boot/libc64/__osMalloc.o" - include "build/src/boot/libc64/sprintf.o" - include "build/src/boot/libc64/aprintf.o" - include "build/src/boot/libc64/sleep.o" - include "build/asm/boot/setcause.text.o" - include "build/src/libultra/os/sendmesg.o" - include "build/src/libultra/io/pfsfreeblocks.o" - include "build/src/libultra/io/viextendvstart.o" - include "build/src/libultra/os/stopthread.o" - include "build/src/libultra/os/recvmesg.o" - include "build/asm/boot/setintmask.text.o" - include "build/data/boot/setintmask.rodata.o" - include "build/asm/boot/getintmask.text.o" - include "build/src/libultra/voice/voicesetword.o" - include "build/src/libultra/vimodes/vimodentschpf1.o" - include "build/src/libultra/vimodes/vimodepallan1.o" - include "build/asm/boot/guScale.text.o" - include "build/src/libultra/gu/sinf.o" - include "build/src/libultra/gu/sins.o" - include "build/src/libultra/io/sptask.o" - include "build/src/libultra/libc/ll.o" - include "build/asm/boot/exceptasm.text.o" - include "build/data/boot/exceptasm.data.o" - include "build/data/boot/exceptasm.rodata.o" - include "build/src/libultra/os/thread.o" - include "build/src/libultra/os/destroythread.o" - include "build/src/libultra/voice/voicecheckresult.o" - include "build/asm/boot/bzero.text.o" - include "build/src/libultra/io/motor.o" - include "build/src/libultra/io/siacs.o" - include "build/src/libultra/io/controller.o" - include "build/src/libultra/os/createthread.o" - include "build/src/libultra/io/contreaddata.o" - include "build/src/libultra/voice/voicegetreaddata.o" - include "build/src/libultra/os/virtualtophysical.o" - include "build/asm/boot/getsr.text.o" - include "build/asm/boot/setsr.text.o" - include "build/asm/boot/writebackdcache.text.o" - include "build/src/libultra/os/initialize.o" - include "build/src/libultra/debug/kdebugserver.o" + include "$(BUILD_DIR)/src/boot/boot_main.o" + include "$(BUILD_DIR)/data/boot/rspboot.data.o" + include "$(BUILD_DIR)/src/boot/idle.o" + include "$(BUILD_DIR)/src/boot/viconfig.o" + include "$(BUILD_DIR)/src/boot/carthandle.o" + include "$(BUILD_DIR)/src/boot/z_std_dma.o" + include "$(BUILD_DIR)/src/boot/yaz0.o" + include "$(BUILD_DIR)/src/boot/irqmgr.o" + include "$(BUILD_DIR)/src/boot/CIC6105.o" + include "$(BUILD_DIR)/src/boot/syncprintf.o" + include "$(BUILD_DIR)/src/boot/fault.o" + include "$(BUILD_DIR)/src/boot/fault_drawer.o" + include "$(BUILD_DIR)/src/boot/O2/rcp_utils.o" + include "$(BUILD_DIR)/src/boot/O2/loadfragment.o" + include "$(BUILD_DIR)/src/boot/O2/loadfragment2.o" + include "$(BUILD_DIR)/src/boot/O2/padutils.o" + include "$(BUILD_DIR)/src/boot/O2/stackcheck.o" + include "$(BUILD_DIR)/src/boot/O2/gfxprint.o" + include "$(BUILD_DIR)/data/boot/gfxprint.data.o" + include "$(BUILD_DIR)/src/boot/O2/mtxuty-cvt.o" + include "$(BUILD_DIR)/src/boot/O2/debug.o" + include "$(BUILD_DIR)/src/boot/O2/system_heap.o" + include "$(BUILD_DIR)/src/boot/O2/padsetup.o" + include "$(BUILD_DIR)/src/boot/libc64/math64.o" + include "$(BUILD_DIR)/asm/boot/fp.text.o" // Part of libc64 + include "$(BUILD_DIR)/data/boot/fp.data.o" + include "$(BUILD_DIR)/src/boot/libc64/malloc.o" + include "$(BUILD_DIR)/src/boot/libc64/qrand.o" + include "$(BUILD_DIR)/src/boot/libc64/__osMalloc.o" + include "$(BUILD_DIR)/src/boot/libc64/sprintf.o" + include "$(BUILD_DIR)/src/boot/libc64/aprintf.o" + include "$(BUILD_DIR)/src/boot/libc64/sleep.o" + include "$(BUILD_DIR)/asm/boot/setcause.text.o" + include "$(BUILD_DIR)/src/libultra/os/sendmesg.o" + include "$(BUILD_DIR)/src/libultra/io/pfsfreeblocks.o" + include "$(BUILD_DIR)/src/libultra/io/viextendvstart.o" + include "$(BUILD_DIR)/src/libultra/os/stopthread.o" + include "$(BUILD_DIR)/src/libultra/os/recvmesg.o" + include "$(BUILD_DIR)/asm/boot/setintmask.text.o" + include "$(BUILD_DIR)/data/boot/setintmask.rodata.o" + include "$(BUILD_DIR)/asm/boot/getintmask.text.o" + include "$(BUILD_DIR)/src/libultra/voice/voicesetword.o" + include "$(BUILD_DIR)/src/libultra/vimodes/vimodentschpf1.o" + include "$(BUILD_DIR)/src/libultra/vimodes/vimodepallan1.o" + include "$(BUILD_DIR)/asm/boot/guScale.text.o" + include "$(BUILD_DIR)/src/libultra/gu/sinf.o" + include "$(BUILD_DIR)/src/libultra/gu/sins.o" + include "$(BUILD_DIR)/src/libultra/io/sptask.o" + include "$(BUILD_DIR)/src/libultra/libc/ll.o" + include "$(BUILD_DIR)/asm/boot/exceptasm.text.o" + include "$(BUILD_DIR)/data/boot/exceptasm.data.o" + include "$(BUILD_DIR)/data/boot/exceptasm.rodata.o" + include "$(BUILD_DIR)/src/libultra/os/thread.o" + include "$(BUILD_DIR)/src/libultra/os/destroythread.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecheckresult.o" + include "$(BUILD_DIR)/asm/boot/bzero.text.o" + include "$(BUILD_DIR)/src/libultra/io/motor.o" + include "$(BUILD_DIR)/src/libultra/io/siacs.o" + include "$(BUILD_DIR)/src/libultra/io/controller.o" + include "$(BUILD_DIR)/src/libultra/os/createthread.o" + include "$(BUILD_DIR)/src/libultra/io/contreaddata.o" + include "$(BUILD_DIR)/src/libultra/voice/voicegetreaddata.o" + include "$(BUILD_DIR)/src/libultra/os/virtualtophysical.o" + include "$(BUILD_DIR)/asm/boot/getsr.text.o" + include "$(BUILD_DIR)/asm/boot/setsr.text.o" + include "$(BUILD_DIR)/asm/boot/writebackdcache.text.o" + include "$(BUILD_DIR)/src/libultra/os/initialize.o" + include "$(BUILD_DIR)/src/libultra/debug/kdebugserver.o" pad_text // These pads are from src/libultra/os/parameters.o pad_text pad_text pad_text pad_text pad_text - include "build/src/libultra/io/vigetnextframebuf.o" - include "build/src/libultra/gu/perspective.o" - include "build/src/libultra/io/sprawdma.o" - include "build/src/libultra/io/sirawdma.o" - include "build/src/libultra/io/epilinkhandle.o" - include "build/src/libultra/io/viblack.o" - include "build/src/libultra/io/sirawread.o" - include "build/src/libultra/os/getthreadid.o" - include "build/src/libultra/io/sptaskyield.o" - include "build/src/libultra/io/pfsreadwritefile.o" - include "build/src/libultra/io/pfsgetstatus.o" + include "$(BUILD_DIR)/src/libultra/io/vigetnextframebuf.o" + include "$(BUILD_DIR)/src/libultra/gu/perspective.o" + include "$(BUILD_DIR)/src/libultra/io/sprawdma.o" + include "$(BUILD_DIR)/src/libultra/io/sirawdma.o" + include "$(BUILD_DIR)/src/libultra/io/epilinkhandle.o" + include "$(BUILD_DIR)/src/libultra/io/viblack.o" + include "$(BUILD_DIR)/src/libultra/io/sirawread.o" + include "$(BUILD_DIR)/src/libultra/os/getthreadid.o" + include "$(BUILD_DIR)/src/libultra/io/sptaskyield.o" + include "$(BUILD_DIR)/src/libultra/io/pfsreadwritefile.o" + include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o" pad_text - include "build/asm/boot/guMtxIdentF.text.o" - include "build/src/libultra/io/visetmode.o" - include "build/asm/boot/getconfig.text.o" - include "build/asm/boot/setconfig.text.o" - include "build/src/libultra/gu/lookat.o" - include "build/src/libultra/io/pfsallocatefile.o" - include "build/src/libultra/os/stoptimer.o" - include "build/asm/boot/probetlb.text.o" - include "build/src/libultra/io/pimgr.o" - include "build/src/libultra/io/piacs.o" + include "$(BUILD_DIR)/asm/boot/guMtxIdentF.text.o" + include "$(BUILD_DIR)/src/libultra/io/visetmode.o" + include "$(BUILD_DIR)/asm/boot/getconfig.text.o" + include "$(BUILD_DIR)/asm/boot/setconfig.text.o" + include "$(BUILD_DIR)/src/libultra/gu/lookat.o" + include "$(BUILD_DIR)/src/libultra/io/pfsallocatefile.o" + include "$(BUILD_DIR)/src/libultra/os/stoptimer.o" + include "$(BUILD_DIR)/asm/boot/probetlb.text.o" + include "$(BUILD_DIR)/src/libultra/io/pimgr.o" + include "$(BUILD_DIR)/src/libultra/io/piacs.o" pad_text - include "build/src/libultra/io/devmgr.o" - include "build/src/libultra/io/pirawdma.o" - include "build/src/libultra/vimodes/vimodentschpn1.o" - include "build/src/libultra/io/contpfs.o" - include "build/asm/boot/getcount.text.o" + include "$(BUILD_DIR)/src/libultra/io/devmgr.o" + include "$(BUILD_DIR)/src/libultra/io/pirawdma.o" + include "$(BUILD_DIR)/src/libultra/vimodes/vimodentschpn1.o" + include "$(BUILD_DIR)/src/libultra/io/contpfs.o" + include "$(BUILD_DIR)/asm/boot/getcount.text.o" pad_text - include "build/asm/boot/guMtxL2F.text.o" - include "build/src/libultra/os/getmemsize.o" - include "build/src/libultra/io/pfssearchfile.o" - include "build/src/libultra/os/seteventmesg.o" - include "build/asm/boot/sqrtf.text.o" - include "build/src/libultra/os/afterprenmi.o" - include "build/src/libultra/io/contquery.o" - include "build/src/libultra/gu/lookathil.o" - include "build/src/libultra/libc/xprintf.o" - include "build/src/libultra/voice/voicecleardictionary.o" - include "build/asm/boot/unmaptlball.text.o" - include "build/src/libultra/io/epidma.o" - include "build/src/libultra/voice/voicecontread2.o" - include "build/src/libultra/voice/voicecrc.o" - include "build/src/libultra/libc/string.o" - include "build/src/libultra/os/createmesgqueue.o" - include "build/asm/boot/invalicache.text.o" - include "build/asm/boot/invaldcache.text.o" - include "build/src/libultra/os/timerintr.o" - include "build/src/libultra/voice/voicecontread36.o" - include "build/src/libultra/io/sp.o" - include "build/src/libultra/io/si.o" - include "build/asm/boot/guMtxIdent.text.o" - include "build/src/libultra/os/jammesg.o" - include "build/src/libultra/os/setthreadpri.o" - include "build/src/libultra/os/getthreadpri.o" - include "build/src/libultra/io/epirawread.o" - include "build/src/libultra/io/viswapbuf.o" - include "build/src/libultra/gu/position.o" - include "build/src/libultra/io/epirawdma.o" - include "build/src/libultra/io/sptaskyielded.o" - include "build/asm/boot/bcmp.text.o" - include "build/src/libultra/os/gettime.o" - include "build/src/libultra/gu/rotate.o" - include "build/src/libultra/os/setglobalintmask.o" - include "build/src/libultra/voice/voiceinit.o" - include "build/src/libultra/io/contchannelreset.o" - include "build/src/libultra/voice/voicesetadconverter.o" - include "build/src/libultra/io/aisetfreq.o" - include "build/src/libultra/io/contramread.o" - include "build/src/libultra/voice/voicecontwrite20.o" - include "build/src/libultra/io/crc.o" - include "build/src/libultra/os/getactivequeue.o" - include "build/asm/boot/normalize.text.o" - include "build/asm/boot/setcompare.text.o" - include "build/asm/boot/getcompare.text.o" - include "build/src/libultra/io/dpgetstat.o" - include "build/src/libultra/io/dpsetstat.o" - include "build/asm/boot/bcopy.text.o" - include "build/src/libultra/os/resetglobalintmask.o" - include "build/src/libultra/io/pfsdeletefile.o" - include "build/src/libultra/gu/ortho.o" - include "build/asm/boot/interrupt.text.o" - include "build/src/libultra/vimodes/vimodentsclan1.o" - include "build/src/libultra/vimodes/vimodempallan1.o" - include "build/src/libultra/io/vi.o" - include "build/src/libultra/io/viswapcontext.o" - include "build/src/libultra/io/pigetcmdq.o" - include "build/src/libultra/gu/cosf.o" - include "build/src/libultra/io/epiread.o" - include "build/src/libultra/io/visetspecial.o" - include "build/src/libultra/gu/coss.o" - include "build/src/libultra/os/settime.o" - include "build/src/libultra/voice/voicestopreaddata.o" - include "build/src/libultra/io/visetevent.o" - include "build/src/libultra/io/pfsisplug.o" - include "build/src/libultra/voice/voicegetstatus.o" - include "build/src/libultra/io/cartrominit.o" - include "build/src/libultra/gu/us2dex.o" - include "build/src/libultra/vimodes/vimodefpallan1.o" - include "build/src/libultra/io/pfsselectbank.o" - include "build/src/libultra/io/contsetch.o" - include "build/asm/boot/setfpccsr.text.o" - include "build/asm/boot/getfpccsr.text.o" - include "build/src/libultra/io/pfsfilestate.o" - include "build/src/libultra/io/pfsinitpak.o" - include "build/src/libultra/io/pfschecker.o" - include "build/src/libultra/io/aigetlen.o" - include "build/src/libultra/io/epiwrite.o" - include "build/asm/boot/maptlbrdb.text.o" - include "build/src/libultra/os/yieldthread.o" + include "$(BUILD_DIR)/asm/boot/guMtxL2F.text.o" + include "$(BUILD_DIR)/src/libultra/os/getmemsize.o" + include "$(BUILD_DIR)/src/libultra/io/pfssearchfile.o" + include "$(BUILD_DIR)/src/libultra/os/seteventmesg.o" + include "$(BUILD_DIR)/asm/boot/sqrtf.text.o" + include "$(BUILD_DIR)/src/libultra/os/afterprenmi.o" + include "$(BUILD_DIR)/src/libultra/io/contquery.o" + include "$(BUILD_DIR)/src/libultra/gu/lookathil.o" + include "$(BUILD_DIR)/src/libultra/libc/xprintf.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecleardictionary.o" + include "$(BUILD_DIR)/asm/boot/unmaptlball.text.o" + include "$(BUILD_DIR)/src/libultra/io/epidma.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecontread2.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecrc.o" + include "$(BUILD_DIR)/src/libultra/libc/string.o" + include "$(BUILD_DIR)/src/libultra/os/createmesgqueue.o" + include "$(BUILD_DIR)/asm/boot/invalicache.text.o" + include "$(BUILD_DIR)/asm/boot/invaldcache.text.o" + include "$(BUILD_DIR)/src/libultra/os/timerintr.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecontread36.o" + include "$(BUILD_DIR)/src/libultra/io/sp.o" + include "$(BUILD_DIR)/src/libultra/io/si.o" + include "$(BUILD_DIR)/asm/boot/guMtxIdent.text.o" + include "$(BUILD_DIR)/src/libultra/os/jammesg.o" + include "$(BUILD_DIR)/src/libultra/os/setthreadpri.o" + include "$(BUILD_DIR)/src/libultra/os/getthreadpri.o" + include "$(BUILD_DIR)/src/libultra/io/epirawread.o" + include "$(BUILD_DIR)/src/libultra/io/viswapbuf.o" + include "$(BUILD_DIR)/src/libultra/gu/position.o" + include "$(BUILD_DIR)/src/libultra/io/epirawdma.o" + include "$(BUILD_DIR)/src/libultra/io/sptaskyielded.o" + include "$(BUILD_DIR)/asm/boot/bcmp.text.o" + include "$(BUILD_DIR)/src/libultra/os/gettime.o" + include "$(BUILD_DIR)/src/libultra/gu/rotate.o" + include "$(BUILD_DIR)/src/libultra/os/setglobalintmask.o" + include "$(BUILD_DIR)/src/libultra/voice/voiceinit.o" + include "$(BUILD_DIR)/src/libultra/io/contchannelreset.o" + include "$(BUILD_DIR)/src/libultra/voice/voicesetadconverter.o" + include "$(BUILD_DIR)/src/libultra/io/aisetfreq.o" + include "$(BUILD_DIR)/src/libultra/io/contramread.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecontwrite20.o" + include "$(BUILD_DIR)/src/libultra/io/crc.o" + include "$(BUILD_DIR)/src/libultra/os/getactivequeue.o" + include "$(BUILD_DIR)/asm/boot/normalize.text.o" + include "$(BUILD_DIR)/asm/boot/setcompare.text.o" + include "$(BUILD_DIR)/asm/boot/getcompare.text.o" + include "$(BUILD_DIR)/src/libultra/io/dpgetstat.o" + include "$(BUILD_DIR)/src/libultra/io/dpsetstat.o" + include "$(BUILD_DIR)/asm/boot/bcopy.text.o" + include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o" + include "$(BUILD_DIR)/src/libultra/io/pfsdeletefile.o" + include "$(BUILD_DIR)/src/libultra/gu/ortho.o" + include "$(BUILD_DIR)/asm/boot/interrupt.text.o" + include "$(BUILD_DIR)/src/libultra/vimodes/vimodentsclan1.o" + include "$(BUILD_DIR)/src/libultra/vimodes/vimodempallan1.o" + include "$(BUILD_DIR)/src/libultra/io/vi.o" + include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o" + include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o" + include "$(BUILD_DIR)/src/libultra/gu/cosf.o" + include "$(BUILD_DIR)/src/libultra/io/epiread.o" + include "$(BUILD_DIR)/src/libultra/io/visetspecial.o" + include "$(BUILD_DIR)/src/libultra/gu/coss.o" + include "$(BUILD_DIR)/src/libultra/os/settime.o" + include "$(BUILD_DIR)/src/libultra/voice/voicestopreaddata.o" + include "$(BUILD_DIR)/src/libultra/io/visetevent.o" + include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o" + include "$(BUILD_DIR)/src/libultra/voice/voicegetstatus.o" + include "$(BUILD_DIR)/src/libultra/io/cartrominit.o" + include "$(BUILD_DIR)/src/libultra/gu/us2dex.o" + include "$(BUILD_DIR)/src/libultra/vimodes/vimodefpallan1.o" + include "$(BUILD_DIR)/src/libultra/io/pfsselectbank.o" + include "$(BUILD_DIR)/src/libultra/io/contsetch.o" + include "$(BUILD_DIR)/asm/boot/setfpccsr.text.o" + include "$(BUILD_DIR)/asm/boot/getfpccsr.text.o" + include "$(BUILD_DIR)/src/libultra/io/pfsfilestate.o" + include "$(BUILD_DIR)/src/libultra/io/pfsinitpak.o" + include "$(BUILD_DIR)/src/libultra/io/pfschecker.o" + include "$(BUILD_DIR)/src/libultra/io/aigetlen.o" + include "$(BUILD_DIR)/src/libultra/io/epiwrite.o" + include "$(BUILD_DIR)/asm/boot/maptlbrdb.text.o" + include "$(BUILD_DIR)/src/libultra/os/yieldthread.o" pad_text - include "build/asm/boot/guTranslate.text.o" - include "build/asm/boot/getcause.text.o" - include "build/src/libultra/io/contramwrite.o" - include "build/src/libultra/io/epirawwrite.o" - include "build/src/libultra/os/settimer.o" - include "build/data/boot/libm_vals.rodata.o" - include "build/src/libultra/libc/xldtob.o" - include "build/src/libultra/libc/ldiv.o" - include "build/src/libultra/libc/xlitob.o" - include "build/src/libultra/io/sirawwrite.o" - include "build/src/libultra/io/spgetstat.o" - include "build/src/libultra/io/spsetstat.o" + include "$(BUILD_DIR)/asm/boot/guTranslate.text.o" + include "$(BUILD_DIR)/asm/boot/getcause.text.o" + include "$(BUILD_DIR)/src/libultra/io/contramwrite.o" + include "$(BUILD_DIR)/src/libultra/io/epirawwrite.o" + include "$(BUILD_DIR)/src/libultra/os/settimer.o" + include "$(BUILD_DIR)/data/boot/libm_vals.rodata.o" + include "$(BUILD_DIR)/src/libultra/libc/xldtob.o" + include "$(BUILD_DIR)/src/libultra/libc/ldiv.o" + include "$(BUILD_DIR)/src/libultra/libc/xlitob.o" + include "$(BUILD_DIR)/src/libultra/io/sirawwrite.o" + include "$(BUILD_DIR)/src/libultra/io/spgetstat.o" + include "$(BUILD_DIR)/src/libultra/io/spsetstat.o" pad_text - include "build/src/libultra/io/vimgr.o" - include "build/src/libultra/io/vigetcurrcontext.o" - include "build/asm/boot/writebackdcacheall.text.o" - include "build/src/libultra/os/getcurrfaultthread.o" - include "build/src/libultra/voice/voicemaskdictionary.o" + include "$(BUILD_DIR)/src/libultra/io/vimgr.o" + include "$(BUILD_DIR)/src/libultra/io/vigetcurrcontext.o" + include "$(BUILD_DIR)/asm/boot/writebackdcacheall.text.o" + include "$(BUILD_DIR)/src/libultra/os/getcurrfaultthread.o" + include "$(BUILD_DIR)/src/libultra/voice/voicemaskdictionary.o" pad_text - include "build/asm/boot/guMtxF2L.text.o" - include "build/src/libultra/os/startthread.o" - include "build/src/libultra/io/visetyscale.o" - include "build/src/libultra/io/visetxscale.o" - include "build/src/libultra/libc/llcvt.o" - include "build/src/libultra/voice/voicecheckword.o" - include "build/src/libultra/voice/voicecontrolgain.o" - include "build/src/libultra/voice/voicestartreaddata.o" - include "build/src/libultra/io/vigetcurrframebuf.o" - include "build/src/libultra/io/spsetpc.o" - include "build/src/libultra/voice/voicecontwrite4.o" - include "build/src/libultra/os/gethwinterrupt.o" - include "build/src/libultra/os/sethwinterrupt.o" - include "build/asm/boot/getwatchlo.text.o" - include "build/asm/boot/setwatchlo.text.o" - include "build/src/boot/libm/fmodf.o" - include "build/src/boot/libc/memset.o" - include "build/src/boot/libc/strcmp.o" - include "build/src/boot/libc/strcpy.o" - include "build/src/boot/libc/memmove.o" - include "build/src/boot/build.o" + include "$(BUILD_DIR)/asm/boot/guMtxF2L.text.o" + include "$(BUILD_DIR)/src/libultra/os/startthread.o" + include "$(BUILD_DIR)/src/libultra/io/visetyscale.o" + include "$(BUILD_DIR)/src/libultra/io/visetxscale.o" + include "$(BUILD_DIR)/src/libultra/libc/llcvt.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecheckword.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecontrolgain.o" + include "$(BUILD_DIR)/src/libultra/voice/voicestartreaddata.o" + include "$(BUILD_DIR)/src/libultra/io/vigetcurrframebuf.o" + include "$(BUILD_DIR)/src/libultra/io/spsetpc.o" + include "$(BUILD_DIR)/src/libultra/voice/voicecontwrite4.o" + include "$(BUILD_DIR)/src/libultra/os/gethwinterrupt.o" + include "$(BUILD_DIR)/src/libultra/os/sethwinterrupt.o" + include "$(BUILD_DIR)/asm/boot/getwatchlo.text.o" + include "$(BUILD_DIR)/asm/boot/setwatchlo.text.o" + include "$(BUILD_DIR)/src/boot/libm/fmodf.o" + include "$(BUILD_DIR)/src/boot/libc/memset.o" + include "$(BUILD_DIR)/src/boot/libc/strcmp.o" + include "$(BUILD_DIR)/src/boot/libc/strcpy.o" + include "$(BUILD_DIR)/src/boot/libc/memmove.o" + include "$(BUILD_DIR)/src/boot/build.o" endseg beginseg name "dmadata" - include "build/src/dmadata/dmadata.o" + include "$(BUILD_DIR)/src/dmadata/dmadata.o" endseg beginseg name "Audiobank" address 0x10 # fake address to avoid map lookup inaccuracies - include "build/baserom/Audiobank.o" + include "$(BUILD_DIR)/baserom/Audiobank.o" endseg beginseg name "Audioseq" - include "build/baserom/Audioseq.o" + include "$(BUILD_DIR)/baserom/Audioseq.o" endseg beginseg name "Audiotable" - include "build/baserom/Audiotable.o" + include "$(BUILD_DIR)/baserom/Audiotable.o" endseg beginseg name "kanji" - include "build/assets/interface/kanji/kanji.o" + include "$(BUILD_DIR)/assets/interface/kanji/kanji.o" endseg beginseg name "link_animetion" romalign 0x1000 - include "build/assets/misc/link_animetion/link_animetion.o" + include "$(BUILD_DIR)/assets/misc/link_animetion/link_animetion.o" number 7 endseg @@ -282,7 +282,7 @@ beginseg name "icon_item_static_syms" flags SYMS romalign 0x1000 - include "build/assets/archives/icon_item_static/icon_item_static_yar.symbols.o" + include "$(BUILD_DIR)/assets/archives/icon_item_static/icon_item_static_yar.symbols.o" number 8 endseg @@ -290,7 +290,7 @@ beginseg name "icon_item_24_static_syms" flags SYMS romalign 0x1000 - include "build/assets/archives/icon_item_24_static/icon_item_24_static_yar.symbols.o" + include "$(BUILD_DIR)/assets/archives/icon_item_24_static/icon_item_24_static_yar.symbols.o" number 9 endseg @@ -298,7 +298,7 @@ beginseg name "icon_item_field_static" compress romalign 0x1000 - include "build/assets/interface/icon_item_field_static/icon_item_field_static.o" + include "$(BUILD_DIR)/assets/interface/icon_item_field_static/icon_item_field_static.o" number 12 endseg @@ -306,7 +306,7 @@ beginseg name "icon_item_dungeon_static" compress romalign 0x1000 - include "build/assets/interface/icon_item_dungeon_static/icon_item_dungeon_static.o" + include "$(BUILD_DIR)/assets/interface/icon_item_dungeon_static/icon_item_dungeon_static.o" number 12 endseg @@ -314,7 +314,7 @@ beginseg name "icon_item_gameover_static" compress romalign 0x1000 - include "build/assets/interface/icon_item_gameover_static/icon_item_gameover_static.o" + include "$(BUILD_DIR)/assets/interface/icon_item_gameover_static/icon_item_gameover_static.o" number 12 endseg @@ -322,7 +322,7 @@ beginseg name "icon_item_jpn_static" compress romalign 0x1000 - include "build/assets/interface/icon_item_jpn_static/icon_item_jpn_static.o" + include "$(BUILD_DIR)/assets/interface/icon_item_jpn_static/icon_item_jpn_static.o" number 13 endseg @@ -330,60 +330,60 @@ beginseg name "icon_item_vtx_static" compress romalign 0x1000 - include "build/assets/interface/icon_item_vtx_static/icon_item_vtx_static.o" + include "$(BUILD_DIR)/assets/interface/icon_item_vtx_static/icon_item_vtx_static.o" number 11 endseg beginseg name "map_i_static" - include "build/assets/c/archives/map_i_static/map_i_static.yar.o" + include "$(BUILD_DIR)/assets/c/archives/map_i_static/map_i_static.yar.o" endseg beginseg name "map_grand_static" - include "build/assets/c/archives/map_grand_static/map_grand_static.yar.o" + include "$(BUILD_DIR)/assets/c/archives/map_grand_static/map_grand_static.yar.o" endseg beginseg name "item_name_static" - include "build/assets/archives/item_name_static/item_name_static.yar.o" + include "$(BUILD_DIR)/assets/archives/item_name_static/item_name_static.yar.o" endseg beginseg name "map_name_static" - include "build/assets/archives/map_name_static/map_name_static.yar.o" + include "$(BUILD_DIR)/assets/archives/map_name_static/map_name_static.yar.o" endseg beginseg name "icon_item_static_yar" - include "build/assets/archives/icon_item_static/icon_item_static_yar.yar.o" + include "$(BUILD_DIR)/assets/archives/icon_item_static/icon_item_static_yar.yar.o" number 8 endseg beginseg name "icon_item_24_static_yar" - include "build/assets/archives/icon_item_24_static/icon_item_24_static_yar.yar.o" + include "$(BUILD_DIR)/assets/archives/icon_item_24_static/icon_item_24_static_yar.yar.o" number 9 endseg beginseg name "schedule_dma_static_syms" flags SYMS - include "build/assets/archives/schedule_dma_static/schedule_dma_static_yar.symbols.o" + include "$(BUILD_DIR)/assets/archives/schedule_dma_static/schedule_dma_static_yar.symbols.o" number 7 endseg beginseg name "schedule_dma_static_yar" increment 0x1000 - include "build/assets/archives/schedule_dma_static/schedule_dma_static_yar.yar.o" + include "$(BUILD_DIR)/assets/archives/schedule_dma_static/schedule_dma_static_yar.yar.o" number 7 endseg beginseg name "schedule_static" compress - include "build/assets/interface/schedule_static/schedule_static.o" + include "$(BUILD_DIR)/assets/interface/schedule_static/schedule_static.o" number 8 endseg @@ -391,48 +391,48 @@ beginseg name "story_static" compress romalign 0x1000 - include "build/assets/misc/story_static/story_static.o" + include "$(BUILD_DIR)/assets/misc/story_static/story_static.o" number 7 endseg beginseg name "do_action_static" romalign 0x1000 - include "build/assets/interface/do_action_static/do_action_static.o" + include "$(BUILD_DIR)/assets/interface/do_action_static/do_action_static.o" number 9 endseg beginseg name "message_static" romalign 0x1000 - include "build/assets/interface/message_static/message_static.o" + include "$(BUILD_DIR)/assets/interface/message_static/message_static.o" number 7 endseg beginseg name "message_texture_static" romalign 0x1000 - include "build/assets/interface/message_texture_static/message_texture_static.o" + include "$(BUILD_DIR)/assets/interface/message_texture_static/message_texture_static.o" number 9 endseg beginseg name "nes_font_static" romalign 0x1000 - include "build/assets/interface/nes_font_static/nes_font_static.o" + include "$(BUILD_DIR)/assets/interface/nes_font_static/nes_font_static.o" endseg beginseg name "message_data_static" romalign 0x1000 - include "build/assets/text/message_data_static.o" + include "$(BUILD_DIR)/assets/text/message_data_static.o" number 8 endseg beginseg name "staff_message_data_static" romalign 0x1000 - include "build/assets/text/staff_message_data_static.o" + include "$(BUILD_DIR)/assets/text/staff_message_data_static.o" number 7 endseg @@ -440,187 +440,187 @@ beginseg name "code" compress after "dmadata" - include "build/data/code/aspMain.data.o" - include "build/data/code/gspS2DEX2.fifo.data.o" - include "build/data/code/njpgdspMain.data.o" - include "build/src/code/z_en_a_keep.o" - include "build/src/code/z_en_item00.o" - include "build/src/code/z_eff_blure.o" - include "build/src/code/z_eff_shield_particle.o" - include "build/src/code/z_eff_spark.o" - include "build/src/code/z_eff_ss_dead.o" - include "build/src/code/z_eff_tire_mark.o" - include "build/src/code/z_effect.o" - include "build/src/code/z_effect_soft_sprite.o" - include "build/src/code/z_effect_soft_sprite_old_init.o" - include "build/src/code/z_effect_soft_sprite_dlftbls.o" - include "build/src/code/flg_set.o" - include "build/src/code/z_DLF.o" - include "build/src/code/z_actor.o" - include "build/src/code/z_actor_dlftbls.o" - include "build/src/code/z_bgcheck.o" - include "build/src/code/z_bg_collect.o" - include "build/src/code/z_bg_item.o" - include "build/src/code/z_camera.o" - include "build/src/code/z_collision_btltbls.o" + include "$(BUILD_DIR)/data/code/aspMain.data.o" + include "$(BUILD_DIR)/data/code/gspS2DEX2.fifo.data.o" + include "$(BUILD_DIR)/data/code/njpgdspMain.data.o" + include "$(BUILD_DIR)/src/code/z_en_a_keep.o" + include "$(BUILD_DIR)/src/code/z_en_item00.o" + include "$(BUILD_DIR)/src/code/z_eff_blure.o" + include "$(BUILD_DIR)/src/code/z_eff_shield_particle.o" + include "$(BUILD_DIR)/src/code/z_eff_spark.o" + include "$(BUILD_DIR)/src/code/z_eff_ss_dead.o" + include "$(BUILD_DIR)/src/code/z_eff_tire_mark.o" + include "$(BUILD_DIR)/src/code/z_effect.o" + include "$(BUILD_DIR)/src/code/z_effect_soft_sprite.o" + include "$(BUILD_DIR)/src/code/z_effect_soft_sprite_old_init.o" + include "$(BUILD_DIR)/src/code/z_effect_soft_sprite_dlftbls.o" + include "$(BUILD_DIR)/src/code/flg_set.o" + include "$(BUILD_DIR)/src/code/z_DLF.o" + include "$(BUILD_DIR)/src/code/z_actor.o" + include "$(BUILD_DIR)/src/code/z_actor_dlftbls.o" + include "$(BUILD_DIR)/src/code/z_bgcheck.o" + include "$(BUILD_DIR)/src/code/z_bg_collect.o" + include "$(BUILD_DIR)/src/code/z_bg_item.o" + include "$(BUILD_DIR)/src/code/z_camera.o" + include "$(BUILD_DIR)/src/code/z_collision_btltbls.o" pad_text - include "build/src/code/z_collision_check.o" - include "build/src/code/code_800E8EA0.o" - include "build/src/code/z_common_data.o" - include "build/src/code/z_debug.o" - include "build/src/code/z_debug_display.o" - include "build/src/code/z_debug_mode.o" - include "build/src/code/z_demo.o" - include "build/src/code/z_draw.o" - include "build/src/code/z_eff_footmark.o" - include "build/src/code/z_sound_source.o" - include "build/src/code/z_elf_message.o" - include "build/src/code/z_en_hy_code.o" - include "build/src/code/z_face_reaction.o" - include "build/src/code/z_env_flags.o" - include "build/src/code/z_eventmgr.o" - include "build/src/code/z_fcurve_data.o" - include "build/src/code/z_fcurve_data_skelanime.o" - include "build/src/code/z_fireobj.o" - include "build/src/code/z_game_dlftbls.o" - include "build/src/code/z_horse.o" - include "build/src/code/z_jpeg.o" - include "build/src/code/z_kaleido_setup.o" - include "build/src/code/z_kanfont.o" - include "build/src/code/z_kankyo.o" - include "build/src/code/z_lib.o" - include "build/src/code/z_lifemeter.o" - include "build/src/code/z_lights.o" - include "build/src/code/z_malloc.o" - include "build/src/code/z_map_disp.o" - include "build/data/code/z_map_disp.data.o" - include "build/data/code/z_map_disp.bss.o" - include "build/src/code/z_map_data.o" - include "build/src/code/z_map_exp.o" - include "build/src/code/z_msgevent.o" - include "build/data/code/z_msgevent.data.o" - include "build/src/code/z_nmi_buff.o" - include "build/src/code/z_nulltask.o" - include "build/src/code/z_olib.o" + include "$(BUILD_DIR)/src/code/z_collision_check.o" + include "$(BUILD_DIR)/src/code/code_800E8EA0.o" + include "$(BUILD_DIR)/src/code/z_common_data.o" + include "$(BUILD_DIR)/src/code/z_debug.o" + include "$(BUILD_DIR)/src/code/z_debug_display.o" + include "$(BUILD_DIR)/src/code/z_debug_mode.o" + include "$(BUILD_DIR)/src/code/z_demo.o" + include "$(BUILD_DIR)/src/code/z_draw.o" + include "$(BUILD_DIR)/src/code/z_eff_footmark.o" + include "$(BUILD_DIR)/src/code/z_sound_source.o" + include "$(BUILD_DIR)/src/code/z_elf_message.o" + include "$(BUILD_DIR)/src/code/z_en_hy_code.o" + include "$(BUILD_DIR)/src/code/z_face_reaction.o" + include "$(BUILD_DIR)/src/code/z_env_flags.o" + include "$(BUILD_DIR)/src/code/z_eventmgr.o" + include "$(BUILD_DIR)/src/code/z_fcurve_data.o" + include "$(BUILD_DIR)/src/code/z_fcurve_data_skelanime.o" + include "$(BUILD_DIR)/src/code/z_fireobj.o" + include "$(BUILD_DIR)/src/code/z_game_dlftbls.o" + include "$(BUILD_DIR)/src/code/z_horse.o" + include "$(BUILD_DIR)/src/code/z_jpeg.o" + include "$(BUILD_DIR)/src/code/z_kaleido_setup.o" + include "$(BUILD_DIR)/src/code/z_kanfont.o" + include "$(BUILD_DIR)/src/code/z_kankyo.o" + include "$(BUILD_DIR)/src/code/z_lib.o" + include "$(BUILD_DIR)/src/code/z_lifemeter.o" + include "$(BUILD_DIR)/src/code/z_lights.o" + include "$(BUILD_DIR)/src/code/z_malloc.o" + include "$(BUILD_DIR)/src/code/z_map_disp.o" + include "$(BUILD_DIR)/data/code/z_map_disp.data.o" + include "$(BUILD_DIR)/data/code/z_map_disp.bss.o" + include "$(BUILD_DIR)/src/code/z_map_data.o" + include "$(BUILD_DIR)/src/code/z_map_exp.o" + include "$(BUILD_DIR)/src/code/z_msgevent.o" + include "$(BUILD_DIR)/data/code/z_msgevent.data.o" + include "$(BUILD_DIR)/src/code/z_nmi_buff.o" + include "$(BUILD_DIR)/src/code/z_nulltask.o" + include "$(BUILD_DIR)/src/code/z_olib.o" pad_text - include "build/src/code/z_parameter.o" - include "build/src/code/z_path.o" - include "build/src/code/z_pause.o" - include "build/src/code/z_player_lib.o" - include "build/src/code/z_prenmi.o" - include "build/src/code/z_quake.o" - include "build/src/code/z_rcp.o" + include "$(BUILD_DIR)/src/code/z_parameter.o" + include "$(BUILD_DIR)/src/code/z_path.o" + include "$(BUILD_DIR)/src/code/z_pause.o" + include "$(BUILD_DIR)/src/code/z_player_lib.o" + include "$(BUILD_DIR)/src/code/z_prenmi.o" + include "$(BUILD_DIR)/src/code/z_quake.o" + include "$(BUILD_DIR)/src/code/z_rcp.o" pad_text - include "build/src/code/z_room.o" - include "build/src/code/z_inventory.o" + include "$(BUILD_DIR)/src/code/z_room.o" + include "$(BUILD_DIR)/src/code/z_inventory.o" pad_text - include "build/src/code/z_scene.o" - include "build/src/code/object_table.o" - include "build/src/code/z_scene_proc.o" - include "build/src/code/z_scene_table.o" - include "build/src/code/z_schedule.o" - include "build/src/code/z_skelanime.o" - include "build/src/code/z_skin.o" - include "build/src/code/z_skin_awb.o" - include "build/src/code/z_skin_matrix.o" - include "build/src/code/z_snap.o" - include "build/src/code/z_sub_s.o" - include "build/src/code/z_circle_tex.o" - include "build/src/code/z_rumble.o" - include "build/src/code/z_view.o" - include "build/src/code/z_vimode.o" - include "build/src/code/z_viscvg.o" - include "build/src/code/z_visfbuf.o" - include "build/src/code/z_vismono.o" - include "build/src/code/z_viszbuf.o" - include "build/src/code/z_vr_box.o" - include "build/src/code/z_vr_box_draw.o" - include "build/src/code/z_sram_NES.o" - include "build/src/code/z_message.o" - include "build/src/code/z_message_nes.o" - include "build/src/code/z_message_staff.o" - include "build/src/code/z_player_call.o" - include "build/src/code/z_shrink_window.o" - include "build/src/code/cutscene_camera.o" - include "build/src/code/z_kaleido_manager.o" - include "build/src/code/z_kaleido_scope_call.o" - include "build/src/code/z_fbdemo_dlftbls.o" - include "build/src/code/z_fbdemo.o" - include "build/src/code/z_fbdemo_fade.o" - include "build/src/code/z_fbdemo_circle.o" - include "build/src/code/z_overlay.o" - include "build/src/code/z_play.o" - include "build/src/code/z_play_hireso.o" - include "build/src/code/PreRender.o" - include "build/src/code/TwoHeadGfxArena.o" - include "build/src/code/TwoHeadArena.o" - include "build/src/code/audio_stop_all_sfx.o" - include "build/src/code/audio_thread_manager.o" - include "build/src/code/title_setup.o" - include "build/src/code/game.o" - include "build/src/code/gamealloc.o" - include "build/src/code/graph.o" - include "build/src/code/gfxalloc.o" - include "build/src/code/listalloc.o" - include "build/src/code/main.o" - include "build/src/code/padmgr.o" - include "build/src/code/sched.o" - include "build/src/code/speed_meter.o" - include "build/src/code/su_mtx.o" - include "build/src/code/sys_cfb.o" - include "build/src/code/sys_cmpdma.o" - include "build/src/code/sys_initial_check.o" - include "build/src/code/sys_math.o" - include "build/src/code/sys_math3d.o" - include "build/data/code/sys_math3d.data.o" - include "build/data/code/sys_math3d.bss.o" - include "build/src/code/sys_math_atan.o" - include "build/src/code/sys_matrix.o" - include "build/src/code/sys_ucode.o" - include "build/src/code/sys_rumble.o" - include "build/data/code/code_801D1E80.data.o" - include "build/src/code/code_80183070.o" - include "build/src/code/c_keyframe.o" - include "build/src/code/sys_slowly.o" - include "build/src/code/sys_flashrom.o" - include "build/asm/code/kanread.text.o" // handwritten - include "build/src/code/osFlash.o" + include "$(BUILD_DIR)/src/code/z_scene.o" + include "$(BUILD_DIR)/src/code/object_table.o" + include "$(BUILD_DIR)/src/code/z_scene_proc.o" + include "$(BUILD_DIR)/src/code/z_scene_table.o" + include "$(BUILD_DIR)/src/code/z_schedule.o" + include "$(BUILD_DIR)/src/code/z_skelanime.o" + include "$(BUILD_DIR)/src/code/z_skin.o" + include "$(BUILD_DIR)/src/code/z_skin_awb.o" + include "$(BUILD_DIR)/src/code/z_skin_matrix.o" + include "$(BUILD_DIR)/src/code/z_snap.o" + include "$(BUILD_DIR)/src/code/z_sub_s.o" + include "$(BUILD_DIR)/src/code/z_circle_tex.o" + include "$(BUILD_DIR)/src/code/z_rumble.o" + include "$(BUILD_DIR)/src/code/z_view.o" + include "$(BUILD_DIR)/src/code/z_vimode.o" + include "$(BUILD_DIR)/src/code/z_viscvg.o" + include "$(BUILD_DIR)/src/code/z_visfbuf.o" + include "$(BUILD_DIR)/src/code/z_vismono.o" + include "$(BUILD_DIR)/src/code/z_viszbuf.o" + include "$(BUILD_DIR)/src/code/z_vr_box.o" + include "$(BUILD_DIR)/src/code/z_vr_box_draw.o" + include "$(BUILD_DIR)/src/code/z_sram_NES.o" + include "$(BUILD_DIR)/src/code/z_message.o" + include "$(BUILD_DIR)/src/code/z_message_nes.o" + include "$(BUILD_DIR)/src/code/z_message_staff.o" + include "$(BUILD_DIR)/src/code/z_player_call.o" + include "$(BUILD_DIR)/src/code/z_shrink_window.o" + include "$(BUILD_DIR)/src/code/cutscene_camera.o" + include "$(BUILD_DIR)/src/code/z_kaleido_manager.o" + include "$(BUILD_DIR)/src/code/z_kaleido_scope_call.o" + include "$(BUILD_DIR)/src/code/z_fbdemo_dlftbls.o" + include "$(BUILD_DIR)/src/code/z_fbdemo.o" + include "$(BUILD_DIR)/src/code/z_fbdemo_fade.o" + include "$(BUILD_DIR)/src/code/z_fbdemo_circle.o" + include "$(BUILD_DIR)/src/code/z_overlay.o" + include "$(BUILD_DIR)/src/code/z_play.o" + include "$(BUILD_DIR)/src/code/z_play_hireso.o" + include "$(BUILD_DIR)/src/code/PreRender.o" + include "$(BUILD_DIR)/src/code/TwoHeadGfxArena.o" + include "$(BUILD_DIR)/src/code/TwoHeadArena.o" + include "$(BUILD_DIR)/src/code/audio_stop_all_sfx.o" + include "$(BUILD_DIR)/src/code/audio_thread_manager.o" + include "$(BUILD_DIR)/src/code/title_setup.o" + include "$(BUILD_DIR)/src/code/game.o" + include "$(BUILD_DIR)/src/code/gamealloc.o" + include "$(BUILD_DIR)/src/code/graph.o" + include "$(BUILD_DIR)/src/code/gfxalloc.o" + include "$(BUILD_DIR)/src/code/listalloc.o" + include "$(BUILD_DIR)/src/code/main.o" + include "$(BUILD_DIR)/src/code/padmgr.o" + include "$(BUILD_DIR)/src/code/sched.o" + include "$(BUILD_DIR)/src/code/speed_meter.o" + include "$(BUILD_DIR)/src/code/su_mtx.o" + include "$(BUILD_DIR)/src/code/sys_cfb.o" + include "$(BUILD_DIR)/src/code/sys_cmpdma.o" + include "$(BUILD_DIR)/src/code/sys_initial_check.o" + include "$(BUILD_DIR)/src/code/sys_math.o" + include "$(BUILD_DIR)/src/code/sys_math3d.o" + include "$(BUILD_DIR)/data/code/sys_math3d.data.o" + include "$(BUILD_DIR)/data/code/sys_math3d.bss.o" + include "$(BUILD_DIR)/src/code/sys_math_atan.o" + include "$(BUILD_DIR)/src/code/sys_matrix.o" + include "$(BUILD_DIR)/src/code/sys_ucode.o" + include "$(BUILD_DIR)/src/code/sys_rumble.o" + include "$(BUILD_DIR)/data/code/code_801D1E80.data.o" + include "$(BUILD_DIR)/src/code/code_80183070.o" + include "$(BUILD_DIR)/src/code/c_keyframe.o" + include "$(BUILD_DIR)/src/code/sys_slowly.o" + include "$(BUILD_DIR)/src/code/sys_flashrom.o" + include "$(BUILD_DIR)/asm/code/kanread.text.o" // handwritten + include "$(BUILD_DIR)/src/code/osFlash.o" pad_text pad_text pad_text - include "build/src/audio/lib/data.o" - include "build/src/audio/lib/synthesis.o" - include "build/src/audio/lib/heap.o" - include "build/data/code/audio_heap.bss.o" - include "build/src/audio/lib/load.o" - include "build/src/audio/lib/thread.o" - include "build/src/audio/lib/dcache.o" - include "build/src/audio/lib/aisetnextbuf.o" - include "build/src/audio/lib/playback.o" - include "build/src/audio/lib/effects.o" - include "build/src/audio/lib/seqplayer.o" - include "build/data/code/audio_dramStack.data.o" - include "build/asm/code/code_8019AE40.text.o" // handwritten + include "$(BUILD_DIR)/src/audio/lib/data.o" + include "$(BUILD_DIR)/src/audio/lib/synthesis.o" + include "$(BUILD_DIR)/src/audio/lib/heap.o" + include "$(BUILD_DIR)/data/code/audio_heap.bss.o" + include "$(BUILD_DIR)/src/audio/lib/load.o" + include "$(BUILD_DIR)/src/audio/lib/thread.o" + include "$(BUILD_DIR)/src/audio/lib/dcache.o" + include "$(BUILD_DIR)/src/audio/lib/aisetnextbuf.o" + include "$(BUILD_DIR)/src/audio/lib/playback.o" + include "$(BUILD_DIR)/src/audio/lib/effects.o" + include "$(BUILD_DIR)/src/audio/lib/seqplayer.o" + include "$(BUILD_DIR)/data/code/audio_dramStack.data.o" + include "$(BUILD_DIR)/asm/code/code_8019AE40.text.o" // handwritten pad_text - include "build/asm/code/code_8019AEC0.text.o" // handwritten - include "build/src/audio/code_8019AF00.o" - include "build/src/audio/voice_external.o" - include "build/src/audio/voice_internal.o" + include "$(BUILD_DIR)/asm/code/code_8019AEC0.text.o" // handwritten + include "$(BUILD_DIR)/src/audio/code_8019AF00.o" + include "$(BUILD_DIR)/src/audio/voice_external.o" + include "$(BUILD_DIR)/src/audio/voice_internal.o" pad_text - include "build/src/audio/sfx_params.o" - include "build/src/audio/sfx.o" - include "build/src/audio/sequence.o" - include "build/data/code/sequence.bss.o" - include "build/src/audio/session_config.o" - include "build/src/code/jpegutils.o" - include "build/src/code/jpegdecoder.o" - include_data_with_rodata "build/src/code/z_game_over.o" - include "build/src/code/z_construct.o" - include "build/data/code/audio_tables.rodata.o" - include "build/data/code/aspMain.rodata.o" - include "build/data/code/gspF3DZEX2.NoN.PosLight.fifo.rodata.o" - include "build/data/code/gspS2DEX2.fifo.rodata.o" - include "build/data/code/njpgdspMain.rodata.o" + include "$(BUILD_DIR)/src/audio/sfx_params.o" + include "$(BUILD_DIR)/src/audio/sfx.o" + include "$(BUILD_DIR)/src/audio/sequence.o" + include "$(BUILD_DIR)/data/code/sequence.bss.o" + include "$(BUILD_DIR)/src/audio/session_config.o" + include "$(BUILD_DIR)/src/code/jpegutils.o" + include "$(BUILD_DIR)/src/code/jpegdecoder.o" + include_data_with_rodata "$(BUILD_DIR)/src/code/z_game_over.o" + include "$(BUILD_DIR)/src/code/z_construct.o" + include "$(BUILD_DIR)/data/code/audio_tables.rodata.o" + include "$(BUILD_DIR)/data/code/aspMain.rodata.o" + include "$(BUILD_DIR)/data/code/gspF3DZEX2.NoN.PosLight.fifo.rodata.o" + include "$(BUILD_DIR)/data/code/gspS2DEX2.fifo.rodata.o" + include "$(BUILD_DIR)/data/code/njpgdspMain.rodata.o" endseg // The game expects all the segments after the `code` segment and before the first overlay to be `NOLOAD` ones @@ -628,17 +628,17 @@ endseg beginseg name "buffers" flags NOLOAD - include "build/src/buffers/gfxyield.o" - include "build/src/buffers/gfxstack.o" - include "build/src/buffers/gfxpools.o" - include "build/src/buffers/audio_heap.o" + include "$(BUILD_DIR)/src/buffers/gfxyield.o" + include "$(BUILD_DIR)/src/buffers/gfxstack.o" + include "$(BUILD_DIR)/src/buffers/gfxpools.o" + include "$(BUILD_DIR)/src/buffers/audio_heap.o" endseg beginseg name "system_heap" flags NOLOAD // This segment is just a dummy that is used to know where the other buffers (non framebuffers) end - include "build/src/buffers/system_heap.o" + include "$(BUILD_DIR)/src/buffers/system_heap.o" endseg beginseg @@ -646,4351 +646,4351 @@ beginseg flags NOLOAD // This has to be fixed location in VRAM. See the FRAMEBUFFERS_START_ADDR define on `buffers.h` for a more in-depth explanation address 0x80780000 - include "build/src/buffers/framebuffer_hi.o" + include "$(BUILD_DIR)/src/buffers/framebuffer_hi.o" endseg beginseg name "ovl_title" compress address 0x80800000 - include "build/src/overlays/gamestates/ovl_title/z_title.o" - include "build/src/overlays/gamestates/ovl_title/ovl_title_reloc.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_title/z_title.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_title/ovl_title_reloc.o" endseg beginseg name "ovl_select" compress - include "build/src/overlays/gamestates/ovl_select/z_select.o" - include "build/src/overlays/gamestates/ovl_select/ovl_select_reloc.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_select/z_select.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_select/ovl_select_reloc.o" endseg beginseg name "ovl_opening" compress - include "build/src/overlays/gamestates/ovl_opening/z_opening.o" - include "build/src/overlays/gamestates/ovl_opening/ovl_opening_reloc.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_opening/z_opening.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_opening/ovl_opening_reloc.o" endseg beginseg name "ovl_file_choose" compress - include "build/src/overlays/gamestates/ovl_file_choose/z_file_nameset_data.o" - include "build/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o" - include "build/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.o" - include "build/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.o" - include "build/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_nameset_data.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o" endseg beginseg name "ovl_daytelop" compress - include "build/src/overlays/gamestates/ovl_daytelop/z_daytelop.o" - include "build/src/overlays/gamestates/ovl_daytelop/ovl_daytelop_reloc.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_daytelop/z_daytelop.o" + include "$(BUILD_DIR)/src/overlays/gamestates/ovl_daytelop/ovl_daytelop_reloc.o" endseg beginseg name "ovl_kaleido_scope" compress - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_prompt.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.o" - include "build/src/overlays/kaleido_scope/ovl_kaleido_scope/ovl_kaleido_scope_reloc.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_prompt.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.o" + include "$(BUILD_DIR)/src/overlays/kaleido_scope/ovl_kaleido_scope/ovl_kaleido_scope_reloc.o" endseg beginseg name "ovl_player_actor" compress - include "build/src/overlays/actors/ovl_player_actor/z_player.o" - include "build/src/overlays/actors/ovl_player_actor/ovl_player_actor_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_player_actor/z_player.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_player_actor/ovl_player_actor_reloc.o" endseg beginseg name "ovl_En_Test" compress - include "build/src/overlays/actors/ovl_En_Test/z_en_test.o" - include "build/src/overlays/actors/ovl_En_Test/ovl_En_Test_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test/z_en_test.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test/ovl_En_Test_reloc.o" endseg beginseg name "ovl_En_GirlA" compress - include "build/src/overlays/actors/ovl_En_GirlA/z_en_girla.o" - include "build/src/overlays/actors/ovl_En_GirlA/ovl_En_GirlA_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/z_en_girla.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/ovl_En_GirlA_reloc.o" endseg beginseg name "ovl_En_Part" compress - include "build/src/overlays/actors/ovl_En_Part/z_en_part.o" - include "build/src/overlays/actors/ovl_En_Part/ovl_En_Part_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/z_en_part.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/ovl_En_Part_reloc.o" endseg beginseg name "ovl_En_Light" compress - include "build/src/overlays/actors/ovl_En_Light/z_en_light.o" - include "build/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/z_en_light.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o" endseg beginseg name "ovl_En_Door" compress - include "build/src/overlays/actors/ovl_En_Door/z_en_door.o" - include "build/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/z_en_door.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o" endseg beginseg name "ovl_En_Box" compress - include "build/src/overlays/actors/ovl_En_Box/z_en_box.o" - include "build/src/overlays/actors/ovl_En_Box/ovl_En_Box_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/z_en_box.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/ovl_En_Box_reloc.o" endseg beginseg name "ovl_En_Pametfrog" compress - include "build/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.o" - include "build/src/overlays/actors/ovl_En_Pametfrog/ovl_En_Pametfrog_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pametfrog/ovl_En_Pametfrog_reloc.o" endseg beginseg name "ovl_En_Okuta" compress - include "build/src/overlays/actors/ovl_En_Okuta/z_en_okuta.o" - include "build/data/ovl_En_Okuta/ovl_En_Okuta.data.o" - include "build/data/ovl_En_Okuta/ovl_En_Okuta.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/z_en_okuta.o" + include "$(BUILD_DIR)/data/ovl_En_Okuta/ovl_En_Okuta.data.o" + include "$(BUILD_DIR)/data/ovl_En_Okuta/ovl_En_Okuta.reloc.o" endseg beginseg name "ovl_En_Bom" compress - include "build/src/overlays/actors/ovl_En_Bom/z_en_bom.o" - include "build/src/overlays/actors/ovl_En_Bom/ovl_En_Bom_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/z_en_bom.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/ovl_En_Bom_reloc.o" endseg beginseg name "ovl_En_Wallmas" compress - include "build/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.o" - include "build/src/overlays/actors/ovl_En_Wallmas/ovl_En_Wallmas_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/ovl_En_Wallmas_reloc.o" endseg beginseg name "ovl_En_Dodongo" compress - include "build/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.o" - include "build/src/overlays/actors/ovl_En_Dodongo/ovl_En_Dodongo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/ovl_En_Dodongo_reloc.o" endseg beginseg name "ovl_En_Firefly" compress - include "build/src/overlays/actors/ovl_En_Firefly/z_en_firefly.o" - include "build/src/overlays/actors/ovl_En_Firefly/ovl_En_Firefly_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/z_en_firefly.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/ovl_En_Firefly_reloc.o" endseg beginseg name "ovl_En_Horse" compress - include "build/src/overlays/actors/ovl_En_Horse/z_en_horse.o" - include "build/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/z_en_horse.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o" endseg beginseg name "ovl_En_Arrow" compress - include "build/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o" - include "build/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o" endseg beginseg name "ovl_En_Elf" compress - include "build/src/overlays/actors/ovl_En_Elf/z_en_elf.o" - include "build/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/z_en_elf.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o" endseg beginseg name "ovl_En_Niw" compress - include "build/src/overlays/actors/ovl_En_Niw/z_en_niw.o" - include "build/src/overlays/actors/ovl_En_Niw/ovl_En_Niw_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/z_en_niw.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/ovl_En_Niw_reloc.o" endseg beginseg name "ovl_En_Tite" compress - include "build/src/overlays/actors/ovl_En_Tite/z_en_tite.o" - include "build/src/overlays/actors/ovl_En_Tite/ovl_En_Tite_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/z_en_tite.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/ovl_En_Tite_reloc.o" endseg beginseg name "ovl_En_Peehat" compress - include "build/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o" - include "build/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o" endseg beginseg name "ovl_En_Holl" compress - include "build/src/overlays/actors/ovl_En_Holl/z_en_holl.o" - include "build/src/overlays/actors/ovl_En_Holl/ovl_En_Holl_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/z_en_holl.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/ovl_En_Holl_reloc.o" endseg beginseg name "ovl_En_Dinofos" compress - include "build/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.o" - include "build/src/overlays/actors/ovl_En_Dinofos/ovl_En_Dinofos_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dinofos/ovl_En_Dinofos_reloc.o" endseg beginseg name "ovl_En_Hata" compress - include "build/src/overlays/actors/ovl_En_Hata/z_en_hata.o" - include "build/src/overlays/actors/ovl_En_Hata/ovl_En_Hata_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/z_en_hata.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/ovl_En_Hata_reloc.o" endseg beginseg name "ovl_En_Zl1" compress - include "build/src/overlays/actors/ovl_En_Zl1/z_en_zl1.o" - include "build/src/overlays/actors/ovl_En_Zl1/ovl_En_Zl1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/ovl_En_Zl1_reloc.o" endseg beginseg name "ovl_En_Viewer" compress - include "build/src/overlays/actors/ovl_En_Viewer/z_en_viewer.o" - include "build/src/overlays/actors/ovl_En_Viewer/ovl_En_Viewer_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/z_en_viewer.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/ovl_En_Viewer_reloc.o" endseg beginseg name "ovl_En_Bubble" compress - include "build/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o" - include "build/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o" endseg beginseg name "ovl_Door_Shutter" compress - include "build/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.o" - include "build/src/overlays/actors/ovl_Door_Shutter/ovl_Door_Shutter_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/ovl_Door_Shutter_reloc.o" endseg beginseg name "ovl_En_Boom" compress - include "build/src/overlays/actors/ovl_En_Boom/z_en_boom.o" - include "build/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/z_en_boom.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o" endseg beginseg name "ovl_En_Torch2" compress - include "build/src/overlays/actors/ovl_En_Torch2/z_en_torch2.o" - include "build/src/overlays/actors/ovl_En_Torch2/ovl_En_Torch2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/z_en_torch2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/ovl_En_Torch2_reloc.o" endseg beginseg name "ovl_En_Minifrog" compress - include "build/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.o" - include "build/src/overlays/actors/ovl_En_Minifrog/ovl_En_Minifrog_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Minifrog/ovl_En_Minifrog_reloc.o" endseg beginseg name "ovl_En_St" compress - include "build/src/overlays/actors/ovl_En_St/z_en_st.o" - include "build/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/z_en_st.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o" endseg beginseg name "ovl_Obj_Wturn" compress - include "build/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.o" - include "build/src/overlays/actors/ovl_Obj_Wturn/ovl_Obj_Wturn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Wturn/ovl_Obj_Wturn_reloc.o" endseg beginseg name "ovl_En_River_Sound" compress - include "build/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o" - include "build/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o" endseg beginseg name "ovl_En_Ossan" compress - include "build/src/overlays/actors/ovl_En_Ossan/z_en_ossan.o" - include "build/src/overlays/actors/ovl_En_Ossan/ovl_En_Ossan_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/z_en_ossan.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/ovl_En_Ossan_reloc.o" endseg beginseg name "ovl_En_Famos" compress - include "build/src/overlays/actors/ovl_En_Famos/z_en_famos.o" - include "build/src/overlays/actors/ovl_En_Famos/ovl_En_Famos_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Famos/z_en_famos.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Famos/ovl_En_Famos_reloc.o" endseg beginseg name "ovl_En_Bombf" compress - include "build/src/overlays/actors/ovl_En_Bombf/z_en_bombf.o" - include "build/src/overlays/actors/ovl_En_Bombf/ovl_En_Bombf_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/z_en_bombf.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/ovl_En_Bombf_reloc.o" endseg beginseg name "ovl_En_Am" compress - include "build/src/overlays/actors/ovl_En_Am/z_en_am.o" - include "build/src/overlays/actors/ovl_En_Am/ovl_En_Am_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/z_en_am.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/ovl_En_Am_reloc.o" endseg beginseg name "ovl_En_Dekubaba" compress - include "build/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.o" - include "build/src/overlays/actors/ovl_En_Dekubaba/ovl_En_Dekubaba_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/ovl_En_Dekubaba_reloc.o" endseg beginseg name "ovl_En_M_Fire1" compress - include "build/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.o" - include "build/src/overlays/actors/ovl_En_M_Fire1/ovl_En_M_Fire1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/ovl_En_M_Fire1_reloc.o" endseg beginseg name "ovl_En_M_Thunder" compress - include "build/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.o" - include "build/src/overlays/actors/ovl_En_M_Thunder/ovl_En_M_Thunder_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/ovl_En_M_Thunder_reloc.o" endseg beginseg name "ovl_Bg_Breakwall" compress - include "build/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.o" - include "build/src/overlays/actors/ovl_Bg_Breakwall/ovl_Bg_Breakwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/ovl_Bg_Breakwall_reloc.o" endseg beginseg name "ovl_Door_Warp1" compress - include "build/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o" - include "build/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o" endseg beginseg name "ovl_Obj_Syokudai" compress - include "build/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.o" - include "build/src/overlays/actors/ovl_Obj_Syokudai/ovl_Obj_Syokudai_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/ovl_Obj_Syokudai_reloc.o" endseg beginseg name "ovl_Item_B_Heart" compress - include "build/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o" - include "build/src/overlays/actors/ovl_Item_B_Heart/ovl_Item_B_Heart_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/ovl_Item_B_Heart_reloc.o" endseg beginseg name "ovl_En_Dekunuts" compress - include "build/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.o" - include "build/src/overlays/actors/ovl_En_Dekunuts/ovl_En_Dekunuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/ovl_En_Dekunuts_reloc.o" endseg beginseg name "ovl_En_Bbfall" compress - include "build/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.o" - include "build/src/overlays/actors/ovl_En_Bbfall/ovl_En_Bbfall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bbfall/ovl_En_Bbfall_reloc.o" endseg beginseg name "ovl_Arms_Hook" compress - include "build/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o" - include "build/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o" endseg beginseg name "ovl_En_Bb" compress - include "build/src/overlays/actors/ovl_En_Bb/z_en_bb.o" - include "build/src/overlays/actors/ovl_En_Bb/ovl_En_Bb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/z_en_bb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/ovl_En_Bb_reloc.o" endseg beginseg name "ovl_Bg_Keikoku_Spr" compress - include "build/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.o" - include "build/src/overlays/actors/ovl_Bg_Keikoku_Spr/ovl_Bg_Keikoku_Spr_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Keikoku_Spr/ovl_Bg_Keikoku_Spr_reloc.o" endseg beginseg name "ovl_En_Wood02" compress - include "build/src/overlays/actors/ovl_En_Wood02/z_en_wood02.o" - include "build/src/overlays/actors/ovl_En_Wood02/ovl_En_Wood02_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/z_en_wood02.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/ovl_En_Wood02_reloc.o" endseg beginseg name "ovl_En_Death" compress - include "build/src/overlays/actors/ovl_En_Death/z_en_death.o" - include "build/data/ovl_En_Death/ovl_En_Death.data.o" - include "build/data/ovl_En_Death/ovl_En_Death.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Death/z_en_death.o" + include "$(BUILD_DIR)/data/ovl_En_Death/ovl_En_Death.data.o" + include "$(BUILD_DIR)/data/ovl_En_Death/ovl_En_Death.reloc.o" endseg beginseg name "ovl_En_Minideath" compress - include "build/src/overlays/actors/ovl_En_Minideath/z_en_minideath.o" - include "build/data/ovl_En_Minideath/ovl_En_Minideath.data.o" - include "build/data/ovl_En_Minideath/ovl_En_Minideath.bss.o" - include "build/data/ovl_En_Minideath/ovl_En_Minideath.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Minideath/z_en_minideath.o" + include "$(BUILD_DIR)/data/ovl_En_Minideath/ovl_En_Minideath.data.o" + include "$(BUILD_DIR)/data/ovl_En_Minideath/ovl_En_Minideath.bss.o" + include "$(BUILD_DIR)/data/ovl_En_Minideath/ovl_En_Minideath.reloc.o" endseg beginseg name "ovl_En_Vm" compress - include "build/src/overlays/actors/ovl_En_Vm/z_en_vm.o" - include "build/src/overlays/actors/ovl_En_Vm/ovl_En_Vm_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/z_en_vm.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/ovl_En_Vm_reloc.o" endseg beginseg name "ovl_Demo_Effect" compress - include "build/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.o" - include "build/src/overlays/actors/ovl_Demo_Effect/ovl_Demo_Effect_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/ovl_Demo_Effect_reloc.o" endseg beginseg name "ovl_Demo_Kankyo" compress - include "build/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o" - include "build/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o" endseg beginseg name "ovl_En_Floormas" compress - include "build/src/overlays/actors/ovl_En_Floormas/z_en_floormas.o" - include "build/src/overlays/actors/ovl_En_Floormas/ovl_En_Floormas_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/z_en_floormas.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/ovl_En_Floormas_reloc.o" endseg beginseg name "ovl_En_Rd" compress - include "build/src/overlays/actors/ovl_En_Rd/z_en_rd.o" - include "build/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/z_en_rd.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o" endseg beginseg name "ovl_Bg_F40_Flift" compress - include "build/src/overlays/actors/ovl_Bg_F40_Flift/z_bg_f40_flift.o" - include "build/src/overlays/actors/ovl_Bg_F40_Flift/ovl_Bg_F40_Flift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Flift/z_bg_f40_flift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Flift/ovl_Bg_F40_Flift_reloc.o" endseg beginseg name "ovl_Obj_Mure" compress - include "build/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o" - include "build/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o" endseg beginseg name "ovl_En_Sw" compress - include "build/src/overlays/actors/ovl_En_Sw/z_en_sw.o" - include "build/src/overlays/actors/ovl_En_Sw/ovl_En_Sw_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/z_en_sw.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/ovl_En_Sw_reloc.o" endseg beginseg name "ovl_Object_Kankyo" compress - include "build/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o" - include "build/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o" endseg beginseg name "ovl_En_Horse_Link_Child" compress - include "build/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.o" - include "build/src/overlays/actors/ovl_En_Horse_Link_Child/ovl_En_Horse_Link_Child_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/ovl_En_Horse_Link_Child_reloc.o" endseg beginseg name "ovl_Door_Ana" compress - include "build/src/overlays/actors/ovl_Door_Ana/z_door_ana.o" - include "build/src/overlays/actors/ovl_Door_Ana/ovl_Door_Ana_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/z_door_ana.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/ovl_Door_Ana_reloc.o" endseg beginseg name "ovl_En_Encount1" compress - include "build/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o" - include "build/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o" endseg beginseg name "ovl_Demo_Tre_Lgt" compress - include "build/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.o" - include "build/src/overlays/actors/ovl_Demo_Tre_Lgt/ovl_Demo_Tre_Lgt_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/ovl_Demo_Tre_Lgt_reloc.o" endseg beginseg name "ovl_En_Encount2" compress - include "build/src/overlays/actors/ovl_En_Encount2/z_en_encount2.o" - include "build/src/overlays/actors/ovl_En_Encount2/ovl_En_Encount2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/z_en_encount2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/ovl_En_Encount2_reloc.o" endseg beginseg name "ovl_En_Fire_Rock" compress - include "build/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.o" - include "build/src/overlays/actors/ovl_En_Fire_Rock/ovl_En_Fire_Rock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/ovl_En_Fire_Rock_reloc.o" endseg beginseg name "ovl_Bg_Ctower_Rot" compress - include "build/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.o" - include "build/src/overlays/actors/ovl_Bg_Ctower_Rot/ovl_Bg_Ctower_Rot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ctower_Rot/ovl_Bg_Ctower_Rot_reloc.o" endseg beginseg name "ovl_Mir_Ray" compress - include "build/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.o" - include "build/src/overlays/actors/ovl_Mir_Ray/ovl_Mir_Ray_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/ovl_Mir_Ray_reloc.o" endseg beginseg name "ovl_En_Sb" compress - include "build/src/overlays/actors/ovl_En_Sb/z_en_sb.o" - include "build/src/overlays/actors/ovl_En_Sb/ovl_En_Sb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/z_en_sb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/ovl_En_Sb_reloc.o" endseg beginseg name "ovl_En_Bigslime" compress - include "build/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.o" - include "build/src/overlays/actors/ovl_En_Bigslime/ovl_En_Bigslime_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigslime/ovl_En_Bigslime_reloc.o" endseg beginseg name "ovl_En_Karebaba" compress - include "build/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.o" - include "build/src/overlays/actors/ovl_En_Karebaba/ovl_En_Karebaba_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/ovl_En_Karebaba_reloc.o" endseg beginseg name "ovl_En_In" compress - include "build/src/overlays/actors/ovl_En_In/z_en_in.o" - include "build/src/overlays/actors/ovl_En_In/ovl_En_In_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/z_en_in.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/ovl_En_In_reloc.o" endseg beginseg name "ovl_En_Bom_Chu" compress - include "build/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.o" - include "build/src/overlays/actors/ovl_En_Bom_Chu/ovl_En_Bom_Chu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/ovl_En_Bom_Chu_reloc.o" endseg beginseg name "ovl_En_Horse_Game_Check" compress - include "build/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.o" - include "build/src/overlays/actors/ovl_En_Horse_Game_Check/ovl_En_Horse_Game_Check_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/ovl_En_Horse_Game_Check_reloc.o" endseg beginseg name "ovl_En_Rr" compress - include "build/src/overlays/actors/ovl_En_Rr/z_en_rr.o" - include "build/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/z_en_rr.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o" endseg beginseg name "ovl_En_Fr" compress - include "build/src/overlays/actors/ovl_En_Fr/z_en_fr.o" - include "build/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/z_en_fr.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o" endseg beginseg name "ovl_En_Fishing" compress - include "build/src/overlays/actors/ovl_En_Fishing/z_en_fishing.o" - include "build/src/overlays/actors/ovl_En_Fishing/ovl_En_Fishing_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fishing/z_en_fishing.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fishing/ovl_En_Fishing_reloc.o" endseg beginseg name "ovl_Obj_Oshihiki" compress - include "build/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.o" - include "build/src/overlays/actors/ovl_Obj_Oshihiki/ovl_Obj_Oshihiki_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/ovl_Obj_Oshihiki_reloc.o" endseg beginseg name "ovl_Eff_Dust" compress - include "build/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.o" - include "build/src/overlays/actors/ovl_Eff_Dust/ovl_Eff_Dust_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/ovl_Eff_Dust_reloc.o" endseg beginseg name "ovl_Bg_Umajump" compress - include "build/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.o" - include "build/src/overlays/actors/ovl_Bg_Umajump/ovl_Bg_Umajump_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/ovl_Bg_Umajump_reloc.o" endseg beginseg name "ovl_En_Insect" compress - include "build/src/overlays/actors/ovl_En_Insect/z_en_insect.o" - include "build/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/z_en_insect.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o" endseg beginseg name "ovl_En_Butte" compress - include "build/src/overlays/actors/ovl_En_Butte/z_en_butte.o" - include "build/src/overlays/actors/ovl_En_Butte/ovl_En_Butte_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/z_en_butte.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/ovl_En_Butte_reloc.o" endseg beginseg name "ovl_En_Fish" compress - include "build/src/overlays/actors/ovl_En_Fish/z_en_fish.o" - include "build/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/z_en_fish.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o" endseg beginseg name "ovl_Item_Etcetera" compress - include "build/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o" - include "build/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o" endseg beginseg name "ovl_Arrow_Fire" compress - include "build/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o" - include "build/src/overlays/actors/ovl_Arrow_Fire/ovl_Arrow_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/ovl_Arrow_Fire_reloc.o" endseg beginseg name "ovl_Arrow_Ice" compress - include "build/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o" - include "build/src/overlays/actors/ovl_Arrow_Ice/ovl_Arrow_Ice_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/ovl_Arrow_Ice_reloc.o" endseg beginseg name "ovl_Arrow_Light" compress - include "build/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.o" - include "build/src/overlays/actors/ovl_Arrow_Light/ovl_Arrow_Light_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/ovl_Arrow_Light_reloc.o" endseg beginseg name "ovl_Obj_Kibako" compress - include "build/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.o" - include "build/src/overlays/actors/ovl_Obj_Kibako/ovl_Obj_Kibako_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/ovl_Obj_Kibako_reloc.o" endseg beginseg name "ovl_Obj_Tsubo" compress - include "build/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o" - include "build/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o" endseg beginseg name "ovl_En_Ik" compress - include "build/src/overlays/actors/ovl_En_Ik/z_en_ik.o" - include "build/src/overlays/actors/ovl_En_Ik/ovl_En_Ik_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/z_en_ik.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/ovl_En_Ik_reloc.o" endseg beginseg name "ovl_Demo_Shd" compress - include "build/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.o" - include "build/src/overlays/actors/ovl_Demo_Shd/ovl_Demo_Shd_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/ovl_Demo_Shd_reloc.o" endseg beginseg name "ovl_En_Dns" compress - include "build/src/overlays/actors/ovl_En_Dns/z_en_dns.o" - include "build/src/overlays/actors/ovl_En_Dns/ovl_En_Dns_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/z_en_dns.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/ovl_En_Dns_reloc.o" endseg beginseg name "ovl_Elf_Msg" compress - include "build/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.o" - include "build/src/overlays/actors/ovl_Elf_Msg/ovl_Elf_Msg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/ovl_Elf_Msg_reloc.o" endseg beginseg name "ovl_En_Honotrap" compress - include "build/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.o" - include "build/src/overlays/actors/ovl_En_Honotrap/ovl_En_Honotrap_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/ovl_En_Honotrap_reloc.o" endseg beginseg name "ovl_En_Tubo_Trap" compress - include "build/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.o" - include "build/src/overlays/actors/ovl_En_Tubo_Trap/ovl_En_Tubo_Trap_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/ovl_En_Tubo_Trap_reloc.o" endseg beginseg name "ovl_Obj_Ice_Poly" compress - include "build/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.o" - include "build/src/overlays/actors/ovl_Obj_Ice_Poly/ovl_Obj_Ice_Poly_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/ovl_Obj_Ice_Poly_reloc.o" endseg beginseg name "ovl_En_Fz" compress - include "build/src/overlays/actors/ovl_En_Fz/z_en_fz.o" - include "build/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/z_en_fz.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o" endseg beginseg name "ovl_En_Kusa" compress - include "build/src/overlays/actors/ovl_En_Kusa/z_en_kusa.o" - include "build/src/overlays/actors/ovl_En_Kusa/ovl_En_Kusa_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/z_en_kusa.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/ovl_En_Kusa_reloc.o" endseg beginseg name "ovl_Obj_Bean" compress - include "build/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.o" - include "build/src/overlays/actors/ovl_Obj_Bean/ovl_Obj_Bean_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/ovl_Obj_Bean_reloc.o" endseg beginseg name "ovl_Obj_Bombiwa" compress - include "build/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.o" - include "build/src/overlays/actors/ovl_Obj_Bombiwa/ovl_Obj_Bombiwa_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/ovl_Obj_Bombiwa_reloc.o" endseg beginseg name "ovl_Obj_Switch" compress - include "build/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.o" - include "build/src/overlays/actors/ovl_Obj_Switch/ovl_Obj_Switch_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/ovl_Obj_Switch_reloc.o" endseg beginseg name "ovl_Obj_Lift" compress - include "build/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.o" - include "build/src/overlays/actors/ovl_Obj_Lift/ovl_Obj_Lift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/ovl_Obj_Lift_reloc.o" endseg beginseg name "ovl_Obj_Hsblock" compress - include "build/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o" - include "build/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o" endseg beginseg name "ovl_En_Okarina_Tag" compress - include "build/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.o" - include "build/src/overlays/actors/ovl_En_Okarina_Tag/ovl_En_Okarina_Tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/ovl_En_Okarina_Tag_reloc.o" endseg beginseg name "ovl_En_Goroiwa" compress - include "build/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o" - include "build/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o" endseg beginseg name "ovl_En_Daiku" compress - include "build/src/overlays/actors/ovl_En_Daiku/z_en_daiku.o" - include "build/src/overlays/actors/ovl_En_Daiku/ovl_En_Daiku_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/z_en_daiku.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/ovl_En_Daiku_reloc.o" endseg beginseg name "ovl_En_Nwc" compress - include "build/src/overlays/actors/ovl_En_Nwc/z_en_nwc.o" - include "build/src/overlays/actors/ovl_En_Nwc/ovl_En_Nwc_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/z_en_nwc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/ovl_En_Nwc_reloc.o" endseg beginseg name "ovl_Item_Inbox" compress - include "build/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.o" - include "build/src/overlays/actors/ovl_Item_Inbox/ovl_Item_Inbox_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/ovl_Item_Inbox_reloc.o" endseg beginseg name "ovl_En_Ge1" compress - include "build/src/overlays/actors/ovl_En_Ge1/z_en_ge1.o" - include "build/src/overlays/actors/ovl_En_Ge1/ovl_En_Ge1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/z_en_ge1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/ovl_En_Ge1_reloc.o" endseg beginseg name "ovl_Obj_Blockstop" compress - include "build/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.o" - include "build/src/overlays/actors/ovl_Obj_Blockstop/ovl_Obj_Blockstop_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/ovl_Obj_Blockstop_reloc.o" endseg beginseg name "ovl_En_Sda" compress - include "build/src/overlays/actors/ovl_En_Sda/z_en_sda.o" - include "build/src/overlays/actors/ovl_En_Sda/ovl_En_Sda_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/z_en_sda.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/ovl_En_Sda_reloc.o" endseg beginseg name "ovl_En_Clear_Tag" compress - include "build/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.o" - include "build/src/overlays/actors/ovl_En_Clear_Tag/ovl_En_Clear_Tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/ovl_En_Clear_Tag_reloc.o" endseg beginseg name "ovl_En_Gm" compress - include "build/src/overlays/actors/ovl_En_Gm/z_en_gm.o" - include "build/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/z_en_gm.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o" endseg beginseg name "ovl_En_Ms" compress - include "build/src/overlays/actors/ovl_En_Ms/z_en_ms.o" - include "build/src/overlays/actors/ovl_En_Ms/ovl_En_Ms_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/z_en_ms.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/ovl_En_Ms_reloc.o" endseg beginseg name "ovl_En_Hs" compress - include "build/src/overlays/actors/ovl_En_Hs/z_en_hs.o" - include "build/src/overlays/actors/ovl_En_Hs/ovl_En_Hs_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/z_en_hs.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/ovl_En_Hs_reloc.o" endseg beginseg name "ovl_Bg_Ingate" compress - include "build/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.o" - include "build/src/overlays/actors/ovl_Bg_Ingate/ovl_Bg_Ingate_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/ovl_Bg_Ingate_reloc.o" endseg beginseg name "ovl_En_Kanban" compress - include "build/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o" - include "build/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o" endseg beginseg name "ovl_En_Attack_Niw" compress - include "build/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o" - include "build/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o" endseg beginseg name "ovl_En_Mk" compress - include "build/src/overlays/actors/ovl_En_Mk/z_en_mk.o" - include "build/src/overlays/actors/ovl_En_Mk/ovl_En_Mk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/z_en_mk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/ovl_En_Mk_reloc.o" endseg beginseg name "ovl_En_Owl" compress - include "build/src/overlays/actors/ovl_En_Owl/z_en_owl.o" - include "build/src/overlays/actors/ovl_En_Owl/ovl_En_Owl_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/z_en_owl.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/ovl_En_Owl_reloc.o" endseg beginseg name "ovl_En_Ishi" compress - include "build/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o" - include "build/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o" endseg beginseg name "ovl_Obj_Hana" compress - include "build/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.o" - include "build/src/overlays/actors/ovl_Obj_Hana/ovl_Obj_Hana_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/ovl_Obj_Hana_reloc.o" endseg beginseg name "ovl_Obj_Lightswitch" compress - include "build/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o" - include "build/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o" endseg beginseg name "ovl_Obj_Mure2" compress - include "build/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o" - include "build/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o" endseg beginseg name "ovl_En_Fu" compress - include "build/src/overlays/actors/ovl_En_Fu/z_en_fu.o" - include "build/src/overlays/actors/ovl_En_Fu/ovl_En_Fu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/z_en_fu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/ovl_En_Fu_reloc.o" endseg beginseg name "ovl_En_Stream" compress - include "build/src/overlays/actors/ovl_En_Stream/z_en_stream.o" - include "build/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/z_en_stream.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o" endseg beginseg name "ovl_En_Mm" compress - include "build/src/overlays/actors/ovl_En_Mm/z_en_mm.o" - include "build/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/z_en_mm.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o" endseg beginseg name "ovl_En_Weather_Tag" compress - include "build/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o" - include "build/src/overlays/actors/ovl_En_Weather_Tag/ovl_En_Weather_Tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/ovl_En_Weather_Tag_reloc.o" endseg beginseg name "ovl_En_Ani" compress - include "build/src/overlays/actors/ovl_En_Ani/z_en_ani.o" - include "build/src/overlays/actors/ovl_En_Ani/ovl_En_Ani_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/z_en_ani.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/ovl_En_Ani_reloc.o" endseg beginseg name "ovl_En_Js" compress - include "build/src/overlays/actors/ovl_En_Js/z_en_js.o" - include "build/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/z_en_js.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o" endseg beginseg name "ovl_En_Okarina_Effect" compress - include "build/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o" - include "build/src/overlays/actors/ovl_En_Okarina_Effect/ovl_En_Okarina_Effect_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/ovl_En_Okarina_Effect_reloc.o" endseg beginseg name "ovl_En_Mag" compress - include "build/src/overlays/actors/ovl_En_Mag/z_en_mag.o" - include "build/src/overlays/actors/ovl_En_Mag/ovl_En_Mag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/ovl_En_Mag_reloc.o" endseg beginseg name "ovl_Elf_Msg2" compress - include "build/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.o" - include "build/src/overlays/actors/ovl_Elf_Msg2/ovl_Elf_Msg2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/ovl_Elf_Msg2_reloc.o" endseg beginseg name "ovl_Bg_F40_Swlift" compress - include "build/src/overlays/actors/ovl_Bg_F40_Swlift/z_bg_f40_swlift.o" - include "build/src/overlays/actors/ovl_Bg_F40_Swlift/ovl_Bg_F40_Swlift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Swlift/z_bg_f40_swlift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Swlift/ovl_Bg_F40_Swlift_reloc.o" endseg beginseg name "ovl_En_Kakasi" compress - include "build/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o" - include "build/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o" endseg beginseg name "ovl_Obj_Makeoshihiki" compress - include "build/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.o" - include "build/src/overlays/actors/ovl_Obj_Makeoshihiki/ovl_Obj_Makeoshihiki_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/ovl_Obj_Makeoshihiki_reloc.o" endseg beginseg name "ovl_Oceff_Spot" compress - include "build/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o" - include "build/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o" endseg beginseg name "ovl_En_Torch" compress - include "build/src/overlays/actors/ovl_En_Torch/z_en_torch.o" - include "build/src/overlays/actors/ovl_En_Torch/ovl_En_Torch_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/z_en_torch.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/ovl_En_Torch_reloc.o" endseg beginseg name "ovl_Shot_Sun" compress - include "build/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o" - include "build/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o" endseg beginseg name "ovl_Obj_Roomtimer" compress - include "build/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o" - include "build/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o" endseg beginseg name "ovl_En_Ssh" compress - include "build/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o" - include "build/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o" endseg beginseg name "ovl_Oceff_Wipe" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe/ovl_Oceff_Wipe_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/ovl_Oceff_Wipe_reloc.o" endseg beginseg name "ovl_Effect_Ss_Dust" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Dust/ovl_Effect_Ss_Dust_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/ovl_Effect_Ss_Dust_reloc.o" endseg beginseg name "ovl_Effect_Ss_Kirakira" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Kirakira/ovl_Effect_Ss_Kirakira_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kirakira/ovl_Effect_Ss_Kirakira_reloc.o" endseg beginseg name "ovl_Effect_Ss_Bomb2" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Bomb2/ovl_Effect_Ss_Bomb2_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/ovl_Effect_Ss_Bomb2_reloc.o" endseg beginseg name "ovl_Effect_Ss_Blast" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o" endseg beginseg name "ovl_Effect_Ss_G_Spk" compress - include "build/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.o" - include "build/src/overlays/effects/ovl_Effect_Ss_G_Spk/ovl_Effect_Ss_G_Spk_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/ovl_Effect_Ss_G_Spk_reloc.o" endseg beginseg name "ovl_Effect_Ss_D_Fire" compress - include "build/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.o" - include "build/src/overlays/effects/ovl_Effect_Ss_D_Fire/ovl_Effect_Ss_D_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/ovl_Effect_Ss_D_Fire_reloc.o" endseg beginseg name "ovl_Effect_Ss_Bubble" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Bubble/ovl_Effect_Ss_Bubble_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/ovl_Effect_Ss_Bubble_reloc.o" endseg beginseg name "ovl_Effect_Ss_G_Ripple" compress - include "build/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.o" - include "build/src/overlays/effects/ovl_Effect_Ss_G_Ripple/ovl_Effect_Ss_G_Ripple_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/ovl_Effect_Ss_G_Ripple_reloc.o" endseg beginseg name "ovl_Effect_Ss_G_Splash" compress - include "build/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.o" - include "build/src/overlays/effects/ovl_Effect_Ss_G_Splash/ovl_Effect_Ss_G_Splash_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/ovl_Effect_Ss_G_Splash_reloc.o" endseg beginseg name "ovl_Effect_Ss_G_Fire" compress - include "build/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.o" - include "build/src/overlays/effects/ovl_Effect_Ss_G_Fire/ovl_Effect_Ss_G_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/ovl_Effect_Ss_G_Fire_reloc.o" endseg beginseg name "ovl_Effect_Ss_Lightning" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Lightning/ovl_Effect_Ss_Lightning_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/ovl_Effect_Ss_Lightning_reloc.o" endseg beginseg name "ovl_Effect_Ss_Dt_Bubble" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/ovl_Effect_Ss_Dt_Bubble_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/ovl_Effect_Ss_Dt_Bubble_reloc.o" endseg beginseg name "ovl_Effect_Ss_Hahen" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o" endseg beginseg name "ovl_Effect_Ss_Stick" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o" endseg beginseg name "ovl_Effect_Ss_Sibuki" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Sibuki/ovl_Effect_Ss_Sibuki_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/ovl_Effect_Ss_Sibuki_reloc.o" endseg beginseg name "ovl_Effect_Ss_Stone1" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Stone1/ovl_Effect_Ss_Stone1_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/ovl_Effect_Ss_Stone1_reloc.o" endseg beginseg name "ovl_Effect_Ss_Hitmark" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Hitmark/z_eff_ss_hitmark.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Hitmark/ovl_Effect_Ss_Hitmark_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hitmark/z_eff_ss_hitmark.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hitmark/ovl_Effect_Ss_Hitmark_reloc.o" endseg beginseg name "ovl_Effect_Ss_Fhg_Flash" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/ovl_Effect_Ss_Fhg_Flash_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/ovl_Effect_Ss_Fhg_Flash_reloc.o" endseg beginseg name "ovl_Effect_Ss_K_Fire" compress - include "build/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.o" - include "build/src/overlays/effects/ovl_Effect_Ss_K_Fire/ovl_Effect_Ss_K_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/ovl_Effect_Ss_K_Fire_reloc.o" endseg beginseg name "ovl_Effect_Ss_Solder_Srch_Ball" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/ovl_Effect_Ss_Solder_Srch_Ball_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/ovl_Effect_Ss_Solder_Srch_Ball_reloc.o" endseg beginseg name "ovl_Effect_Ss_Kakera" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Kakera/ovl_Effect_Ss_Kakera_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/ovl_Effect_Ss_Kakera_reloc.o" endseg beginseg name "ovl_Effect_Ss_Ice_Piece" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/ovl_Effect_Ss_Ice_Piece_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/ovl_Effect_Ss_Ice_Piece_reloc.o" endseg beginseg name "ovl_Effect_Ss_En_Ice" compress - include "build/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.o" - include "build/src/overlays/effects/ovl_Effect_Ss_En_Ice/ovl_Effect_Ss_En_Ice_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/ovl_Effect_Ss_En_Ice_reloc.o" endseg beginseg name "ovl_Effect_Ss_Fire_Tail" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/ovl_Effect_Ss_Fire_Tail_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/ovl_Effect_Ss_Fire_Tail_reloc.o" endseg beginseg name "ovl_Effect_Ss_En_Fire" compress - include "build/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.o" - include "build/src/overlays/effects/ovl_Effect_Ss_En_Fire/ovl_Effect_Ss_En_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/ovl_Effect_Ss_En_Fire_reloc.o" endseg beginseg name "ovl_Effect_Ss_Extra" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o" endseg beginseg name "ovl_Effect_Ss_Dead_Db" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Db/ovl_Effect_Ss_Dead_Db_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/ovl_Effect_Ss_Dead_Db_reloc.o" endseg beginseg name "ovl_Effect_Ss_Dead_Dd" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o" endseg beginseg name "ovl_Effect_Ss_Dead_Ds" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/ovl_Effect_Ss_Dead_Ds_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/ovl_Effect_Ss_Dead_Ds_reloc.o" endseg beginseg name "ovl_Oceff_Storm" compress - include "build/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.o" - include "build/src/overlays/actors/ovl_Oceff_Storm/ovl_Oceff_Storm_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/ovl_Oceff_Storm_reloc.o" endseg beginseg name "ovl_Obj_Demo" compress - include "build/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.o" - include "build/src/overlays/actors/ovl_Obj_Demo/ovl_Obj_Demo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Demo/ovl_Obj_Demo_reloc.o" endseg beginseg name "ovl_En_Minislime" compress - include "build/src/overlays/actors/ovl_En_Minislime/z_en_minislime.o" - include "build/src/overlays/actors/ovl_En_Minislime/ovl_En_Minislime_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Minislime/z_en_minislime.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Minislime/ovl_En_Minislime_reloc.o" endseg beginseg name "ovl_En_Nutsball" compress - include "build/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.o" - include "build/src/overlays/actors/ovl_En_Nutsball/ovl_En_Nutsball_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/ovl_En_Nutsball_reloc.o" endseg beginseg name "ovl_Oceff_Wipe2" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o" endseg beginseg name "ovl_Oceff_Wipe3" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o" endseg beginseg name "ovl_En_Dg" compress - include "build/src/overlays/actors/ovl_En_Dg/z_en_dg.o" - include "build/src/overlays/actors/ovl_En_Dg/ovl_En_Dg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dg/z_en_dg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dg/ovl_En_Dg_reloc.o" endseg beginseg name "ovl_En_Si" compress - include "build/src/overlays/actors/ovl_En_Si/z_en_si.o" - include "build/src/overlays/actors/ovl_En_Si/ovl_En_Si_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/z_en_si.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/ovl_En_Si_reloc.o" endseg beginseg name "ovl_Obj_Comb" compress - include "build/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o" - include "build/src/overlays/actors/ovl_Obj_Comb/ovl_Obj_Comb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/ovl_Obj_Comb_reloc.o" endseg beginseg name "ovl_Obj_Kibako2" compress - include "build/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.o" - include "build/src/overlays/actors/ovl_Obj_Kibako2/ovl_Obj_Kibako2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/ovl_Obj_Kibako2_reloc.o" endseg beginseg name "ovl_En_Hs2" compress - include "build/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o" - include "build/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o" endseg beginseg name "ovl_Obj_Mure3" compress - include "build/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o" - include "build/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o" endseg beginseg name "ovl_En_Tg" compress - include "build/src/overlays/actors/ovl_En_Tg/z_en_tg.o" - include "build/src/overlays/actors/ovl_En_Tg/ovl_En_Tg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/z_en_tg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/ovl_En_Tg_reloc.o" endseg beginseg name "ovl_En_Wf" compress - include "build/src/overlays/actors/ovl_En_Wf/z_en_wf.o" - include "build/src/overlays/actors/ovl_En_Wf/ovl_En_Wf_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/z_en_wf.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/ovl_En_Wf_reloc.o" endseg beginseg name "ovl_En_Skb" compress - include "build/src/overlays/actors/ovl_En_Skb/z_en_skb.o" - include "build/src/overlays/actors/ovl_En_Skb/ovl_En_Skb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/z_en_skb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/ovl_En_Skb_reloc.o" endseg beginseg name "ovl_En_Gs" compress - include "build/src/overlays/actors/ovl_En_Gs/z_en_gs.o" - include "build/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/z_en_gs.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o" endseg beginseg name "ovl_Obj_Sound" compress - include "build/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.o" - include "build/src/overlays/actors/ovl_Obj_Sound/ovl_Obj_Sound_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Sound/ovl_Obj_Sound_reloc.o" endseg beginseg name "ovl_En_Crow" compress - include "build/src/overlays/actors/ovl_En_Crow/z_en_crow.o" - include "build/src/overlays/actors/ovl_En_Crow/ovl_En_Crow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/z_en_crow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/ovl_En_Crow_reloc.o" endseg beginseg name "ovl_En_Cow" compress - include "build/src/overlays/actors/ovl_En_Cow/z_en_cow.o" - include "build/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/z_en_cow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o" endseg beginseg name "ovl_Oceff_Wipe4" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe4/ovl_Oceff_Wipe4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/ovl_Oceff_Wipe4_reloc.o" endseg beginseg name "ovl_En_Zo" compress - include "build/src/overlays/actors/ovl_En_Zo/z_en_zo.o" - include "build/src/overlays/actors/ovl_En_Zo/ovl_En_Zo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/z_en_zo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/ovl_En_Zo_reloc.o" endseg beginseg name "ovl_Effect_Ss_Ice_Smoke" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o" endseg beginseg name "ovl_Obj_Makekinsuta" compress - include "build/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.o" - include "build/src/overlays/actors/ovl_Obj_Makekinsuta/ovl_Obj_Makekinsuta_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/ovl_Obj_Makekinsuta_reloc.o" endseg beginseg name "ovl_En_Ge3" compress - include "build/src/overlays/actors/ovl_En_Ge3/z_en_ge3.o" - include "build/src/overlays/actors/ovl_En_Ge3/ovl_En_Ge3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/z_en_ge3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/ovl_En_Ge3_reloc.o" endseg beginseg name "ovl_Obj_Hamishi" compress - include "build/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.o" - include "build/src/overlays/actors/ovl_Obj_Hamishi/ovl_Obj_Hamishi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/ovl_Obj_Hamishi_reloc.o" endseg beginseg name "ovl_En_Zl4" compress - include "build/src/overlays/actors/ovl_En_Zl4/z_en_zl4.o" - include "build/data/ovl_En_Zl4/ovl_En_Zl4.data.o" - include "build/data/ovl_En_Zl4/ovl_En_Zl4.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/z_en_zl4.o" + include "$(BUILD_DIR)/data/ovl_En_Zl4/ovl_En_Zl4.data.o" + include "$(BUILD_DIR)/data/ovl_En_Zl4/ovl_En_Zl4.reloc.o" endseg beginseg name "ovl_En_Mm2" compress - include "build/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o" - include "build/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o" endseg beginseg name "ovl_Door_Spiral" compress - include "build/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.o" - include "build/src/overlays/actors/ovl_Door_Spiral/ovl_Door_Spiral_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Spiral/ovl_Door_Spiral_reloc.o" endseg beginseg name "ovl_Obj_Pzlblock" compress - include "build/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.o" - include "build/src/overlays/actors/ovl_Obj_Pzlblock/ovl_Obj_Pzlblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Pzlblock/ovl_Obj_Pzlblock_reloc.o" endseg beginseg name "ovl_Obj_Toge" compress - include "build/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.o" - include "build/src/overlays/actors/ovl_Obj_Toge/ovl_Obj_Toge_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Toge/ovl_Obj_Toge_reloc.o" endseg beginseg name "ovl_Obj_Armos" compress - include "build/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.o" - include "build/src/overlays/actors/ovl_Obj_Armos/ovl_Obj_Armos_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Armos/ovl_Obj_Armos_reloc.o" endseg beginseg name "ovl_Obj_Boyo" compress - include "build/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.o" - include "build/src/overlays/actors/ovl_Obj_Boyo/ovl_Obj_Boyo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Boyo/ovl_Obj_Boyo_reloc.o" endseg beginseg name "ovl_En_Grasshopper" compress - include "build/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.o" - include "build/src/overlays/actors/ovl_En_Grasshopper/ovl_En_Grasshopper_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Grasshopper/ovl_En_Grasshopper_reloc.o" endseg beginseg name "ovl_Obj_Grass" compress - include "build/src/overlays/actors/ovl_Obj_Grass/z_obj_grass.o" - include "build/src/overlays/actors/ovl_Obj_Grass/ovl_Obj_Grass_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Grass/z_obj_grass.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Grass/ovl_Obj_Grass_reloc.o" endseg beginseg name "ovl_Obj_Grass_Carry" compress - include "build/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.o" - include "build/src/overlays/actors/ovl_Obj_Grass_Carry/ovl_Obj_Grass_Carry_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Grass_Carry/ovl_Obj_Grass_Carry_reloc.o" endseg beginseg name "ovl_Obj_Grass_Unit" compress - include "build/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.o" - include "build/src/overlays/actors/ovl_Obj_Grass_Unit/ovl_Obj_Grass_Unit_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Grass_Unit/z_obj_grass_unit.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Grass_Unit/ovl_Obj_Grass_Unit_reloc.o" endseg beginseg name "ovl_Bg_Fire_Wall" compress - include "build/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.o" - include "build/src/overlays/actors/ovl_Bg_Fire_Wall/ovl_Bg_Fire_Wall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Fire_Wall/ovl_Bg_Fire_Wall_reloc.o" endseg beginseg name "ovl_En_Bu" compress - include "build/src/overlays/actors/ovl_En_Bu/z_en_bu.o" - include "build/src/overlays/actors/ovl_En_Bu/ovl_En_Bu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bu/z_en_bu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bu/ovl_En_Bu_reloc.o" endseg beginseg name "ovl_En_Encount3" compress - include "build/src/overlays/actors/ovl_En_Encount3/z_en_encount3.o" - include "build/src/overlays/actors/ovl_En_Encount3/ovl_En_Encount3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount3/z_en_encount3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount3/ovl_En_Encount3_reloc.o" endseg beginseg name "ovl_En_Jso" compress - include "build/src/overlays/actors/ovl_En_Jso/z_en_jso.o" - include "build/src/overlays/actors/ovl_En_Jso/ovl_En_Jso_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jso/z_en_jso.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jso/ovl_En_Jso_reloc.o" endseg beginseg name "ovl_Obj_Chikuwa" compress - include "build/src/overlays/actors/ovl_Obj_Chikuwa/z_obj_chikuwa.o" - include "build/src/overlays/actors/ovl_Obj_Chikuwa/ovl_Obj_Chikuwa_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Chikuwa/z_obj_chikuwa.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Chikuwa/ovl_Obj_Chikuwa_reloc.o" endseg beginseg name "ovl_En_Knight" compress - include "build/src/overlays/actors/ovl_En_Knight/z_en_knight.o" - include "build/data/ovl_En_Knight/ovl_En_Knight.data.o" - include "build/data/ovl_En_Knight/ovl_En_Knight.bss.o" - include "build/data/ovl_En_Knight/ovl_En_Knight.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Knight/z_en_knight.o" + include "$(BUILD_DIR)/data/ovl_En_Knight/ovl_En_Knight.data.o" + include "$(BUILD_DIR)/data/ovl_En_Knight/ovl_En_Knight.bss.o" + include "$(BUILD_DIR)/data/ovl_En_Knight/ovl_En_Knight.reloc.o" endseg beginseg name "ovl_En_Warp_tag" compress - include "build/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.o" - include "build/src/overlays/actors/ovl_En_Warp_tag/ovl_En_Warp_tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Warp_tag/ovl_En_Warp_tag_reloc.o" endseg beginseg name "ovl_En_Aob_01" compress - include "build/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.o" - include "build/src/overlays/actors/ovl_En_Aob_01/ovl_En_Aob_01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Aob_01/ovl_En_Aob_01_reloc.o" endseg beginseg name "ovl_En_Boj_01" compress - include "build/src/overlays/actors/ovl_En_Boj_01/z_en_boj_01.o" - include "build/src/overlays/actors/ovl_En_Boj_01/ovl_En_Boj_01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_01/z_en_boj_01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_01/ovl_En_Boj_01_reloc.o" endseg beginseg name "ovl_En_Boj_02" compress - include "build/src/overlays/actors/ovl_En_Boj_02/z_en_boj_02.o" - include "build/src/overlays/actors/ovl_En_Boj_02/ovl_En_Boj_02_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_02/z_en_boj_02.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_02/ovl_En_Boj_02_reloc.o" endseg beginseg name "ovl_En_Boj_03" compress - include "build/src/overlays/actors/ovl_En_Boj_03/z_en_boj_03.o" - include "build/src/overlays/actors/ovl_En_Boj_03/ovl_En_Boj_03_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_03/z_en_boj_03.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_03/ovl_En_Boj_03_reloc.o" endseg beginseg name "ovl_En_Encount4" compress - include "build/src/overlays/actors/ovl_En_Encount4/z_en_encount4.o" - include "build/src/overlays/actors/ovl_En_Encount4/ovl_En_Encount4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount4/z_en_encount4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount4/ovl_En_Encount4_reloc.o" endseg beginseg name "ovl_En_Bom_Bowl_Man" compress - include "build/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.o" - include "build/src/overlays/actors/ovl_En_Bom_Bowl_Man/ovl_En_Bom_Bowl_Man_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/ovl_En_Bom_Bowl_Man_reloc.o" endseg beginseg name "ovl_En_Syateki_Man" compress - include "build/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.o" - include "build/src/overlays/actors/ovl_En_Syateki_Man/ovl_En_Syateki_Man_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/ovl_En_Syateki_Man_reloc.o" endseg beginseg name "ovl_Bg_Icicle" compress - include "build/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.o" - include "build/src/overlays/actors/ovl_Bg_Icicle/ovl_Bg_Icicle_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Icicle/ovl_Bg_Icicle_reloc.o" endseg beginseg name "ovl_En_Syateki_Crow" compress - include "build/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.o" - include "build/src/overlays/actors/ovl_En_Syateki_Crow/ovl_En_Syateki_Crow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Crow/ovl_En_Syateki_Crow_reloc.o" endseg beginseg name "ovl_En_Boj_04" compress - include "build/src/overlays/actors/ovl_En_Boj_04/z_en_boj_04.o" - include "build/src/overlays/actors/ovl_En_Boj_04/ovl_En_Boj_04_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_04/z_en_boj_04.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_04/ovl_En_Boj_04_reloc.o" endseg beginseg name "ovl_En_Cne_01" compress - include "build/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.o" - include "build/src/overlays/actors/ovl_En_Cne_01/ovl_En_Cne_01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cne_01/ovl_En_Cne_01_reloc.o" endseg beginseg name "ovl_En_Bba_01" compress - include "build/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.o" - include "build/src/overlays/actors/ovl_En_Bba_01/ovl_En_Bba_01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bba_01/ovl_En_Bba_01_reloc.o" endseg beginseg name "ovl_En_Bji_01" compress - include "build/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.o" - include "build/src/overlays/actors/ovl_En_Bji_01/ovl_En_Bji_01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bji_01/ovl_En_Bji_01_reloc.o" endseg beginseg name "ovl_Bg_Spdweb" compress - include "build/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.o" - include "build/src/overlays/actors/ovl_Bg_Spdweb/ovl_Bg_Spdweb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spdweb/ovl_Bg_Spdweb_reloc.o" endseg beginseg name "ovl_En_Mt_tag" compress - include "build/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.o" - include "build/src/overlays/actors/ovl_En_Mt_tag/ovl_En_Mt_tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mt_tag/ovl_En_Mt_tag_reloc.o" endseg beginseg name "ovl_Boss_01" compress - include "build/src/overlays/actors/ovl_Boss_01/z_boss_01.o" - include "build/src/overlays/actors/ovl_Boss_01/ovl_Boss_01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_01/z_boss_01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_01/ovl_Boss_01_reloc.o" endseg beginseg name "ovl_Boss_02" compress - include "build/src/overlays/actors/ovl_Boss_02/z_boss_02.o" - include "build/src/overlays/actors/ovl_Boss_02/ovl_Boss_02_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_02/z_boss_02.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_02/ovl_Boss_02_reloc.o" endseg beginseg name "ovl_Boss_03" compress - include "build/src/overlays/actors/ovl_Boss_03/z_boss_03.o" - include "build/src/overlays/actors/ovl_Boss_03/ovl_Boss_03_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_03/z_boss_03.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_03/ovl_Boss_03_reloc.o" endseg beginseg name "ovl_Boss_04" compress - include "build/src/overlays/actors/ovl_Boss_04/z_boss_04.o" - include "build/src/overlays/actors/ovl_Boss_04/ovl_Boss_04_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_04/z_boss_04.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_04/ovl_Boss_04_reloc.o" endseg beginseg name "ovl_Boss_05" compress - include "build/src/overlays/actors/ovl_Boss_05/z_boss_05.o" - include "build/src/overlays/actors/ovl_Boss_05/ovl_Boss_05_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_05/z_boss_05.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_05/ovl_Boss_05_reloc.o" endseg beginseg name "ovl_Boss_06" compress - include "build/src/overlays/actors/ovl_Boss_06/z_boss_06.o" - include "build/src/overlays/actors/ovl_Boss_06/ovl_Boss_06_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_06/z_boss_06.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_06/ovl_Boss_06_reloc.o" endseg beginseg name "ovl_Boss_07" compress - include "build/src/overlays/actors/ovl_Boss_07/z_boss_07.o" - include "build/data/ovl_Boss_07/ovl_Boss_07.data.o" - include "build/data/ovl_Boss_07/ovl_Boss_07.bss.o" - include "build/data/ovl_Boss_07/ovl_Boss_07.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_07/z_boss_07.o" + include "$(BUILD_DIR)/data/ovl_Boss_07/ovl_Boss_07.data.o" + include "$(BUILD_DIR)/data/ovl_Boss_07/ovl_Boss_07.bss.o" + include "$(BUILD_DIR)/data/ovl_Boss_07/ovl_Boss_07.reloc.o" endseg beginseg name "ovl_Bg_Dy_Yoseizo" compress - include "build/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.o" - include "build/src/overlays/actors/ovl_Bg_Dy_Yoseizo/ovl_Bg_Dy_Yoseizo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/ovl_Bg_Dy_Yoseizo_reloc.o" endseg beginseg name "ovl_En_Boj_05" compress - include "build/src/overlays/actors/ovl_En_Boj_05/z_en_boj_05.o" - include "build/src/overlays/actors/ovl_En_Boj_05/ovl_En_Boj_05_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_05/z_en_boj_05.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boj_05/ovl_En_Boj_05_reloc.o" endseg beginseg name "ovl_En_Sob1" compress - include "build/src/overlays/actors/ovl_En_Sob1/z_en_sob1.o" - include "build/src/overlays/actors/ovl_En_Sob1/ovl_En_Sob1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sob1/z_en_sob1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sob1/ovl_En_Sob1_reloc.o" endseg beginseg name "ovl_En_Go" compress - include "build/src/overlays/actors/ovl_En_Go/z_en_go.o" - include "build/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/z_en_go.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o" endseg beginseg name "ovl_En_Raf" compress - include "build/src/overlays/actors/ovl_En_Raf/z_en_raf.o" - include "build/src/overlays/actors/ovl_En_Raf/ovl_En_Raf_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Raf/z_en_raf.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Raf/ovl_En_Raf_reloc.o" endseg beginseg name "ovl_Obj_Funen" compress - include "build/src/overlays/actors/ovl_Obj_Funen/z_obj_funen.o" - include "build/src/overlays/actors/ovl_Obj_Funen/ovl_Obj_Funen_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Funen/z_obj_funen.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Funen/ovl_Obj_Funen_reloc.o" endseg beginseg name "ovl_Obj_Raillift" compress - include "build/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.o" - include "build/src/overlays/actors/ovl_Obj_Raillift/ovl_Obj_Raillift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Raillift/ovl_Obj_Raillift_reloc.o" endseg beginseg name "ovl_Bg_Numa_Hana" compress - include "build/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.o" - include "build/src/overlays/actors/ovl_Bg_Numa_Hana/ovl_Bg_Numa_Hana_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Numa_Hana/ovl_Bg_Numa_Hana_reloc.o" endseg beginseg name "ovl_Obj_Flowerpot" compress - include "build/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.o" - include "build/src/overlays/actors/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot_reloc.o" endseg beginseg name "ovl_Obj_Spinyroll" compress - include "build/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.o" - include "build/src/overlays/actors/ovl_Obj_Spinyroll/ovl_Obj_Spinyroll_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Spinyroll/ovl_Obj_Spinyroll_reloc.o" endseg beginseg name "ovl_Dm_Hina" compress - include "build/src/overlays/actors/ovl_Dm_Hina/z_dm_hina.o" - include "build/src/overlays/actors/ovl_Dm_Hina/ovl_Dm_Hina_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Hina/z_dm_hina.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Hina/ovl_Dm_Hina_reloc.o" endseg beginseg name "ovl_En_Syateki_Wf" compress - include "build/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.o" - include "build/src/overlays/actors/ovl_En_Syateki_Wf/ovl_En_Syateki_Wf_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Wf/ovl_En_Syateki_Wf_reloc.o" endseg beginseg name "ovl_Obj_Skateblock" compress - include "build/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.o" - include "build/src/overlays/actors/ovl_Obj_Skateblock/ovl_Obj_Skateblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Skateblock/ovl_Obj_Skateblock_reloc.o" endseg beginseg name "ovl_Effect_En_Ice_Block" compress - include "build/src/overlays/effects/ovl_Effect_En_Ice_Block/z_eff_en_ice_block.o" - include "build/src/overlays/effects/ovl_Effect_En_Ice_Block/ovl_Effect_En_Ice_Block_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_En_Ice_Block/z_eff_en_ice_block.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_En_Ice_Block/ovl_Effect_En_Ice_Block_reloc.o" endseg beginseg name "ovl_Obj_Iceblock" compress - include "build/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.o" - include "build/src/overlays/actors/ovl_Obj_Iceblock/ovl_Obj_Iceblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Iceblock/ovl_Obj_Iceblock_reloc.o" endseg beginseg name "ovl_En_Bigpamet" compress - include "build/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.o" - include "build/src/overlays/actors/ovl_En_Bigpamet/ovl_En_Bigpamet_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigpamet/ovl_En_Bigpamet_reloc.o" endseg beginseg name "ovl_Bg_Dblue_Movebg" compress - include "build/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.o" - include "build/src/overlays/actors/ovl_Bg_Dblue_Movebg/ovl_Bg_Dblue_Movebg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Movebg/ovl_Bg_Dblue_Movebg_reloc.o" endseg beginseg name "ovl_En_Syateki_Dekunuts" compress - include "build/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.o" - include "build/src/overlays/actors/ovl_En_Syateki_Dekunuts/ovl_En_Syateki_Dekunuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Dekunuts/ovl_En_Syateki_Dekunuts_reloc.o" endseg beginseg name "ovl_Elf_Msg3" compress - include "build/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.o" - include "build/src/overlays/actors/ovl_Elf_Msg3/ovl_Elf_Msg3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg3/ovl_Elf_Msg3_reloc.o" endseg beginseg name "ovl_En_Fg" compress - include "build/src/overlays/actors/ovl_En_Fg/z_en_fg.o" - include "build/src/overlays/actors/ovl_En_Fg/ovl_En_Fg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fg/z_en_fg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fg/ovl_En_Fg_reloc.o" endseg beginseg name "ovl_Dm_Ravine" compress - include "build/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.o" - include "build/src/overlays/actors/ovl_Dm_Ravine/ovl_Dm_Ravine_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Ravine/ovl_Dm_Ravine_reloc.o" endseg beginseg name "ovl_Dm_Sa" compress - include "build/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.o" - include "build/src/overlays/actors/ovl_Dm_Sa/ovl_Dm_Sa_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Sa/ovl_Dm_Sa_reloc.o" endseg beginseg name "ovl_En_Slime" compress - include "build/src/overlays/actors/ovl_En_Slime/z_en_slime.o" - include "build/src/overlays/actors/ovl_En_Slime/ovl_En_Slime_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Slime/z_en_slime.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Slime/ovl_En_Slime_reloc.o" endseg beginseg name "ovl_En_Pr" compress - include "build/src/overlays/actors/ovl_En_Pr/z_en_pr.o" - include "build/src/overlays/actors/ovl_En_Pr/ovl_En_Pr_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pr/z_en_pr.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pr/ovl_En_Pr_reloc.o" endseg beginseg name "ovl_Obj_Toudai" compress - include "build/src/overlays/actors/ovl_Obj_Toudai/z_obj_toudai.o" - include "build/src/overlays/actors/ovl_Obj_Toudai/ovl_Obj_Toudai_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Toudai/z_obj_toudai.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Toudai/ovl_Obj_Toudai_reloc.o" endseg beginseg name "ovl_Obj_Entotu" compress - include "build/src/overlays/actors/ovl_Obj_Entotu/z_obj_entotu.o" - include "build/src/overlays/actors/ovl_Obj_Entotu/ovl_Obj_Entotu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Entotu/z_obj_entotu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Entotu/ovl_Obj_Entotu_reloc.o" endseg beginseg name "ovl_Obj_Bell" compress - include "build/src/overlays/actors/ovl_Obj_Bell/z_obj_bell.o" - include "build/src/overlays/actors/ovl_Obj_Bell/ovl_Obj_Bell_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bell/z_obj_bell.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bell/ovl_Obj_Bell_reloc.o" endseg beginseg name "ovl_En_Syateki_Okuta" compress - include "build/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.o" - include "build/src/overlays/actors/ovl_En_Syateki_Okuta/ovl_En_Syateki_Okuta_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Okuta/ovl_En_Syateki_Okuta_reloc.o" endseg beginseg name "ovl_Obj_Shutter" compress - include "build/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.o" - include "build/src/overlays/actors/ovl_Obj_Shutter/ovl_Obj_Shutter_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Shutter/ovl_Obj_Shutter_reloc.o" endseg beginseg name "ovl_Dm_Zl" compress - include "build/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.o" - include "build/src/overlays/actors/ovl_Dm_Zl/ovl_Dm_Zl_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Zl/ovl_Dm_Zl_reloc.o" endseg beginseg name "ovl_En_Ru" compress - include "build/src/overlays/actors/ovl_En_Ru/z_en_ru.o" - include "build/src/overlays/actors/ovl_En_Ru/ovl_En_Ru_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru/z_en_ru.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru/ovl_En_Ru_reloc.o" endseg beginseg name "ovl_En_Elfgrp" compress - include "build/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.o" - include "build/src/overlays/actors/ovl_En_Elfgrp/ovl_En_Elfgrp_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elfgrp/ovl_En_Elfgrp_reloc.o" endseg beginseg name "ovl_Dm_Tsg" compress - include "build/src/overlays/actors/ovl_Dm_Tsg/z_dm_tsg.o" - include "build/src/overlays/actors/ovl_Dm_Tsg/ovl_Dm_Tsg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Tsg/z_dm_tsg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Tsg/ovl_Dm_Tsg_reloc.o" endseg beginseg name "ovl_En_Baguo" compress - include "build/src/overlays/actors/ovl_En_Baguo/z_en_baguo.o" - include "build/src/overlays/actors/ovl_En_Baguo/ovl_En_Baguo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Baguo/z_en_baguo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Baguo/ovl_En_Baguo_reloc.o" endseg beginseg name "ovl_Obj_Vspinyroll" compress - include "build/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.o" - include "build/src/overlays/actors/ovl_Obj_Vspinyroll/ovl_Obj_Vspinyroll_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Vspinyroll/ovl_Obj_Vspinyroll_reloc.o" endseg beginseg name "ovl_Obj_Smork" compress - include "build/src/overlays/actors/ovl_Obj_Smork/z_obj_smork.o" - include "build/src/overlays/actors/ovl_Obj_Smork/ovl_Obj_Smork_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Smork/z_obj_smork.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Smork/ovl_Obj_Smork_reloc.o" endseg beginseg name "ovl_En_Test2" compress - include "build/src/overlays/actors/ovl_En_Test2/z_en_test2.o" - include "build/src/overlays/actors/ovl_En_Test2/ovl_En_Test2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test2/z_en_test2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test2/ovl_En_Test2_reloc.o" endseg beginseg name "ovl_En_Test3" compress - include "build/src/overlays/actors/ovl_En_Test3/z_en_test3.o" - include "build/src/overlays/actors/ovl_En_Test3/ovl_En_Test3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test3/z_en_test3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test3/ovl_En_Test3_reloc.o" endseg beginseg name "ovl_En_Test4" compress - include "build/src/overlays/actors/ovl_En_Test4/z_en_test4.o" - include "build/src/overlays/actors/ovl_En_Test4/ovl_En_Test4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test4/z_en_test4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test4/ovl_En_Test4_reloc.o" endseg beginseg name "ovl_En_Bat" compress - include "build/src/overlays/actors/ovl_En_Bat/z_en_bat.o" - include "build/src/overlays/actors/ovl_En_Bat/ovl_En_Bat_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bat/z_en_bat.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bat/ovl_En_Bat_reloc.o" endseg beginseg name "ovl_En_Sekihi" compress - include "build/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.o" - include "build/src/overlays/actors/ovl_En_Sekihi/ovl_En_Sekihi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sekihi/ovl_En_Sekihi_reloc.o" endseg beginseg name "ovl_En_Wiz" compress - include "build/src/overlays/actors/ovl_En_Wiz/z_en_wiz.o" - include "build/src/overlays/actors/ovl_En_Wiz/ovl_En_Wiz_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wiz/z_en_wiz.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wiz/ovl_En_Wiz_reloc.o" endseg beginseg name "ovl_En_Wiz_Brock" compress - include "build/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.o" - include "build/src/overlays/actors/ovl_En_Wiz_Brock/ovl_En_Wiz_Brock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wiz_Brock/ovl_En_Wiz_Brock_reloc.o" endseg beginseg name "ovl_En_Wiz_Fire" compress - include "build/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.o" - include "build/src/overlays/actors/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire_reloc.o" endseg beginseg name "ovl_Eff_Change" compress - include "build/src/overlays/actors/ovl_Eff_Change/z_eff_change.o" - include "build/src/overlays/actors/ovl_Eff_Change/ovl_Eff_Change_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Change/z_eff_change.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Change/ovl_Eff_Change_reloc.o" endseg beginseg name "ovl_Dm_Statue" compress - include "build/src/overlays/actors/ovl_Dm_Statue/z_dm_statue.o" - include "build/src/overlays/actors/ovl_Dm_Statue/ovl_Dm_Statue_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Statue/z_dm_statue.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Statue/ovl_Dm_Statue_reloc.o" endseg beginseg name "ovl_Obj_Fireshield" compress - include "build/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.o" - include "build/src/overlays/actors/ovl_Obj_Fireshield/ovl_Obj_Fireshield_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Fireshield/ovl_Obj_Fireshield_reloc.o" endseg beginseg name "ovl_Bg_Ladder" compress - include "build/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.o" - include "build/src/overlays/actors/ovl_Bg_Ladder/ovl_Bg_Ladder_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ladder/ovl_Bg_Ladder_reloc.o" endseg beginseg name "ovl_En_Mkk" compress - include "build/src/overlays/actors/ovl_En_Mkk/z_en_mkk.o" - include "build/src/overlays/actors/ovl_En_Mkk/ovl_En_Mkk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mkk/z_en_mkk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mkk/ovl_En_Mkk_reloc.o" endseg beginseg name "ovl_Demo_Getitem" compress - include "build/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.o" - include "build/src/overlays/actors/ovl_Demo_Getitem/ovl_Demo_Getitem_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Getitem/ovl_Demo_Getitem_reloc.o" endseg beginseg name "ovl_En_Dnb" compress - include "build/src/overlays/actors/ovl_En_Dnb/z_en_dnb.o" - include "build/src/overlays/actors/ovl_En_Dnb/ovl_En_Dnb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnb/z_en_dnb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnb/ovl_En_Dnb_reloc.o" endseg beginseg name "ovl_En_Dnh" compress - include "build/src/overlays/actors/ovl_En_Dnh/z_en_dnh.o" - include "build/src/overlays/actors/ovl_En_Dnh/ovl_En_Dnh_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnh/z_en_dnh.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnh/ovl_En_Dnh_reloc.o" endseg beginseg name "ovl_En_Dnk" compress - include "build/src/overlays/actors/ovl_En_Dnk/z_en_dnk.o" - include "build/src/overlays/actors/ovl_En_Dnk/ovl_En_Dnk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnk/z_en_dnk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnk/ovl_En_Dnk_reloc.o" endseg beginseg name "ovl_En_Dnq" compress - include "build/src/overlays/actors/ovl_En_Dnq/z_en_dnq.o" - include "build/src/overlays/actors/ovl_En_Dnq/ovl_En_Dnq_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnq/z_en_dnq.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnq/ovl_En_Dnq_reloc.o" endseg beginseg name "ovl_Bg_Keikoku_Saku" compress - include "build/src/overlays/actors/ovl_Bg_Keikoku_Saku/z_bg_keikoku_saku.o" - include "build/src/overlays/actors/ovl_Bg_Keikoku_Saku/ovl_Bg_Keikoku_Saku_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Keikoku_Saku/z_bg_keikoku_saku.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Keikoku_Saku/ovl_Bg_Keikoku_Saku_reloc.o" endseg beginseg name "ovl_Obj_Hugebombiwa" compress - include "build/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.o" - include "build/src/overlays/actors/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa_reloc.o" endseg beginseg name "ovl_En_Firefly2" compress - include "build/src/overlays/actors/ovl_En_Firefly2/z_en_firefly2.o" - include "build/src/overlays/actors/ovl_En_Firefly2/ovl_En_Firefly2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly2/z_en_firefly2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly2/ovl_En_Firefly2_reloc.o" endseg beginseg name "ovl_En_Rat" compress - include "build/src/overlays/actors/ovl_En_Rat/z_en_rat.o" - include "build/src/overlays/actors/ovl_En_Rat/ovl_En_Rat_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rat/z_en_rat.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rat/ovl_En_Rat_reloc.o" endseg beginseg name "ovl_En_Water_Effect" compress - include "build/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.o" - include "build/src/overlays/actors/ovl_En_Water_Effect/ovl_En_Water_Effect_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Water_Effect/ovl_En_Water_Effect_reloc.o" endseg beginseg name "ovl_En_Kusa2" compress - include "build/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.o" - include "build/src/overlays/actors/ovl_En_Kusa2/ovl_En_Kusa2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa2/ovl_En_Kusa2_reloc.o" endseg beginseg name "ovl_Bg_Spout_Fire" compress - include "build/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.o" - include "build/src/overlays/actors/ovl_Bg_Spout_Fire/ovl_Bg_Spout_Fire_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spout_Fire/ovl_Bg_Spout_Fire_reloc.o" endseg beginseg name "ovl_En_Dy_Extra" compress - include "build/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o" - include "build/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o" endseg beginseg name "ovl_En_Bal" compress - include "build/src/overlays/actors/ovl_En_Bal/z_en_bal.o" - include "build/src/overlays/actors/ovl_En_Bal/ovl_En_Bal_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bal/z_en_bal.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bal/ovl_En_Bal_reloc.o" endseg beginseg name "ovl_En_Ginko_Man" compress - include "build/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.o" - include "build/src/overlays/actors/ovl_En_Ginko_Man/ovl_En_Ginko_Man_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ginko_Man/ovl_En_Ginko_Man_reloc.o" endseg beginseg name "ovl_En_Warp_Uzu" compress - include "build/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.o" - include "build/src/overlays/actors/ovl_En_Warp_Uzu/ovl_En_Warp_Uzu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Warp_Uzu/ovl_En_Warp_Uzu_reloc.o" endseg beginseg name "ovl_Obj_Driftice" compress - include "build/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.o" - include "build/src/overlays/actors/ovl_Obj_Driftice/ovl_Obj_Driftice_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Driftice/ovl_Obj_Driftice_reloc.o" endseg beginseg name "ovl_En_Look_Nuts" compress - include "build/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.o" - include "build/src/overlays/actors/ovl_En_Look_Nuts/ovl_En_Look_Nuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Look_Nuts/ovl_En_Look_Nuts_reloc.o" endseg beginseg name "ovl_En_Mushi2" compress - include "build/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.o" - include "build/src/overlays/actors/ovl_En_Mushi2/ovl_En_Mushi2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mushi2/ovl_En_Mushi2_reloc.o" endseg beginseg name "ovl_En_Fall" compress - include "build/src/overlays/actors/ovl_En_Fall/z_en_fall.o" - include "build/src/overlays/actors/ovl_En_Fall/ovl_En_Fall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fall/z_en_fall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fall/ovl_En_Fall_reloc.o" endseg beginseg name "ovl_En_Mm3" compress - include "build/src/overlays/actors/ovl_En_Mm3/z_en_mm3.o" - include "build/src/overlays/actors/ovl_En_Mm3/ovl_En_Mm3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm3/z_en_mm3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm3/ovl_En_Mm3_reloc.o" endseg beginseg name "ovl_Bg_Crace_Movebg" compress - include "build/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.o" - include "build/src/overlays/actors/ovl_Bg_Crace_Movebg/ovl_Bg_Crace_Movebg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Crace_Movebg/ovl_Bg_Crace_Movebg_reloc.o" endseg beginseg name "ovl_En_Dno" compress - include "build/src/overlays/actors/ovl_En_Dno/z_en_dno.o" - include "build/src/overlays/actors/ovl_En_Dno/ovl_En_Dno_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dno/z_en_dno.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dno/ovl_En_Dno_reloc.o" endseg beginseg name "ovl_En_Pr2" compress - include "build/src/overlays/actors/ovl_En_Pr2/z_en_pr2.o" - include "build/src/overlays/actors/ovl_En_Pr2/ovl_En_Pr2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pr2/z_en_pr2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pr2/ovl_En_Pr2_reloc.o" endseg beginseg name "ovl_En_Prz" compress - include "build/src/overlays/actors/ovl_En_Prz/z_en_prz.o" - include "build/src/overlays/actors/ovl_En_Prz/ovl_En_Prz_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Prz/z_en_prz.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Prz/ovl_En_Prz_reloc.o" endseg beginseg name "ovl_En_Jso2" compress - include "build/src/overlays/actors/ovl_En_Jso2/z_en_jso2.o" - include "build/src/overlays/actors/ovl_En_Jso2/ovl_En_Jso2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jso2/z_en_jso2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jso2/ovl_En_Jso2_reloc.o" endseg beginseg name "ovl_Obj_Etcetera" compress - include "build/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.o" - include "build/src/overlays/actors/ovl_Obj_Etcetera/ovl_Obj_Etcetera_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Etcetera/ovl_Obj_Etcetera_reloc.o" endseg beginseg name "ovl_En_Egol" compress - include "build/src/overlays/actors/ovl_En_Egol/z_en_egol.o" - include "build/src/overlays/actors/ovl_En_Egol/ovl_En_Egol_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Egol/z_en_egol.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Egol/ovl_En_Egol_reloc.o" endseg beginseg name "ovl_Obj_Mine" compress - include "build/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.o" - include "build/src/overlays/actors/ovl_Obj_Mine/ovl_Obj_Mine_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mine/ovl_Obj_Mine_reloc.o" endseg beginseg name "ovl_Obj_Purify" compress - include "build/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.o" - include "build/src/overlays/actors/ovl_Obj_Purify/ovl_Obj_Purify_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Purify/ovl_Obj_Purify_reloc.o" endseg beginseg name "ovl_En_Tru" compress - include "build/src/overlays/actors/ovl_En_Tru/z_en_tru.o" - include "build/src/overlays/actors/ovl_En_Tru/ovl_En_Tru_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tru/z_en_tru.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tru/ovl_En_Tru_reloc.o" endseg beginseg name "ovl_En_Trt" compress - include "build/src/overlays/actors/ovl_En_Trt/z_en_trt.o" - include "build/src/overlays/actors/ovl_En_Trt/ovl_En_Trt_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trt/z_en_trt.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trt/ovl_En_Trt_reloc.o" endseg beginseg name "ovl_En_Test5" compress - include "build/src/overlays/actors/ovl_En_Test5/z_en_test5.o" - include "build/src/overlays/actors/ovl_En_Test5/ovl_En_Test5_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test5/z_en_test5.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test5/ovl_En_Test5_reloc.o" endseg beginseg name "ovl_En_Test6" compress - include "build/src/overlays/actors/ovl_En_Test6/z_en_test6.o" - include "build/src/overlays/actors/ovl_En_Test6/ovl_En_Test6_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test6/z_en_test6.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test6/ovl_En_Test6_reloc.o" endseg beginseg name "ovl_En_Az" compress - include "build/src/overlays/actors/ovl_En_Az/z_en_az.o" - include "build/src/overlays/actors/ovl_En_Az/ovl_En_Az_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Az/z_en_az.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Az/ovl_En_Az_reloc.o" endseg beginseg name "ovl_En_Estone" compress - include "build/src/overlays/actors/ovl_En_Estone/z_en_estone.o" - include "build/src/overlays/actors/ovl_En_Estone/ovl_En_Estone_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Estone/z_en_estone.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Estone/ovl_En_Estone_reloc.o" endseg beginseg name "ovl_Bg_Hakugin_Post" compress - include "build/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.o" - include "build/src/overlays/actors/ovl_Bg_Hakugin_Post/ovl_Bg_Hakugin_Post_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Post/ovl_Bg_Hakugin_Post_reloc.o" endseg beginseg name "ovl_Dm_Opstage" compress - include "build/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.o" - include "build/src/overlays/actors/ovl_Dm_Opstage/ovl_Dm_Opstage_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Opstage/ovl_Dm_Opstage_reloc.o" endseg beginseg name "ovl_Dm_Stk" compress - include "build/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.o" - include "build/src/overlays/actors/ovl_Dm_Stk/ovl_Dm_Stk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Stk/ovl_Dm_Stk_reloc.o" endseg beginseg name "ovl_Dm_Char00" compress - include "build/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.o" - include "build/src/overlays/actors/ovl_Dm_Char00/ovl_Dm_Char00_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char00/ovl_Dm_Char00_reloc.o" endseg beginseg name "ovl_Dm_Char01" compress - include "build/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.o" - include "build/src/overlays/actors/ovl_Dm_Char01/ovl_Dm_Char01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char01/ovl_Dm_Char01_reloc.o" endseg beginseg name "ovl_Dm_Char02" compress - include "build/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.o" - include "build/src/overlays/actors/ovl_Dm_Char02/ovl_Dm_Char02_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char02/ovl_Dm_Char02_reloc.o" endseg beginseg name "ovl_Dm_Char03" compress - include "build/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.o" - include "build/src/overlays/actors/ovl_Dm_Char03/ovl_Dm_Char03_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char03/ovl_Dm_Char03_reloc.o" endseg beginseg name "ovl_Dm_Char04" compress - include "build/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.o" - include "build/src/overlays/actors/ovl_Dm_Char04/ovl_Dm_Char04_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char04/ovl_Dm_Char04_reloc.o" endseg beginseg name "ovl_Dm_Char05" compress - include "build/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.o" - include "build/src/overlays/actors/ovl_Dm_Char05/ovl_Dm_Char05_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char05/ovl_Dm_Char05_reloc.o" endseg beginseg name "ovl_Dm_Char06" compress - include "build/src/overlays/actors/ovl_Dm_Char06/z_dm_char06.o" - include "build/src/overlays/actors/ovl_Dm_Char06/ovl_Dm_Char06_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char06/z_dm_char06.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char06/ovl_Dm_Char06_reloc.o" endseg beginseg name "ovl_Dm_Char07" compress - include "build/src/overlays/actors/ovl_Dm_Char07/z_dm_char07.o" - include "build/src/overlays/actors/ovl_Dm_Char07/ovl_Dm_Char07_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char07/z_dm_char07.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char07/ovl_Dm_Char07_reloc.o" endseg beginseg name "ovl_Dm_Char08" compress - include "build/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.o" - include "build/src/overlays/actors/ovl_Dm_Char08/ovl_Dm_Char08_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char08/ovl_Dm_Char08_reloc.o" endseg beginseg name "ovl_Dm_Char09" compress - include "build/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.o" - include "build/src/overlays/actors/ovl_Dm_Char09/ovl_Dm_Char09_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Char09/ovl_Dm_Char09_reloc.o" endseg beginseg name "ovl_Obj_Tokeidai" compress - include "build/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.o" - include "build/src/overlays/actors/ovl_Obj_Tokeidai/ovl_Obj_Tokeidai_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokeidai/ovl_Obj_Tokeidai_reloc.o" endseg beginseg name "ovl_En_Mnk" compress - include "build/src/overlays/actors/ovl_En_Mnk/z_en_mnk.o" - include "build/src/overlays/actors/ovl_En_Mnk/ovl_En_Mnk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mnk/z_en_mnk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mnk/ovl_En_Mnk_reloc.o" endseg beginseg name "ovl_En_Egblock" compress - include "build/src/overlays/actors/ovl_En_Egblock/z_en_egblock.o" - include "build/src/overlays/actors/ovl_En_Egblock/ovl_En_Egblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Egblock/z_en_egblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Egblock/ovl_En_Egblock_reloc.o" endseg beginseg name "ovl_En_Guard_Nuts" compress - include "build/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.o" - include "build/src/overlays/actors/ovl_En_Guard_Nuts/ovl_En_Guard_Nuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guard_Nuts/ovl_En_Guard_Nuts_reloc.o" endseg beginseg name "ovl_Bg_Hakugin_Bombwall" compress - include "build/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.o" - include "build/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/ovl_Bg_Hakugin_Bombwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/ovl_Bg_Hakugin_Bombwall_reloc.o" endseg beginseg name "ovl_Obj_Tokei_Tobira" compress - include "build/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.o" - include "build/src/overlays/actors/ovl_Obj_Tokei_Tobira/ovl_Obj_Tokei_Tobira_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokei_Tobira/z_obj_tokei_tobira.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokei_Tobira/ovl_Obj_Tokei_Tobira_reloc.o" endseg beginseg name "ovl_Bg_Hakugin_Elvpole" compress - include "build/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.o" - include "build/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/ovl_Bg_Hakugin_Elvpole_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/ovl_Bg_Hakugin_Elvpole_reloc.o" endseg beginseg name "ovl_En_Ma4" compress - include "build/src/overlays/actors/ovl_En_Ma4/z_en_ma4.o" - include "build/src/overlays/actors/ovl_En_Ma4/ovl_En_Ma4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma4/z_en_ma4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma4/ovl_En_Ma4_reloc.o" endseg beginseg name "ovl_En_Twig" compress - include "build/src/overlays/actors/ovl_En_Twig/z_en_twig.o" - include "build/src/overlays/actors/ovl_En_Twig/ovl_En_Twig_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Twig/z_en_twig.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Twig/ovl_En_Twig_reloc.o" endseg beginseg name "ovl_En_Po_Fusen" compress - include "build/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.o" - include "build/src/overlays/actors/ovl_En_Po_Fusen/ovl_En_Po_Fusen_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Fusen/ovl_En_Po_Fusen_reloc.o" endseg beginseg name "ovl_En_Door_Etc" compress - include "build/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.o" - include "build/src/overlays/actors/ovl_En_Door_Etc/ovl_En_Door_Etc_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door_Etc/ovl_En_Door_Etc_reloc.o" endseg beginseg name "ovl_En_Bigokuta" compress - include "build/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.o" - include "build/src/overlays/actors/ovl_En_Bigokuta/ovl_En_Bigokuta_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/ovl_En_Bigokuta_reloc.o" endseg beginseg name "ovl_Bg_Icefloe" compress - include "build/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.o" - include "build/src/overlays/actors/ovl_Bg_Icefloe/ovl_Bg_Icefloe_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Icefloe/ovl_Bg_Icefloe_reloc.o" endseg beginseg name "ovl_fbdemo_triforce" compress - include "build/src/overlays/fbdemos/ovl_fbdemo_triforce/z_fbdemo_triforce.o" - include "build/src/overlays/fbdemos/ovl_fbdemo_triforce/ovl_fbdemo_triforce_reloc.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_triforce/z_fbdemo_triforce.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_triforce/ovl_fbdemo_triforce_reloc.o" endseg beginseg name "ovl_fbdemo_wipe1" compress - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.o" - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe1/ovl_fbdemo_wipe1_reloc.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe1/ovl_fbdemo_wipe1_reloc.o" endseg beginseg name "ovl_fbdemo_wipe3" compress - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.o" - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe3/ovl_fbdemo_wipe3_reloc.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe3/ovl_fbdemo_wipe3_reloc.o" endseg beginseg name "ovl_fbdemo_wipe4" compress - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.o" - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe4/ovl_fbdemo_wipe4_reloc.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe4/ovl_fbdemo_wipe4_reloc.o" endseg beginseg name "ovl_fbdemo_wipe5" compress - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.o" - include "build/src/overlays/fbdemos/ovl_fbdemo_wipe5/ovl_fbdemo_wipe5_reloc.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.o" + include "$(BUILD_DIR)/src/overlays/fbdemos/ovl_fbdemo_wipe5/ovl_fbdemo_wipe5_reloc.o" endseg beginseg name "ovl_Effect_Ss_Sbn" compress - include "build/src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.o" - include "build/src/overlays/effects/ovl_Effect_Ss_Sbn/ovl_Effect_Ss_Sbn_reloc.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.o" + include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sbn/ovl_Effect_Ss_Sbn_reloc.o" endseg beginseg name "ovl_Obj_Ocarinalift" compress - include "build/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.o" - include "build/src/overlays/actors/ovl_Obj_Ocarinalift/ovl_Obj_Ocarinalift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ocarinalift/ovl_Obj_Ocarinalift_reloc.o" endseg beginseg name "ovl_En_Time_Tag" compress - include "build/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.o" - include "build/src/overlays/actors/ovl_En_Time_Tag/ovl_En_Time_Tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Time_Tag/ovl_En_Time_Tag_reloc.o" endseg beginseg name "ovl_Bg_Open_Shutter" compress - include "build/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.o" - include "build/src/overlays/actors/ovl_Bg_Open_Shutter/ovl_Bg_Open_Shutter_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Open_Shutter/ovl_Bg_Open_Shutter_reloc.o" endseg beginseg name "ovl_Bg_Open_Spot" compress - include "build/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.o" - include "build/src/overlays/actors/ovl_Bg_Open_Spot/ovl_Bg_Open_Spot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Open_Spot/ovl_Bg_Open_Spot_reloc.o" endseg beginseg name "ovl_Bg_Fu_Kaiten" compress - include "build/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.o" - include "build/src/overlays/actors/ovl_Bg_Fu_Kaiten/ovl_Bg_Fu_Kaiten_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Fu_Kaiten/ovl_Bg_Fu_Kaiten_reloc.o" endseg beginseg name "ovl_Obj_Aqua" compress - include "build/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.o" - include "build/src/overlays/actors/ovl_Obj_Aqua/ovl_Obj_Aqua_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Aqua/ovl_Obj_Aqua_reloc.o" endseg beginseg name "ovl_En_Elforg" compress - include "build/src/overlays/actors/ovl_En_Elforg/z_en_elforg.o" - include "build/src/overlays/actors/ovl_En_Elforg/ovl_En_Elforg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elforg/z_en_elforg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elforg/ovl_En_Elforg_reloc.o" endseg beginseg name "ovl_En_Elfbub" compress - include "build/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.o" - include "build/src/overlays/actors/ovl_En_Elfbub/ovl_En_Elfbub_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elfbub/ovl_En_Elfbub_reloc.o" endseg beginseg name "ovl_En_Fu_Mato" compress - include "build/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.o" - include "build/src/overlays/actors/ovl_En_Fu_Mato/ovl_En_Fu_Mato_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu_Mato/ovl_En_Fu_Mato_reloc.o" endseg beginseg name "ovl_En_Fu_Kago" compress - include "build/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.o" - include "build/src/overlays/actors/ovl_En_Fu_Kago/ovl_En_Fu_Kago_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu_Kago/ovl_En_Fu_Kago_reloc.o" endseg beginseg name "ovl_En_Osn" compress - include "build/src/overlays/actors/ovl_En_Osn/z_en_osn.o" - include "build/src/overlays/actors/ovl_En_Osn/ovl_En_Osn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Osn/z_en_osn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Osn/ovl_En_Osn_reloc.o" endseg beginseg name "ovl_Bg_Ctower_Gear" compress - include "build/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.o" - include "build/src/overlays/actors/ovl_Bg_Ctower_Gear/ovl_Bg_Ctower_Gear_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ctower_Gear/ovl_Bg_Ctower_Gear_reloc.o" endseg beginseg name "ovl_En_Trt2" compress - include "build/src/overlays/actors/ovl_En_Trt2/z_en_trt2.o" - include "build/src/overlays/actors/ovl_En_Trt2/ovl_En_Trt2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trt2/z_en_trt2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trt2/ovl_En_Trt2_reloc.o" endseg beginseg name "ovl_Obj_Tokei_Step" compress - include "build/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.o" - include "build/src/overlays/actors/ovl_Obj_Tokei_Step/ovl_Obj_Tokei_Step_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokei_Step/ovl_Obj_Tokei_Step_reloc.o" endseg beginseg name "ovl_Bg_Lotus" compress - include "build/src/overlays/actors/ovl_Bg_Lotus/z_bg_lotus.o" - include "build/src/overlays/actors/ovl_Bg_Lotus/ovl_Bg_Lotus_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Lotus/z_bg_lotus.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Lotus/ovl_Bg_Lotus_reloc.o" endseg beginseg name "ovl_En_Kame" compress - include "build/src/overlays/actors/ovl_En_Kame/z_en_kame.o" - include "build/src/overlays/actors/ovl_En_Kame/ovl_En_Kame_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kame/z_en_kame.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kame/ovl_En_Kame_reloc.o" endseg beginseg name "ovl_Obj_Takaraya_Wall" compress - include "build/src/overlays/actors/ovl_Obj_Takaraya_Wall/z_obj_takaraya_wall.o" - include "build/src/overlays/actors/ovl_Obj_Takaraya_Wall/ovl_Obj_Takaraya_Wall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Takaraya_Wall/z_obj_takaraya_wall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Takaraya_Wall/ovl_Obj_Takaraya_Wall_reloc.o" endseg beginseg name "ovl_Bg_Fu_Mizu" compress - include "build/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.o" - include "build/src/overlays/actors/ovl_Bg_Fu_Mizu/ovl_Bg_Fu_Mizu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Fu_Mizu/ovl_Bg_Fu_Mizu_reloc.o" endseg beginseg name "ovl_En_Sellnuts" compress - include "build/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.o" - include "build/src/overlays/actors/ovl_En_Sellnuts/ovl_En_Sellnuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sellnuts/ovl_En_Sellnuts_reloc.o" endseg beginseg name "ovl_Bg_Dkjail_Ivy" compress - include "build/src/overlays/actors/ovl_Bg_Dkjail_Ivy/z_bg_dkjail_ivy.o" - include "build/src/overlays/actors/ovl_Bg_Dkjail_Ivy/ovl_Bg_Dkjail_Ivy_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dkjail_Ivy/z_bg_dkjail_ivy.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dkjail_Ivy/ovl_Bg_Dkjail_Ivy_reloc.o" endseg beginseg name "ovl_Obj_Visiblock" compress - include "build/src/overlays/actors/ovl_Obj_Visiblock/z_obj_visiblock.o" - include "build/src/overlays/actors/ovl_Obj_Visiblock/ovl_Obj_Visiblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Visiblock/z_obj_visiblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Visiblock/ovl_Obj_Visiblock_reloc.o" endseg beginseg name "ovl_En_Takaraya" compress - include "build/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.o" - include "build/src/overlays/actors/ovl_En_Takaraya/ovl_En_Takaraya_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takaraya/ovl_En_Takaraya_reloc.o" endseg beginseg name "ovl_En_Tsn" compress - include "build/src/overlays/actors/ovl_En_Tsn/z_en_tsn.o" - include "build/src/overlays/actors/ovl_En_Tsn/ovl_En_Tsn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tsn/z_en_tsn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tsn/ovl_En_Tsn_reloc.o" endseg beginseg name "ovl_En_Ds2n" compress - include "build/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.o" - include "build/src/overlays/actors/ovl_En_Ds2n/ovl_En_Ds2n_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds2n/ovl_En_Ds2n_reloc.o" endseg beginseg name "ovl_En_Fsn" compress - include "build/src/overlays/actors/ovl_En_Fsn/z_en_fsn.o" - include "build/src/overlays/actors/ovl_En_Fsn/ovl_En_Fsn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fsn/z_en_fsn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fsn/ovl_En_Fsn_reloc.o" endseg beginseg name "ovl_En_Shn" compress - include "build/src/overlays/actors/ovl_En_Shn/z_en_shn.o" - include "build/src/overlays/actors/ovl_En_Shn/ovl_En_Shn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shn/z_en_shn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shn/ovl_En_Shn_reloc.o" endseg beginseg name "ovl_En_Stop_heishi" compress - include "build/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.o" - include "build/src/overlays/actors/ovl_En_Stop_heishi/ovl_En_Stop_heishi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stop_heishi/ovl_En_Stop_heishi_reloc.o" endseg beginseg name "ovl_Obj_Bigicicle" compress - include "build/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.o" - include "build/src/overlays/actors/ovl_Obj_Bigicicle/ovl_Obj_Bigicicle_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bigicicle/ovl_Obj_Bigicicle_reloc.o" endseg beginseg name "ovl_En_Lift_Nuts" compress - include "build/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.o" - include "build/src/overlays/actors/ovl_En_Lift_Nuts/ovl_En_Lift_Nuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lift_Nuts/ovl_En_Lift_Nuts_reloc.o" endseg beginseg name "ovl_En_Tk" compress - include "build/src/overlays/actors/ovl_En_Tk/z_en_tk.o" - include "build/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/z_en_tk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o" endseg beginseg name "ovl_Bg_Market_Step" compress - include "build/src/overlays/actors/ovl_Bg_Market_Step/z_bg_market_step.o" - include "build/src/overlays/actors/ovl_Bg_Market_Step/ovl_Bg_Market_Step_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Market_Step/z_bg_market_step.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Market_Step/ovl_Bg_Market_Step_reloc.o" endseg beginseg name "ovl_Obj_Lupygamelift" compress - include "build/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.o" - include "build/src/overlays/actors/ovl_Obj_Lupygamelift/ovl_Obj_Lupygamelift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lupygamelift/ovl_Obj_Lupygamelift_reloc.o" endseg beginseg name "ovl_En_Test7" compress - include "build/src/overlays/actors/ovl_En_Test7/z_en_test7.o" - include "build/src/overlays/actors/ovl_En_Test7/ovl_En_Test7_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test7/z_en_test7.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test7/ovl_En_Test7_reloc.o" endseg beginseg name "ovl_Obj_Lightblock" compress - include "build/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.o" - include "build/src/overlays/actors/ovl_Obj_Lightblock/ovl_Obj_Lightblock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightblock/ovl_Obj_Lightblock_reloc.o" endseg beginseg name "ovl_Mir_Ray2" compress - include "build/src/overlays/actors/ovl_Mir_Ray2/z_mir_ray2.o" - include "build/src/overlays/actors/ovl_Mir_Ray2/ovl_Mir_Ray2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray2/z_mir_ray2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray2/ovl_Mir_Ray2_reloc.o" endseg beginseg name "ovl_En_Wdhand" compress - include "build/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.o" - include "build/data/ovl_En_Wdhand/ovl_En_Wdhand.data.o" - include "build/data/ovl_En_Wdhand/ovl_En_Wdhand.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.o" + include "$(BUILD_DIR)/data/ovl_En_Wdhand/ovl_En_Wdhand.data.o" + include "$(BUILD_DIR)/data/ovl_En_Wdhand/ovl_En_Wdhand.reloc.o" endseg beginseg name "ovl_En_Gamelupy" compress - include "build/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.o" - include "build/src/overlays/actors/ovl_En_Gamelupy/ovl_En_Gamelupy_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gamelupy/ovl_En_Gamelupy_reloc.o" endseg beginseg name "ovl_Bg_Danpei_Movebg" compress - include "build/src/overlays/actors/ovl_Bg_Danpei_Movebg/z_bg_danpei_movebg.o" - include "build/data/ovl_Bg_Danpei_Movebg/ovl_Bg_Danpei_Movebg.data.o" - include "build/data/ovl_Bg_Danpei_Movebg/ovl_Bg_Danpei_Movebg.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Danpei_Movebg/z_bg_danpei_movebg.o" + include "$(BUILD_DIR)/data/ovl_Bg_Danpei_Movebg/ovl_Bg_Danpei_Movebg.data.o" + include "$(BUILD_DIR)/data/ovl_Bg_Danpei_Movebg/ovl_Bg_Danpei_Movebg.reloc.o" endseg beginseg name "ovl_En_Snowwd" compress - include "build/src/overlays/actors/ovl_En_Snowwd/z_en_snowwd.o" - include "build/src/overlays/actors/ovl_En_Snowwd/ovl_En_Snowwd_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Snowwd/z_en_snowwd.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Snowwd/ovl_En_Snowwd_reloc.o" endseg beginseg name "ovl_En_Pm" compress - include "build/src/overlays/actors/ovl_En_Pm/z_en_pm.o" - include "build/src/overlays/actors/ovl_En_Pm/ovl_En_Pm_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pm/z_en_pm.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pm/ovl_En_Pm_reloc.o" endseg beginseg name "ovl_En_Gakufu" compress - include "build/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.o" - include "build/src/overlays/actors/ovl_En_Gakufu/ovl_En_Gakufu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gakufu/ovl_En_Gakufu_reloc.o" endseg beginseg name "ovl_Elf_Msg4" compress - include "build/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.o" - include "build/src/overlays/actors/ovl_Elf_Msg4/ovl_Elf_Msg4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg4/ovl_Elf_Msg4_reloc.o" endseg beginseg name "ovl_Elf_Msg5" compress - include "build/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.o" - include "build/src/overlays/actors/ovl_Elf_Msg5/ovl_Elf_Msg5_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg5/ovl_Elf_Msg5_reloc.o" endseg beginseg name "ovl_En_Col_Man" compress - include "build/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.o" - include "build/src/overlays/actors/ovl_En_Col_Man/ovl_En_Col_Man_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Col_Man/ovl_En_Col_Man_reloc.o" endseg beginseg name "ovl_En_Talk_Gibud" compress - include "build/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.o" - include "build/src/overlays/actors/ovl_En_Talk_Gibud/ovl_En_Talk_Gibud_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Talk_Gibud/ovl_En_Talk_Gibud_reloc.o" endseg beginseg name "ovl_En_Giant" compress - include "build/src/overlays/actors/ovl_En_Giant/z_en_giant.o" - include "build/src/overlays/actors/ovl_En_Giant/ovl_En_Giant_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Giant/z_en_giant.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Giant/ovl_En_Giant_reloc.o" endseg beginseg name "ovl_Obj_Snowball" compress - include "build/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.o" - include "build/src/overlays/actors/ovl_Obj_Snowball/ovl_Obj_Snowball_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Snowball/ovl_Obj_Snowball_reloc.o" endseg beginseg name "ovl_Boss_Hakugin" compress - include "build/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.o" - include "build/src/overlays/actors/ovl_Boss_Hakugin/ovl_Boss_Hakugin_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Hakugin/ovl_Boss_Hakugin_reloc.o" endseg beginseg name "ovl_En_Gb2" compress - include "build/src/overlays/actors/ovl_En_Gb2/z_en_gb2.o" - include "build/src/overlays/actors/ovl_En_Gb2/ovl_En_Gb2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb2/z_en_gb2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb2/ovl_En_Gb2_reloc.o" endseg beginseg name "ovl_En_Onpuman" compress - include "build/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.o" - include "build/src/overlays/actors/ovl_En_Onpuman/ovl_En_Onpuman_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Onpuman/ovl_En_Onpuman_reloc.o" endseg beginseg name "ovl_Bg_Tobira01" compress - include "build/src/overlays/actors/ovl_Bg_Tobira01/z_bg_tobira01.o" - include "build/src/overlays/actors/ovl_Bg_Tobira01/ovl_Bg_Tobira01_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Tobira01/z_bg_tobira01.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Tobira01/ovl_Bg_Tobira01_reloc.o" endseg beginseg name "ovl_En_Tag_Obj" compress - include "build/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.o" - include "build/src/overlays/actors/ovl_En_Tag_Obj/ovl_En_Tag_Obj_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tag_Obj/ovl_En_Tag_Obj_reloc.o" endseg beginseg name "ovl_Obj_Dhouse" compress - include "build/src/overlays/actors/ovl_Obj_Dhouse/z_obj_dhouse.o" - include "build/src/overlays/actors/ovl_Obj_Dhouse/ovl_Obj_Dhouse_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dhouse/z_obj_dhouse.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dhouse/ovl_Obj_Dhouse_reloc.o" endseg beginseg name "ovl_Obj_Hakaisi" compress - include "build/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.o" - include "build/src/overlays/actors/ovl_Obj_Hakaisi/ovl_Obj_Hakaisi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hakaisi/ovl_Obj_Hakaisi_reloc.o" endseg beginseg name "ovl_Bg_Hakugin_Switch" compress - include "build/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.o" - include "build/src/overlays/actors/ovl_Bg_Hakugin_Switch/ovl_Bg_Hakugin_Switch_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hakugin_Switch/ovl_Bg_Hakugin_Switch_reloc.o" endseg beginseg name "ovl_En_Snowman" compress - include "build/src/overlays/actors/ovl_En_Snowman/z_en_snowman.o" - include "build/src/overlays/actors/ovl_En_Snowman/ovl_En_Snowman_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Snowman/z_en_snowman.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Snowman/ovl_En_Snowman_reloc.o" endseg beginseg name "ovl_TG_Sw" compress - include "build/src/overlays/actors/ovl_TG_Sw/z_tg_sw.o" - include "build/src/overlays/actors/ovl_TG_Sw/ovl_TG_Sw_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_TG_Sw/z_tg_sw.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_TG_Sw/ovl_TG_Sw_reloc.o" endseg beginseg name "ovl_En_Po_Sisters" compress - include "build/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.o" - include "build/src/overlays/actors/ovl_En_Po_Sisters/ovl_En_Po_Sisters_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/ovl_En_Po_Sisters_reloc.o" endseg beginseg name "ovl_En_Pp" compress - include "build/src/overlays/actors/ovl_En_Pp/z_en_pp.o" - include "build/src/overlays/actors/ovl_En_Pp/ovl_En_Pp_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pp/z_en_pp.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pp/ovl_En_Pp_reloc.o" endseg beginseg name "ovl_En_Hakurock" compress - include "build/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.o" - include "build/src/overlays/actors/ovl_En_Hakurock/ovl_En_Hakurock_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hakurock/ovl_En_Hakurock_reloc.o" endseg beginseg name "ovl_En_Hanabi" compress - include "build/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.o" - include "build/src/overlays/actors/ovl_En_Hanabi/ovl_En_Hanabi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hanabi/ovl_En_Hanabi_reloc.o" endseg beginseg name "ovl_Obj_Dowsing" compress - include "build/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.o" - include "build/src/overlays/actors/ovl_Obj_Dowsing/ovl_Obj_Dowsing_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dowsing/ovl_Obj_Dowsing_reloc.o" endseg beginseg name "ovl_Obj_Wind" compress - include "build/src/overlays/actors/ovl_Obj_Wind/z_obj_wind.o" - include "build/src/overlays/actors/ovl_Obj_Wind/ovl_Obj_Wind_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Wind/z_obj_wind.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Wind/ovl_Obj_Wind_reloc.o" endseg beginseg name "ovl_En_Racedog" compress - include "build/src/overlays/actors/ovl_En_Racedog/z_en_racedog.o" - include "build/src/overlays/actors/ovl_En_Racedog/ovl_En_Racedog_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Racedog/z_en_racedog.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Racedog/ovl_En_Racedog_reloc.o" endseg beginseg name "ovl_En_Kendo_Js" compress - include "build/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.o" - include "build/src/overlays/actors/ovl_En_Kendo_Js/ovl_En_Kendo_Js_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kendo_Js/ovl_En_Kendo_Js_reloc.o" endseg beginseg name "ovl_Bg_Botihasira" compress - include "build/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.o" - include "build/src/overlays/actors/ovl_Bg_Botihasira/ovl_Bg_Botihasira_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Botihasira/ovl_Bg_Botihasira_reloc.o" endseg beginseg name "ovl_En_Fish2" compress - include "build/src/overlays/actors/ovl_En_Fish2/z_en_fish2.o" - include "build/src/overlays/actors/ovl_En_Fish2/ovl_En_Fish2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish2/z_en_fish2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish2/ovl_En_Fish2_reloc.o" endseg beginseg name "ovl_En_Pst" compress - include "build/src/overlays/actors/ovl_En_Pst/z_en_pst.o" - include "build/src/overlays/actors/ovl_En_Pst/ovl_En_Pst_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pst/z_en_pst.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pst/ovl_En_Pst_reloc.o" endseg beginseg name "ovl_En_Poh" compress - include "build/src/overlays/actors/ovl_En_Poh/z_en_poh.o" - include "build/src/overlays/actors/ovl_En_Poh/ovl_En_Poh_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/z_en_poh.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/ovl_En_Poh_reloc.o" endseg beginseg name "ovl_Obj_Spidertent" compress - include "build/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.o" - include "build/src/overlays/actors/ovl_Obj_Spidertent/ovl_Obj_Spidertent_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Spidertent/ovl_Obj_Spidertent_reloc.o" endseg beginseg name "ovl_En_Zoraegg" compress - include "build/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.o" - include "build/src/overlays/actors/ovl_En_Zoraegg/ovl_En_Zoraegg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zoraegg/ovl_En_Zoraegg_reloc.o" endseg beginseg name "ovl_En_Kbt" compress - include "build/src/overlays/actors/ovl_En_Kbt/z_en_kbt.o" - include "build/src/overlays/actors/ovl_En_Kbt/ovl_En_Kbt_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kbt/z_en_kbt.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kbt/ovl_En_Kbt_reloc.o" endseg beginseg name "ovl_En_Gg" compress - include "build/src/overlays/actors/ovl_En_Gg/z_en_gg.o" - include "build/src/overlays/actors/ovl_En_Gg/ovl_En_Gg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gg/z_en_gg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gg/ovl_En_Gg_reloc.o" endseg beginseg name "ovl_En_Maruta" compress - include "build/src/overlays/actors/ovl_En_Maruta/z_en_maruta.o" - include "build/src/overlays/actors/ovl_En_Maruta/ovl_En_Maruta_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Maruta/z_en_maruta.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Maruta/ovl_En_Maruta_reloc.o" endseg beginseg name "ovl_Obj_Snowball2" compress - include "build/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.o" - include "build/src/overlays/actors/ovl_Obj_Snowball2/ovl_Obj_Snowball2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Snowball2/ovl_Obj_Snowball2_reloc.o" endseg beginseg name "ovl_En_Gg2" compress - include "build/src/overlays/actors/ovl_En_Gg2/z_en_gg2.o" - include "build/src/overlays/actors/ovl_En_Gg2/ovl_En_Gg2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gg2/z_en_gg2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gg2/ovl_En_Gg2_reloc.o" endseg beginseg name "ovl_Obj_Ghaka" compress - include "build/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.o" - include "build/src/overlays/actors/ovl_Obj_Ghaka/ovl_Obj_Ghaka_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ghaka/ovl_Obj_Ghaka_reloc.o" endseg beginseg name "ovl_En_Dnp" compress - include "build/src/overlays/actors/ovl_En_Dnp/z_en_dnp.o" - include "build/src/overlays/actors/ovl_En_Dnp/ovl_En_Dnp_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnp/z_en_dnp.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnp/ovl_En_Dnp_reloc.o" endseg beginseg name "ovl_En_Dai" compress - include "build/src/overlays/actors/ovl_En_Dai/z_en_dai.o" - include "build/src/overlays/actors/ovl_En_Dai/ovl_En_Dai_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dai/z_en_dai.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dai/ovl_En_Dai_reloc.o" endseg beginseg name "ovl_Bg_Goron_Oyu" compress - include "build/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.o" - include "build/src/overlays/actors/ovl_Bg_Goron_Oyu/ovl_Bg_Goron_Oyu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Goron_Oyu/ovl_Bg_Goron_Oyu_reloc.o" endseg beginseg name "ovl_En_Kgy" compress - include "build/src/overlays/actors/ovl_En_Kgy/z_en_kgy.o" - include "build/src/overlays/actors/ovl_En_Kgy/ovl_En_Kgy_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kgy/z_en_kgy.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kgy/ovl_En_Kgy_reloc.o" endseg beginseg name "ovl_En_Invadepoh" compress - include "build/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.o" - include "build/data/ovl_En_Invadepoh/ovl_En_Invadepoh.data.o" - include "build/data/ovl_En_Invadepoh/ovl_En_Invadepoh.bss.o" - include "build/data/ovl_En_Invadepoh/ovl_En_Invadepoh.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.o" + include "$(BUILD_DIR)/data/ovl_En_Invadepoh/ovl_En_Invadepoh.data.o" + include "$(BUILD_DIR)/data/ovl_En_Invadepoh/ovl_En_Invadepoh.bss.o" + include "$(BUILD_DIR)/data/ovl_En_Invadepoh/ovl_En_Invadepoh.reloc.o" endseg beginseg name "ovl_En_Gk" compress - include "build/src/overlays/actors/ovl_En_Gk/z_en_gk.o" - include "build/src/overlays/actors/ovl_En_Gk/ovl_En_Gk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gk/z_en_gk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gk/ovl_En_Gk_reloc.o" endseg beginseg name "ovl_En_An" compress - include "build/src/overlays/actors/ovl_En_An/z_en_an.o" - include "build/src/overlays/actors/ovl_En_An/ovl_En_An_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_An/z_en_an.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_An/ovl_En_An_reloc.o" endseg beginseg name "ovl_En_Bee" compress - include "build/src/overlays/actors/ovl_En_Bee/z_en_bee.o" - include "build/src/overlays/actors/ovl_En_Bee/ovl_En_Bee_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bee/z_en_bee.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bee/ovl_En_Bee_reloc.o" endseg beginseg name "ovl_En_Ot" compress - include "build/src/overlays/actors/ovl_En_Ot/z_en_ot.o" - include "build/src/overlays/actors/ovl_En_Ot/ovl_En_Ot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ot/z_en_ot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ot/ovl_En_Ot_reloc.o" endseg beginseg name "ovl_En_Dragon" compress - include "build/src/overlays/actors/ovl_En_Dragon/z_en_dragon.o" - include "build/src/overlays/actors/ovl_En_Dragon/ovl_En_Dragon_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dragon/z_en_dragon.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dragon/ovl_En_Dragon_reloc.o" endseg beginseg name "ovl_Obj_Dora" compress - include "build/src/overlays/actors/ovl_Obj_Dora/z_obj_dora.o" - include "build/src/overlays/actors/ovl_Obj_Dora/ovl_Obj_Dora_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dora/z_obj_dora.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dora/ovl_Obj_Dora_reloc.o" endseg beginseg name "ovl_En_Bigpo" compress - include "build/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.o" - include "build/src/overlays/actors/ovl_En_Bigpo/ovl_En_Bigpo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigpo/ovl_En_Bigpo_reloc.o" endseg beginseg name "ovl_Obj_Kendo_Kanban" compress - include "build/src/overlays/actors/ovl_Obj_Kendo_Kanban/z_obj_kendo_kanban.o" - include "build/src/overlays/actors/ovl_Obj_Kendo_Kanban/ovl_Obj_Kendo_Kanban_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kendo_Kanban/z_obj_kendo_kanban.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kendo_Kanban/ovl_Obj_Kendo_Kanban_reloc.o" endseg beginseg name "ovl_Obj_Hariko" compress - include "build/src/overlays/actors/ovl_Obj_Hariko/z_obj_hariko.o" - include "build/src/overlays/actors/ovl_Obj_Hariko/ovl_Obj_Hariko_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hariko/z_obj_hariko.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hariko/ovl_Obj_Hariko_reloc.o" endseg beginseg name "ovl_En_Sth" compress - include "build/src/overlays/actors/ovl_En_Sth/z_en_sth.o" - include "build/src/overlays/actors/ovl_En_Sth/ovl_En_Sth_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/z_en_sth.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/ovl_En_Sth_reloc.o" endseg beginseg name "ovl_Bg_Sinkai_Kabe" compress - include "build/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.o" - include "build/src/overlays/actors/ovl_Bg_Sinkai_Kabe/ovl_Bg_Sinkai_Kabe_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sinkai_Kabe/ovl_Bg_Sinkai_Kabe_reloc.o" endseg beginseg name "ovl_Bg_Haka_Curtain" compress - include "build/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.o" - include "build/src/overlays/actors/ovl_Bg_Haka_Curtain/ovl_Bg_Haka_Curtain_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Curtain/ovl_Bg_Haka_Curtain_reloc.o" endseg beginseg name "ovl_Bg_Kin2_Bombwall" compress - include "build/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.o" - include "build/src/overlays/actors/ovl_Bg_Kin2_Bombwall/ovl_Bg_Kin2_Bombwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Bombwall/ovl_Bg_Kin2_Bombwall_reloc.o" endseg beginseg name "ovl_Bg_Kin2_Fence" compress - include "build/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.o" - include "build/src/overlays/actors/ovl_Bg_Kin2_Fence/ovl_Bg_Kin2_Fence_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Fence/ovl_Bg_Kin2_Fence_reloc.o" endseg beginseg name "ovl_Bg_Kin2_Picture" compress - include "build/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.o" - include "build/src/overlays/actors/ovl_Bg_Kin2_Picture/ovl_Bg_Kin2_Picture_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Picture/ovl_Bg_Kin2_Picture_reloc.o" endseg beginseg name "ovl_Bg_Kin2_Shelf" compress - include "build/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.o" - include "build/src/overlays/actors/ovl_Bg_Kin2_Shelf/ovl_Bg_Kin2_Shelf_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Kin2_Shelf/ovl_Bg_Kin2_Shelf_reloc.o" endseg beginseg name "ovl_En_Rail_Skb" compress - include "build/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.o" - include "build/src/overlays/actors/ovl_En_Rail_Skb/ovl_En_Rail_Skb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rail_Skb/ovl_En_Rail_Skb_reloc.o" endseg beginseg name "ovl_En_Jg" compress - include "build/src/overlays/actors/ovl_En_Jg/z_en_jg.o" - include "build/src/overlays/actors/ovl_En_Jg/ovl_En_Jg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jg/z_en_jg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jg/ovl_En_Jg_reloc.o" endseg beginseg name "ovl_En_Tru_Mt" compress - include "build/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.o" - include "build/src/overlays/actors/ovl_En_Tru_Mt/ovl_En_Tru_Mt_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tru_Mt/ovl_En_Tru_Mt_reloc.o" endseg beginseg name "ovl_Obj_Um" compress - include "build/src/overlays/actors/ovl_Obj_Um/z_obj_um.o" - include "build/src/overlays/actors/ovl_Obj_Um/ovl_Obj_Um_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Um/z_obj_um.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Um/ovl_Obj_Um_reloc.o" endseg beginseg name "ovl_En_Neo_Reeba" compress - include "build/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.o" - include "build/src/overlays/actors/ovl_En_Neo_Reeba/ovl_En_Neo_Reeba_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Neo_Reeba/ovl_En_Neo_Reeba_reloc.o" endseg beginseg name "ovl_Bg_Mbar_Chair" compress - include "build/src/overlays/actors/ovl_Bg_Mbar_Chair/z_bg_mbar_chair.o" - include "build/src/overlays/actors/ovl_Bg_Mbar_Chair/ovl_Bg_Mbar_Chair_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mbar_Chair/z_bg_mbar_chair.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mbar_Chair/ovl_Bg_Mbar_Chair_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Block" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Block/ovl_Bg_Ikana_Block_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Block/ovl_Bg_Ikana_Block_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Mirror" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Mirror/z_bg_ikana_mirror.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Mirror/ovl_Bg_Ikana_Mirror_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Mirror/z_bg_ikana_mirror.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Mirror/ovl_Bg_Ikana_Mirror_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Rotaryroom" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/ovl_Bg_Ikana_Rotaryroom_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/ovl_Bg_Ikana_Rotaryroom_reloc.o" endseg beginseg name "ovl_Bg_Dblue_Balance" compress - include "build/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.o" - include "build/src/overlays/actors/ovl_Bg_Dblue_Balance/ovl_Bg_Dblue_Balance_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Balance/ovl_Bg_Dblue_Balance_reloc.o" endseg beginseg name "ovl_Bg_Dblue_Waterfall" compress - include "build/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.o" - include "build/src/overlays/actors/ovl_Bg_Dblue_Waterfall/ovl_Bg_Dblue_Waterfall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Waterfall/ovl_Bg_Dblue_Waterfall_reloc.o" endseg beginseg name "ovl_En_Kaizoku" compress - include "build/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.o" - include "build/src/overlays/actors/ovl_En_Kaizoku/ovl_En_Kaizoku_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kaizoku/ovl_En_Kaizoku_reloc.o" endseg beginseg name "ovl_En_Ge2" compress - include "build/src/overlays/actors/ovl_En_Ge2/z_en_ge2.o" - include "build/src/overlays/actors/ovl_En_Ge2/ovl_En_Ge2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/z_en_ge2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/ovl_En_Ge2_reloc.o" endseg beginseg name "ovl_En_Ma_Yts" compress - include "build/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.o" - include "build/src/overlays/actors/ovl_En_Ma_Yts/ovl_En_Ma_Yts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma_Yts/ovl_En_Ma_Yts_reloc.o" endseg beginseg name "ovl_En_Ma_Yto" compress - include "build/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.o" - include "build/src/overlays/actors/ovl_En_Ma_Yto/ovl_En_Ma_Yto_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma_Yto/ovl_En_Ma_Yto_reloc.o" endseg beginseg name "ovl_Obj_Tokei_Turret" compress - include "build/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.o" - include "build/src/overlays/actors/ovl_Obj_Tokei_Turret/ovl_Obj_Tokei_Turret_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tokei_Turret/ovl_Obj_Tokei_Turret_reloc.o" endseg beginseg name "ovl_Bg_Dblue_Elevator" compress - include "build/src/overlays/actors/ovl_Bg_Dblue_Elevator/z_bg_dblue_elevator.o" - include "build/data/ovl_Bg_Dblue_Elevator/ovl_Bg_Dblue_Elevator.data.o" - include "build/data/ovl_Bg_Dblue_Elevator/ovl_Bg_Dblue_Elevator.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dblue_Elevator/z_bg_dblue_elevator.o" + include "$(BUILD_DIR)/data/ovl_Bg_Dblue_Elevator/ovl_Bg_Dblue_Elevator.data.o" + include "$(BUILD_DIR)/data/ovl_Bg_Dblue_Elevator/ovl_Bg_Dblue_Elevator.reloc.o" endseg beginseg name "ovl_Obj_Warpstone" compress - include "build/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.o" - include "build/src/overlays/actors/ovl_Obj_Warpstone/ovl_Obj_Warpstone_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warpstone/ovl_Obj_Warpstone_reloc.o" endseg beginseg name "ovl_En_Zog" compress - include "build/src/overlays/actors/ovl_En_Zog/z_en_zog.o" - include "build/src/overlays/actors/ovl_En_Zog/ovl_En_Zog_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zog/z_en_zog.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zog/ovl_En_Zog_reloc.o" endseg beginseg name "ovl_Obj_Rotlift" compress - include "build/src/overlays/actors/ovl_Obj_Rotlift/z_obj_rotlift.o" - include "build/src/overlays/actors/ovl_Obj_Rotlift/ovl_Obj_Rotlift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Rotlift/z_obj_rotlift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Rotlift/ovl_Obj_Rotlift_reloc.o" endseg beginseg name "ovl_Obj_Jg_Gakki" compress - include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.o" - include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki_reloc.o" endseg beginseg name "ovl_Bg_Inibs_Movebg" compress - include "build/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.o" - include "build/src/overlays/actors/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg_reloc.o" endseg beginseg name "ovl_En_Zot" compress - include "build/src/overlays/actors/ovl_En_Zot/z_en_zot.o" - include "build/src/overlays/actors/ovl_En_Zot/ovl_En_Zot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zot/z_en_zot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zot/ovl_En_Zot_reloc.o" endseg beginseg name "ovl_Obj_Tree" compress - include "build/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.o" - include "build/src/overlays/actors/ovl_Obj_Tree/ovl_Obj_Tree_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tree/ovl_Obj_Tree_reloc.o" endseg beginseg name "ovl_Obj_Y2lift" compress - include "build/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.o" - include "build/src/overlays/actors/ovl_Obj_Y2lift/ovl_Obj_Y2lift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Y2lift/ovl_Obj_Y2lift_reloc.o" endseg beginseg name "ovl_Obj_Y2shutter" compress - include "build/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.o" - include "build/src/overlays/actors/ovl_Obj_Y2shutter/ovl_Obj_Y2shutter_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Y2shutter/ovl_Obj_Y2shutter_reloc.o" endseg beginseg name "ovl_Obj_Boat" compress - include "build/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.o" - include "build/src/overlays/actors/ovl_Obj_Boat/ovl_Obj_Boat_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Boat/ovl_Obj_Boat_reloc.o" endseg beginseg name "ovl_Obj_Taru" compress - include "build/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.o" - include "build/src/overlays/actors/ovl_Obj_Taru/ovl_Obj_Taru_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Taru/ovl_Obj_Taru_reloc.o" endseg beginseg name "ovl_Obj_Hunsui" compress - include "build/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.o" - include "build/src/overlays/actors/ovl_Obj_Hunsui/ovl_Obj_Hunsui_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hunsui/ovl_Obj_Hunsui_reloc.o" endseg beginseg name "ovl_En_Jc_Mato" compress - include "build/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.o" - include "build/src/overlays/actors/ovl_En_Jc_Mato/ovl_En_Jc_Mato_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jc_Mato/ovl_En_Jc_Mato_reloc.o" endseg beginseg name "ovl_Mir_Ray3" compress - include "build/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.o" - include "build/src/overlays/actors/ovl_Mir_Ray3/ovl_Mir_Ray3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray3/ovl_Mir_Ray3_reloc.o" endseg beginseg name "ovl_En_Zob" compress - include "build/src/overlays/actors/ovl_En_Zob/z_en_zob.o" - include "build/src/overlays/actors/ovl_En_Zob/ovl_En_Zob_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zob/z_en_zob.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zob/ovl_En_Zob_reloc.o" endseg beginseg name "ovl_Elf_Msg6" compress - include "build/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.o" - include "build/src/overlays/actors/ovl_Elf_Msg6/ovl_Elf_Msg6_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg6/ovl_Elf_Msg6_reloc.o" endseg beginseg name "ovl_Obj_Nozoki" compress - include "build/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.o" - include "build/src/overlays/actors/ovl_Obj_Nozoki/ovl_Obj_Nozoki_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Nozoki/ovl_Obj_Nozoki_reloc.o" endseg beginseg name "ovl_En_Toto" compress - include "build/src/overlays/actors/ovl_En_Toto/z_en_toto.o" - include "build/src/overlays/actors/ovl_En_Toto/ovl_En_Toto_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toto/z_en_toto.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toto/ovl_En_Toto_reloc.o" endseg beginseg name "ovl_En_Railgibud" compress - include "build/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.o" - include "build/src/overlays/actors/ovl_En_Railgibud/ovl_En_Railgibud_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Railgibud/ovl_En_Railgibud_reloc.o" endseg beginseg name "ovl_En_Baba" compress - include "build/src/overlays/actors/ovl_En_Baba/z_en_baba.o" - include "build/src/overlays/actors/ovl_En_Baba/ovl_En_Baba_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Baba/z_en_baba.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Baba/ovl_En_Baba_reloc.o" endseg beginseg name "ovl_En_Suttari" compress - include "build/src/overlays/actors/ovl_En_Suttari/z_en_suttari.o" - include "build/src/overlays/actors/ovl_En_Suttari/ovl_En_Suttari_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Suttari/z_en_suttari.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Suttari/ovl_En_Suttari_reloc.o" endseg beginseg name "ovl_En_Zod" compress - include "build/src/overlays/actors/ovl_En_Zod/z_en_zod.o" - include "build/src/overlays/actors/ovl_En_Zod/ovl_En_Zod_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zod/z_en_zod.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zod/ovl_En_Zod_reloc.o" endseg beginseg name "ovl_En_Kujiya" compress - include "build/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.o" - include "build/src/overlays/actors/ovl_En_Kujiya/ovl_En_Kujiya_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kujiya/ovl_En_Kujiya_reloc.o" endseg beginseg name "ovl_En_Geg" compress - include "build/src/overlays/actors/ovl_En_Geg/z_en_geg.o" - include "build/src/overlays/actors/ovl_En_Geg/ovl_En_Geg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Geg/z_en_geg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Geg/ovl_En_Geg_reloc.o" endseg beginseg name "ovl_Obj_Kinoko" compress - include "build/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.o" - include "build/src/overlays/actors/ovl_Obj_Kinoko/ovl_Obj_Kinoko_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kinoko/ovl_Obj_Kinoko_reloc.o" endseg beginseg name "ovl_Obj_Yasi" compress - include "build/src/overlays/actors/ovl_Obj_Yasi/z_obj_yasi.o" - include "build/src/overlays/actors/ovl_Obj_Yasi/ovl_Obj_Yasi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Yasi/z_obj_yasi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Yasi/ovl_Obj_Yasi_reloc.o" endseg beginseg name "ovl_En_Tanron1" compress - include "build/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.o" - include "build/src/overlays/actors/ovl_En_Tanron1/ovl_En_Tanron1_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron1/ovl_En_Tanron1_reloc.o" endseg beginseg name "ovl_En_Tanron2" compress - include "build/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.o" - include "build/src/overlays/actors/ovl_En_Tanron2/ovl_En_Tanron2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron2/ovl_En_Tanron2_reloc.o" endseg beginseg name "ovl_En_Tanron3" compress - include "build/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.o" - include "build/src/overlays/actors/ovl_En_Tanron3/ovl_En_Tanron3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron3/ovl_En_Tanron3_reloc.o" endseg beginseg name "ovl_Obj_Chan" compress - include "build/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.o" - include "build/src/overlays/actors/ovl_Obj_Chan/ovl_Obj_Chan_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Chan/ovl_Obj_Chan_reloc.o" endseg beginseg name "ovl_En_Zos" compress - include "build/src/overlays/actors/ovl_En_Zos/z_en_zos.o" - include "build/src/overlays/actors/ovl_En_Zos/ovl_En_Zos_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zos/z_en_zos.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zos/ovl_En_Zos_reloc.o" endseg beginseg name "ovl_En_S_Goro" compress - include "build/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.o" - include "build/src/overlays/actors/ovl_En_S_Goro/ovl_En_S_Goro_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_S_Goro/ovl_En_S_Goro_reloc.o" endseg beginseg name "ovl_En_Nb" compress - include "build/src/overlays/actors/ovl_En_Nb/z_en_nb.o" - include "build/src/overlays/actors/ovl_En_Nb/ovl_En_Nb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/z_en_nb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/ovl_En_Nb_reloc.o" endseg beginseg name "ovl_En_Ja" compress - include "build/src/overlays/actors/ovl_En_Ja/z_en_ja.o" - include "build/src/overlays/actors/ovl_En_Ja/ovl_En_Ja_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ja/z_en_ja.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ja/ovl_En_Ja_reloc.o" endseg beginseg name "ovl_Bg_F40_Block" compress - include "build/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.o" - include "build/src/overlays/actors/ovl_Bg_F40_Block/ovl_Bg_F40_Block_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Block/ovl_Bg_F40_Block_reloc.o" endseg beginseg name "ovl_Bg_F40_Switch" compress - include "build/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.o" - include "build/src/overlays/actors/ovl_Bg_F40_Switch/ovl_Bg_F40_Switch_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_F40_Switch/ovl_Bg_F40_Switch_reloc.o" endseg beginseg name "ovl_En_Po_Composer" compress - include "build/src/overlays/actors/ovl_En_Po_Composer/z_en_po_composer.o" - include "build/src/overlays/actors/ovl_En_Po_Composer/ovl_En_Po_Composer_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Composer/z_en_po_composer.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Composer/ovl_En_Po_Composer_reloc.o" endseg beginseg name "ovl_En_Guruguru" compress - include "build/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.o" - include "build/src/overlays/actors/ovl_En_Guruguru/ovl_En_Guruguru_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guruguru/ovl_En_Guruguru_reloc.o" endseg beginseg name "ovl_Oceff_Wipe5" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe5/ovl_Oceff_Wipe5_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe5/ovl_Oceff_Wipe5_reloc.o" endseg beginseg name "ovl_En_Stone_heishi" compress - include "build/src/overlays/actors/ovl_En_Stone_heishi/z_en_stone_heishi.o" - include "build/src/overlays/actors/ovl_En_Stone_heishi/ovl_En_Stone_heishi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stone_heishi/z_en_stone_heishi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stone_heishi/ovl_En_Stone_heishi_reloc.o" endseg beginseg name "ovl_Oceff_Wipe6" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6_reloc.o" endseg beginseg name "ovl_En_Scopenuts" compress - include "build/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.o" - include "build/src/overlays/actors/ovl_En_Scopenuts/ovl_En_Scopenuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scopenuts/ovl_En_Scopenuts_reloc.o" endseg beginseg name "ovl_En_Scopecrow" compress - include "build/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.o" - include "build/src/overlays/actors/ovl_En_Scopecrow/ovl_En_Scopecrow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scopecrow/ovl_En_Scopecrow_reloc.o" endseg beginseg name "ovl_Oceff_Wipe7" compress - include "build/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.o" - include "build/src/overlays/actors/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7_reloc.o" endseg beginseg name "ovl_Eff_Kamejima_Wave" compress - include "build/src/overlays/actors/ovl_Eff_Kamejima_Wave/z_eff_kamejima_wave.o" - include "build/src/overlays/actors/ovl_Eff_Kamejima_Wave/ovl_Eff_Kamejima_Wave_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Kamejima_Wave/z_eff_kamejima_wave.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Kamejima_Wave/ovl_Eff_Kamejima_Wave_reloc.o" endseg beginseg name "ovl_En_Hg" compress - include "build/src/overlays/actors/ovl_En_Hg/z_en_hg.o" - include "build/src/overlays/actors/ovl_En_Hg/ovl_En_Hg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hg/z_en_hg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hg/ovl_En_Hg_reloc.o" endseg beginseg name "ovl_En_Hgo" compress - include "build/src/overlays/actors/ovl_En_Hgo/z_en_hgo.o" - include "build/src/overlays/actors/ovl_En_Hgo/ovl_En_Hgo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hgo/z_en_hgo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hgo/ovl_En_Hgo_reloc.o" endseg beginseg name "ovl_En_Zov" compress - include "build/src/overlays/actors/ovl_En_Zov/z_en_zov.o" - include "build/src/overlays/actors/ovl_En_Zov/ovl_En_Zov_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zov/z_en_zov.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zov/ovl_En_Zov_reloc.o" endseg beginseg name "ovl_En_Ah" compress - include "build/src/overlays/actors/ovl_En_Ah/z_en_ah.o" - include "build/src/overlays/actors/ovl_En_Ah/ovl_En_Ah_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ah/z_en_ah.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ah/ovl_En_Ah_reloc.o" endseg beginseg name "ovl_Obj_Hgdoor" compress - include "build/src/overlays/actors/ovl_Obj_Hgdoor/z_obj_hgdoor.o" - include "build/src/overlays/actors/ovl_Obj_Hgdoor/ovl_Obj_Hgdoor_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hgdoor/z_obj_hgdoor.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hgdoor/ovl_Obj_Hgdoor_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Bombwall" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Bombwall/ovl_Bg_Ikana_Bombwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Bombwall/ovl_Bg_Ikana_Bombwall_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Ray" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Ray/z_bg_ikana_ray.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Ray/ovl_Bg_Ikana_Ray_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Ray/z_bg_ikana_ray.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Ray/ovl_Bg_Ikana_Ray_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Shutter" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Shutter/z_bg_ikana_shutter.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Shutter/ovl_Bg_Ikana_Shutter_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Shutter/z_bg_ikana_shutter.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Shutter/ovl_Bg_Ikana_Shutter_reloc.o" endseg beginseg name "ovl_Bg_Haka_Bombwall" compress - include "build/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.o" - include "build/src/overlays/actors/ovl_Bg_Haka_Bombwall/ovl_Bg_Haka_Bombwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Bombwall/ovl_Bg_Haka_Bombwall_reloc.o" endseg beginseg name "ovl_Bg_Haka_Tomb" compress - include "build/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.o" - include "build/src/overlays/actors/ovl_Bg_Haka_Tomb/ovl_Bg_Haka_Tomb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tomb/ovl_Bg_Haka_Tomb_reloc.o" endseg beginseg name "ovl_En_Sc_Ruppe" compress - include "build/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.o" - include "build/src/overlays/actors//ovl_En_Sc_Ruppe/ovl_En_Sc_Ruppe_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.o" + include "$(BUILD_DIR)/src/overlays/actors//ovl_En_Sc_Ruppe/ovl_En_Sc_Ruppe_reloc.o" endseg beginseg name "ovl_Bg_Iknv_Doukutu" compress - include "build/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.o" - include "build/src/overlays/actors/ovl_Bg_Iknv_Doukutu/ovl_Bg_Iknv_Doukutu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Iknv_Doukutu/ovl_Bg_Iknv_Doukutu_reloc.o" endseg beginseg name "ovl_Bg_Iknv_Obj" compress - include "build/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.o" - include "build/src/overlays/actors/ovl_Bg_Iknv_Obj/ovl_Bg_Iknv_Obj_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Iknv_Obj/ovl_Bg_Iknv_Obj_reloc.o" endseg beginseg name "ovl_En_Pamera" compress - include "build/src/overlays/actors/ovl_En_Pamera/z_en_pamera.o" - include "build/src/overlays/actors/ovl_En_Pamera/ovl_En_Pamera_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pamera/z_en_pamera.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pamera/ovl_En_Pamera_reloc.o" endseg beginseg name "ovl_Obj_HsStump" compress - include "build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o" - include "build/src/overlays/actors/ovl_Obj_HsStump/ovl_Obj_HsStump_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_HsStump/ovl_Obj_HsStump_reloc.o" endseg beginseg name "ovl_En_Hidden_Nuts" compress - include "build/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.o" - include "build/src/overlays/actors/ovl_En_Hidden_Nuts/ovl_En_Hidden_Nuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hidden_Nuts/ovl_En_Hidden_Nuts_reloc.o" endseg beginseg name "ovl_En_Zow" compress - include "build/src/overlays/actors/ovl_En_Zow/z_en_zow.o" - include "build/src/overlays/actors/ovl_En_Zow/ovl_En_Zow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zow/z_en_zow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zow/ovl_En_Zow_reloc.o" endseg beginseg name "ovl_En_Talk" compress - include "build/src/overlays/actors/ovl_En_Talk/z_en_talk.o" - include "build/src/overlays/actors/ovl_En_Talk/ovl_En_Talk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Talk/z_en_talk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Talk/ovl_En_Talk_reloc.o" endseg beginseg name "ovl_En_Al" compress - include "build/src/overlays/actors/ovl_En_Al/z_en_al.o" - include "build/src/overlays/actors/ovl_En_Al/ovl_En_Al_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Al/z_en_al.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Al/ovl_En_Al_reloc.o" endseg beginseg name "ovl_En_Tab" compress - include "build/src/overlays/actors/ovl_En_Tab/z_en_tab.o" - include "build/src/overlays/actors/ovl_En_Tab/ovl_En_Tab_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tab/z_en_tab.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tab/ovl_En_Tab_reloc.o" endseg beginseg name "ovl_En_Nimotsu" compress - include "build/src/overlays/actors/ovl_En_Nimotsu/z_en_nimotsu.o" - include "build/src/overlays/actors/ovl_En_Nimotsu/ovl_En_Nimotsu_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nimotsu/z_en_nimotsu.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nimotsu/ovl_En_Nimotsu_reloc.o" endseg beginseg name "ovl_En_Hit_Tag" compress - include "build/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.o" - include "build/src/overlays/actors/ovl_En_Hit_Tag/ovl_En_Hit_Tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hit_Tag/ovl_En_Hit_Tag_reloc.o" endseg beginseg name "ovl_En_Ruppecrow" compress - include "build/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.o" - include "build/src/overlays/actors/ovl_En_Ruppecrow/ovl_En_Ruppecrow_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ruppecrow/ovl_En_Ruppecrow_reloc.o" endseg beginseg name "ovl_En_Tanron4" compress - include "build/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.o" - include "build/src/overlays/actors/ovl_En_Tanron4/ovl_En_Tanron4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron4/ovl_En_Tanron4_reloc.o" endseg beginseg name "ovl_En_Tanron5" compress - include "build/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.o" - include "build/src/overlays/actors/ovl_En_Tanron5/ovl_En_Tanron5_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron5/ovl_En_Tanron5_reloc.o" endseg beginseg name "ovl_En_Tanron6" compress - include "build/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.o" - include "build/src/overlays/actors/ovl_En_Tanron6/ovl_En_Tanron6_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tanron6/ovl_En_Tanron6_reloc.o" endseg beginseg name "ovl_En_Daiku2" compress - include "build/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.o" - include "build/src/overlays/actors/ovl_En_Daiku2/ovl_En_Daiku2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku2/ovl_En_Daiku2_reloc.o" endseg beginseg name "ovl_En_Muto" compress - include "build/src/overlays/actors/ovl_En_Muto/z_en_muto.o" - include "build/src/overlays/actors/ovl_En_Muto/ovl_En_Muto_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Muto/z_en_muto.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Muto/ovl_En_Muto_reloc.o" endseg beginseg name "ovl_En_Baisen" compress - include "build/src/overlays/actors/ovl_En_Baisen/z_en_baisen.o" - include "build/src/overlays/actors/ovl_En_Baisen/ovl_En_Baisen_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Baisen/z_en_baisen.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Baisen/ovl_En_Baisen_reloc.o" endseg beginseg name "ovl_En_Heishi" compress - include "build/src/overlays/actors/ovl_En_Heishi/z_en_heishi.o" - include "build/src/overlays/actors/ovl_En_Heishi/ovl_En_Heishi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi/z_en_heishi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi/ovl_En_Heishi_reloc.o" endseg beginseg name "ovl_En_Demo_heishi" compress - include "build/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.o" - include "build/src/overlays/actors/ovl_En_Demo_heishi/ovl_En_Demo_heishi_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Demo_heishi/ovl_En_Demo_heishi_reloc.o" endseg beginseg name "ovl_En_Dt" compress - include "build/src/overlays/actors/ovl_En_Dt/z_en_dt.o" - include "build/src/overlays/actors/ovl_En_Dt/ovl_En_Dt_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dt/z_en_dt.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dt/ovl_En_Dt_reloc.o" endseg beginseg name "ovl_En_Cha" compress - include "build/src/overlays/actors/ovl_En_Cha/z_en_cha.o" - include "build/src/overlays/actors/ovl_En_Cha/ovl_En_Cha_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cha/z_en_cha.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cha/ovl_En_Cha_reloc.o" endseg beginseg name "ovl_Obj_Dinner" compress - include "build/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.o" - include "build/src/overlays/actors/ovl_Obj_Dinner/ovl_Obj_Dinner_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dinner/ovl_Obj_Dinner_reloc.o" endseg beginseg name "ovl_Eff_Lastday" compress - include "build/src/overlays/actors/ovl_Eff_Lastday/z_eff_lastday.o" - include "build/src/overlays/actors/ovl_Eff_Lastday/ovl_Eff_Lastday_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Lastday/z_eff_lastday.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Lastday/ovl_Eff_Lastday_reloc.o" endseg beginseg name "ovl_Bg_Ikana_Dharma" compress - include "build/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.o" - include "build/src/overlays/actors/ovl_Bg_Ikana_Dharma/ovl_Bg_Ikana_Dharma_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikana_Dharma/ovl_Bg_Ikana_Dharma_reloc.o" endseg beginseg name "ovl_En_Akindonuts" compress - include "build/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.o" - include "build/src/overlays/actors/ovl_En_Akindonuts/ovl_En_Akindonuts_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Akindonuts/ovl_En_Akindonuts_reloc.o" endseg beginseg name "ovl_Eff_Stk" compress - include "build/src/overlays/actors/ovl_Eff_Stk/z_eff_stk.o" - include "build/src/overlays/actors/ovl_Eff_Stk/ovl_Eff_Stk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Stk/z_eff_stk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Stk/ovl_Eff_Stk_reloc.o" endseg beginseg name "ovl_En_Ig" compress - include "build/src/overlays/actors/ovl_En_Ig/z_en_ig.o" - include "build/src/overlays/actors/ovl_En_Ig/ovl_En_Ig_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ig/z_en_ig.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ig/ovl_En_Ig_reloc.o" endseg beginseg name "ovl_En_Rg" compress - include "build/src/overlays/actors/ovl_En_Rg/z_en_rg.o" - include "build/src/overlays/actors/ovl_En_Rg/ovl_En_Rg_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rg/z_en_rg.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rg/ovl_En_Rg_reloc.o" endseg beginseg name "ovl_En_Osk" compress - include "build/src/overlays/actors/ovl_En_Osk/z_en_osk.o" - include "build/src/overlays/actors/ovl_En_Osk/ovl_En_Osk_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Osk/z_en_osk.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Osk/ovl_En_Osk_reloc.o" endseg beginseg name "ovl_En_Sth2" compress - include "build/src/overlays/actors/ovl_En_Sth2/z_en_sth2.o" - include "build/src/overlays/actors/ovl_En_Sth2/ovl_En_Sth2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth2/z_en_sth2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth2/ovl_En_Sth2_reloc.o" endseg beginseg name "ovl_En_Yb" compress - include "build/src/overlays/actors/ovl_En_Yb/z_en_yb.o" - include "build/src/overlays/actors/ovl_En_Yb/ovl_En_Yb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yb/z_en_yb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yb/ovl_En_Yb_reloc.o" endseg beginseg name "ovl_En_Rz" compress - include "build/src/overlays/actors/ovl_En_Rz/z_en_rz.o" - include "build/src/overlays/actors/ovl_En_Rz/ovl_En_Rz_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rz/z_en_rz.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rz/ovl_En_Rz_reloc.o" endseg beginseg name "ovl_En_Scopecoin" compress - include "build/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.o" - include "build/src/overlays/actors/ovl_En_Scopecoin/ovl_En_Scopecoin_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scopecoin/ovl_En_Scopecoin_reloc.o" endseg beginseg name "ovl_En_Bjt" compress - include "build/src/overlays/actors/ovl_En_Bjt/z_en_bjt.o" - include "build/src/overlays/actors/ovl_En_Bjt/ovl_En_Bjt_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bjt/z_en_bjt.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bjt/ovl_En_Bjt_reloc.o" endseg beginseg name "ovl_En_Bomjima" compress - include "build/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.o" - include "build/src/overlays/actors/ovl_En_Bomjima/ovl_En_Bomjima_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bomjima/ovl_En_Bomjima_reloc.o" endseg beginseg name "ovl_En_Bomjimb" compress - include "build/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.o" - include "build/src/overlays/actors/ovl_En_Bomjimb/ovl_En_Bomjimb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bomjimb/ovl_En_Bomjimb_reloc.o" endseg beginseg name "ovl_En_Bombers" compress - include "build/src/overlays/actors/ovl_En_Bombers/z_en_bombers.o" - include "build/src/overlays/actors/ovl_En_Bombers/ovl_En_Bombers_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombers/z_en_bombers.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombers/ovl_En_Bombers_reloc.o" endseg beginseg name "ovl_En_Bombers2" compress - include "build/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.o" - include "build/src/overlays/actors/ovl_En_Bombers2/ovl_En_Bombers2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombers2/ovl_En_Bombers2_reloc.o" endseg beginseg name "ovl_En_Bombal" compress - include "build/src/overlays/actors/ovl_En_Bombal/z_en_bombal.o" - include "build/src/overlays/actors/ovl_En_Bombal/ovl_En_Bombal_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombal/z_en_bombal.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombal/ovl_En_Bombal_reloc.o" endseg beginseg name "ovl_Obj_Moon_Stone" compress - include "build/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.o" - include "build/src/overlays/actors/ovl_Obj_Moon_Stone/ovl_Obj_Moon_Stone_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Moon_Stone/ovl_Obj_Moon_Stone_reloc.o" endseg beginseg name "ovl_Obj_Mu_Pict" compress - include "build/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.o" - include "build/src/overlays/actors/ovl_Obj_Mu_Pict/ovl_Obj_Mu_Pict_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mu_Pict/ovl_Obj_Mu_Pict_reloc.o" endseg beginseg name "ovl_Bg_Ikninside" compress - include "build/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.o" - include "build/src/overlays/actors/ovl_Bg_Ikninside/ovl_Bg_Ikninside_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ikninside/ovl_Bg_Ikninside_reloc.o" endseg beginseg name "ovl_Eff_Zoraband" compress - include "build/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.o" - include "build/src/overlays/actors/ovl_Eff_Zoraband/ovl_Eff_Zoraband_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Zoraband/ovl_Eff_Zoraband_reloc.o" endseg beginseg name "ovl_Obj_Kepn_Koya" compress - include "build/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.o" - include "build/src/overlays/actors/ovl_Obj_Kepn_Koya/ovl_Obj_Kepn_Koya_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kepn_Koya/ovl_Obj_Kepn_Koya_reloc.o" endseg beginseg name "ovl_Obj_Usiyane" compress - include "build/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.o" - include "build/src/overlays/actors/ovl_Obj_Usiyane/ovl_Obj_Usiyane_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Usiyane/ovl_Obj_Usiyane_reloc.o" endseg beginseg name "ovl_En_Nnh" compress - include "build/src/overlays/actors/ovl_En_Nnh/z_en_nnh.o" - include "build/src/overlays/actors/ovl_En_Nnh/ovl_En_Nnh_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nnh/z_en_nnh.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nnh/ovl_En_Nnh_reloc.o" endseg beginseg name "ovl_Obj_Kzsaku" compress - include "build/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.o" - include "build/src/overlays/actors/ovl_Obj_Kzsaku/ovl_Obj_Kzsaku_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kzsaku/ovl_Obj_Kzsaku_reloc.o" endseg beginseg name "ovl_Obj_Milk_Bin" compress - include "build/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.o" - include "build/src/overlays/actors/ovl_Obj_Milk_Bin/ovl_Obj_Milk_Bin_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Milk_Bin/ovl_Obj_Milk_Bin_reloc.o" endseg beginseg name "ovl_En_Kitan" compress - include "build/src/overlays/actors/ovl_En_Kitan/z_en_kitan.o" - include "build/src/overlays/actors/ovl_En_Kitan/ovl_En_Kitan_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kitan/z_en_kitan.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kitan/ovl_En_Kitan_reloc.o" endseg beginseg name "ovl_Bg_Astr_Bombwall" compress - include "build/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.o" - include "build/src/overlays/actors/ovl_Bg_Astr_Bombwall/ovl_Bg_Astr_Bombwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Astr_Bombwall/ovl_Bg_Astr_Bombwall_reloc.o" endseg beginseg name "ovl_Bg_Iknin_Susceil" compress - include "build/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.o" - include "build/src/overlays/actors/ovl_Bg_Iknin_Susceil/ovl_Bg_Iknin_Susceil_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Iknin_Susceil/ovl_Bg_Iknin_Susceil_reloc.o" endseg beginseg name "ovl_En_Bsb" compress - include "build/src/overlays/actors/ovl_En_Bsb/z_en_bsb.o" - include "build/data/ovl_En_Bsb/ovl_En_Bsb.data.o" - include "build/data/ovl_En_Bsb/ovl_En_Bsb.reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bsb/z_en_bsb.o" + include "$(BUILD_DIR)/data/ovl_En_Bsb/ovl_En_Bsb.data.o" + include "$(BUILD_DIR)/data/ovl_En_Bsb/ovl_En_Bsb.reloc.o" endseg beginseg name "ovl_En_Recepgirl" compress - include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" - include "build/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o" endseg beginseg name "ovl_En_Thiefbird" compress - include "build/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.o" - include "build/src/overlays/actors/ovl_En_Thiefbird/ovl_En_Thiefbird_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Thiefbird/ovl_En_Thiefbird_reloc.o" endseg beginseg name "ovl_En_Jgame_Tsn" compress - include "build/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.o" - include "build/src/overlays/actors/ovl_En_Jgame_Tsn/ovl_En_Jgame_Tsn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jgame_Tsn/ovl_En_Jgame_Tsn_reloc.o" endseg beginseg name "ovl_Obj_Jgame_Light" compress - include "build/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.o" - include "build/src/overlays/actors/ovl_Obj_Jgame_Light/ovl_Obj_Jgame_Light_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Jgame_Light/ovl_Obj_Jgame_Light_reloc.o" endseg beginseg name "ovl_Obj_Yado" compress - include "build/src/overlays/actors/ovl_Obj_Yado/z_obj_yado.o" - include "build/src/overlays/actors/ovl_Obj_Yado/ovl_Obj_Yado_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Yado/z_obj_yado.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Yado/ovl_Obj_Yado_reloc.o" endseg beginseg name "ovl_Demo_Syoten" compress - include "build/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.o" - include "build/src/overlays/actors/ovl_Demo_Syoten/ovl_Demo_Syoten_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Syoten/ovl_Demo_Syoten_reloc.o" endseg beginseg name "ovl_Demo_Moonend" compress - include "build/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.o" - include "build/src/overlays/actors/ovl_Demo_Moonend/ovl_Demo_Moonend_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Moonend/ovl_Demo_Moonend_reloc.o" endseg beginseg name "ovl_Bg_Lbfshot" compress - include "build/src/overlays/actors/ovl_Bg_Lbfshot/z_bg_lbfshot.o" - include "build/src/overlays/actors/ovl_Bg_Lbfshot/ovl_Bg_Lbfshot_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Lbfshot/z_bg_lbfshot.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Lbfshot/ovl_Bg_Lbfshot_reloc.o" endseg beginseg name "ovl_Bg_Last_Bwall" compress - include "build/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.o" - include "build/src/overlays/actors/ovl_Bg_Last_Bwall/ovl_Bg_Last_Bwall_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Last_Bwall/ovl_Bg_Last_Bwall_reloc.o" endseg beginseg name "ovl_En_And" compress - include "build/src/overlays/actors/ovl_En_And/z_en_and.o" - include "build/src/overlays/actors/ovl_En_And/ovl_En_And_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_And/z_en_and.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_And/ovl_En_And_reloc.o" endseg beginseg name "ovl_En_Invadepoh_Demo" compress - include "build/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.o" - include "build/src/overlays/actors/ovl_En_Invadepoh_Demo/ovl_En_Invadepoh_Demo_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Invadepoh_Demo/ovl_En_Invadepoh_Demo_reloc.o" endseg beginseg name "ovl_Obj_Danpeilift" compress - include "build/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.o" - include "build/src/overlays/actors/ovl_Obj_Danpeilift/ovl_Obj_Danpeilift_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Danpeilift/ovl_Obj_Danpeilift_reloc.o" endseg beginseg name "ovl_En_Fall2" compress - include "build/src/overlays/actors/ovl_En_Fall2/z_en_fall2.o" - include "build/src/overlays/actors/ovl_En_Fall2/ovl_En_Fall2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fall2/z_en_fall2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fall2/ovl_En_Fall2_reloc.o" endseg beginseg name "ovl_Dm_Al" compress - include "build/src/overlays/actors/ovl_Dm_Al/z_dm_al.o" - include "build/src/overlays/actors/ovl_Dm_Al/ovl_Dm_Al_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Al/z_dm_al.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Al/ovl_Dm_Al_reloc.o" endseg beginseg name "ovl_Dm_An" compress - include "build/src/overlays/actors/ovl_Dm_An/z_dm_an.o" - include "build/src/overlays/actors/ovl_Dm_An/ovl_Dm_An_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_An/z_dm_an.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_An/ovl_Dm_An_reloc.o" endseg beginseg name "ovl_Dm_Ah" compress - include "build/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.o" - include "build/src/overlays/actors/ovl_Dm_Ah/ovl_Dm_Ah_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Ah/ovl_Dm_Ah_reloc.o" endseg beginseg name "ovl_Dm_Nb" compress - include "build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o" - include "build/src/overlays/actors/ovl_Dm_Nb/ovl_Dm_Nb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Nb/ovl_Dm_Nb_reloc.o" endseg beginseg name "ovl_En_Drs" compress - include "build/src/overlays/actors/ovl_En_Drs/z_en_drs.o" - include "build/src/overlays/actors/ovl_En_Drs/ovl_En_Drs_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Drs/z_en_drs.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Drs/ovl_En_Drs_reloc.o" endseg beginseg name "ovl_En_Ending_Hero" compress - include "build/src/overlays/actors/ovl_En_Ending_Hero/z_en_ending_hero.o" - include "build/src/overlays/actors/ovl_En_Ending_Hero/ovl_En_Ending_Hero_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero/z_en_ending_hero.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero/ovl_En_Ending_Hero_reloc.o" endseg beginseg name "ovl_Dm_Bal" compress - include "build/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.o" - include "build/src/overlays/actors/ovl_Dm_Bal/ovl_Dm_Bal_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Bal/ovl_Dm_Bal_reloc.o" endseg beginseg name "ovl_En_Paper" compress - include "build/src/overlays/actors/ovl_En_Paper/z_en_paper.o" - include "build/src/overlays/actors/ovl_En_Paper/ovl_En_Paper_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Paper/z_en_paper.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Paper/ovl_En_Paper_reloc.o" endseg beginseg name "ovl_En_Hint_Skb" compress - include "build/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.o" - include "build/src/overlays/actors/ovl_En_Hint_Skb/ovl_En_Hint_Skb_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hint_Skb/ovl_En_Hint_Skb_reloc.o" endseg beginseg name "ovl_Dm_Tag" compress - include "build/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.o" - include "build/src/overlays/actors/ovl_Dm_Tag/ovl_Dm_Tag_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Tag/ovl_Dm_Tag_reloc.o" endseg beginseg name "ovl_En_Bh" compress - include "build/src/overlays/actors/ovl_En_Bh/z_en_bh.o" - include "build/src/overlays/actors/ovl_En_Bh/ovl_En_Bh_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bh/z_en_bh.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bh/ovl_En_Bh_reloc.o" endseg beginseg name "ovl_En_Ending_Hero2" compress - include "build/src/overlays/actors/ovl_En_Ending_Hero2/z_en_ending_hero2.o" - include "build/src/overlays/actors/ovl_En_Ending_Hero2/ovl_En_Ending_Hero2_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero2/z_en_ending_hero2.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero2/ovl_En_Ending_Hero2_reloc.o" endseg beginseg name "ovl_En_Ending_Hero3" compress - include "build/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.o" - include "build/src/overlays/actors/ovl_En_Ending_Hero3/ovl_En_Ending_Hero3_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero3/ovl_En_Ending_Hero3_reloc.o" endseg beginseg name "ovl_En_Ending_Hero4" compress - include "build/src/overlays/actors/ovl_En_Ending_Hero4/z_en_ending_hero4.o" - include "build/src/overlays/actors/ovl_En_Ending_Hero4/ovl_En_Ending_Hero4_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero4/z_en_ending_hero4.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero4/ovl_En_Ending_Hero4_reloc.o" endseg beginseg name "ovl_En_Ending_Hero5" compress - include "build/src/overlays/actors/ovl_En_Ending_Hero5/z_en_ending_hero5.o" - include "build/src/overlays/actors/ovl_En_Ending_Hero5/ovl_En_Ending_Hero5_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero5/z_en_ending_hero5.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero5/ovl_En_Ending_Hero5_reloc.o" endseg beginseg name "ovl_En_Ending_Hero6" compress - include "build/src/overlays/actors/ovl_En_Ending_Hero6/z_en_ending_hero6.o" - include "build/src/overlays/actors/ovl_En_Ending_Hero6/ovl_En_Ending_Hero6_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero6/z_en_ending_hero6.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ending_Hero6/ovl_En_Ending_Hero6_reloc.o" endseg beginseg name "ovl_Dm_Gm" compress - include "build/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.o" - include "build/src/overlays/actors/ovl_Dm_Gm/ovl_Dm_Gm_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Dm_Gm/ovl_Dm_Gm_reloc.o" endseg beginseg name "ovl_Obj_Swprize" compress - include "build/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.o" - include "build/src/overlays/actors/ovl_Obj_Swprize/ovl_Obj_Swprize_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Swprize/ovl_Obj_Swprize_reloc.o" endseg beginseg name "ovl_En_Invisible_Ruppe" compress - include "build/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.o" - include "build/src/overlays/actors/ovl_En_Invisible_Ruppe/ovl_En_Invisible_Ruppe_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Invisible_Ruppe/ovl_En_Invisible_Ruppe_reloc.o" endseg beginseg name "ovl_Obj_Ending" compress - include "build/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.o" - include "build/src/overlays/actors/ovl_Obj_Ending/ovl_Obj_Ending_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ending/ovl_Obj_Ending_reloc.o" endseg beginseg name "ovl_En_Rsn" compress - include "build/src/overlays/actors/ovl_En_Rsn/z_en_rsn.o" - include "build/src/overlays/actors/ovl_En_Rsn/ovl_En_Rsn_reloc.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rsn/z_en_rsn.o" + include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rsn/ovl_En_Rsn_reloc.o" endseg beginseg @@ -4998,7 +4998,7 @@ beginseg compress romalign 0x1000 number 4 - include "build/assets/objects/gameplay_keep/gameplay_keep.o" + include "$(BUILD_DIR)/assets/objects/gameplay_keep/gameplay_keep.o" endseg beginseg @@ -5006,7 +5006,7 @@ beginseg compress romalign 0x1000 number 5 - include "build/assets/objects/gameplay_field_keep/gameplay_field_keep.o" + include "$(BUILD_DIR)/assets/objects/gameplay_field_keep/gameplay_field_keep.o" endseg beginseg @@ -5014,14 +5014,14 @@ beginseg compress romalign 0x1000 number 5 - include "build/assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.o" + include "$(BUILD_DIR)/assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.o" endseg beginseg name "gameplay_object_exchange_static" - compress + flags SYMS romalign 0x1000 - include "build/baserom/gameplay_object_exchange_static.o" + include "$(BUILD_DIR)/baserom/gameplay_object_exchange_static.o" endseg beginseg @@ -5029,7 +5029,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_link_boy/object_link_boy.o" + include "$(BUILD_DIR)/assets/objects/object_link_boy/object_link_boy.o" endseg beginseg @@ -5037,7 +5037,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_link_child/object_link_child.o" + include "$(BUILD_DIR)/assets/objects/object_link_child/object_link_child.o" endseg beginseg @@ -5045,7 +5045,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_link_goron/object_link_goron.o" + include "$(BUILD_DIR)/assets/objects/object_link_goron/object_link_goron.o" endseg beginseg @@ -5053,7 +5053,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_link_zora/object_link_zora.o" + include "$(BUILD_DIR)/assets/objects/object_link_zora/object_link_zora.o" endseg beginseg @@ -5061,7 +5061,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_link_nuts/object_link_nuts.o" + include "$(BUILD_DIR)/assets/objects/object_link_nuts/object_link_nuts.o" endseg beginseg @@ -5069,7 +5069,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_ki_tan/object_mask_ki_tan.o" + include "$(BUILD_DIR)/assets/objects/object_mask_ki_tan/object_mask_ki_tan.o" endseg beginseg @@ -5077,7 +5077,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_rabit/object_mask_rabit.o" + include "$(BUILD_DIR)/assets/objects/object_mask_rabit/object_mask_rabit.o" endseg beginseg @@ -5085,7 +5085,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_skj/object_mask_skj.o" + include "$(BUILD_DIR)/assets/objects/object_mask_skj/object_mask_skj.o" endseg beginseg @@ -5093,7 +5093,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_truth/object_mask_truth.o" + include "$(BUILD_DIR)/assets/objects/object_mask_truth/object_mask_truth.o" endseg beginseg @@ -5101,7 +5101,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_gibudo/object_mask_gibudo.o" + include "$(BUILD_DIR)/assets/objects/object_mask_gibudo/object_mask_gibudo.o" endseg beginseg @@ -5109,7 +5109,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_json/object_mask_json.o" + include "$(BUILD_DIR)/assets/objects/object_mask_json/object_mask_json.o" endseg beginseg @@ -5117,7 +5117,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_kerfay/object_mask_kerfay.o" + include "$(BUILD_DIR)/assets/objects/object_mask_kerfay/object_mask_kerfay.o" endseg beginseg @@ -5125,7 +5125,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_bigelf/object_mask_bigelf.o" + include "$(BUILD_DIR)/assets/objects/object_mask_bigelf/object_mask_bigelf.o" endseg beginseg @@ -5133,7 +5133,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_kyojin/object_mask_kyojin.o" + include "$(BUILD_DIR)/assets/objects/object_mask_kyojin/object_mask_kyojin.o" endseg beginseg @@ -5141,7 +5141,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_romerny/object_mask_romerny.o" + include "$(BUILD_DIR)/assets/objects/object_mask_romerny/object_mask_romerny.o" endseg beginseg @@ -5149,7 +5149,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_posthat/object_mask_posthat.o" + include "$(BUILD_DIR)/assets/objects/object_mask_posthat/object_mask_posthat.o" endseg beginseg @@ -5157,7 +5157,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_zacho/object_mask_zacho.o" + include "$(BUILD_DIR)/assets/objects/object_mask_zacho/object_mask_zacho.o" endseg beginseg @@ -5165,7 +5165,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_stone/object_mask_stone.o" + include "$(BUILD_DIR)/assets/objects/object_mask_stone/object_mask_stone.o" endseg beginseg @@ -5173,7 +5173,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_bree/object_mask_bree.o" + include "$(BUILD_DIR)/assets/objects/object_mask_bree/object_mask_bree.o" endseg beginseg @@ -5181,7 +5181,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_gero/object_mask_gero.o" + include "$(BUILD_DIR)/assets/objects/object_mask_gero/object_mask_gero.o" endseg beginseg @@ -5189,7 +5189,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_yofukasi/object_mask_yofukasi.o" + include "$(BUILD_DIR)/assets/objects/object_mask_yofukasi/object_mask_yofukasi.o" endseg beginseg @@ -5197,7 +5197,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_meoto/object_mask_meoto.o" + include "$(BUILD_DIR)/assets/objects/object_mask_meoto/object_mask_meoto.o" endseg beginseg @@ -5205,7 +5205,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_dancer/object_mask_dancer.o" + include "$(BUILD_DIR)/assets/objects/object_mask_dancer/object_mask_dancer.o" endseg beginseg @@ -5213,7 +5213,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_bakuretu/object_mask_bakuretu.o" + include "$(BUILD_DIR)/assets/objects/object_mask_bakuretu/object_mask_bakuretu.o" endseg beginseg @@ -5221,7 +5221,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_bu_san/object_mask_bu_san.o" + include "$(BUILD_DIR)/assets/objects/object_mask_bu_san/object_mask_bu_san.o" endseg beginseg @@ -5229,7 +5229,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_goron/object_mask_goron.o" + include "$(BUILD_DIR)/assets/objects/object_mask_goron/object_mask_goron.o" endseg beginseg @@ -5237,7 +5237,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_zora/object_mask_zora.o" + include "$(BUILD_DIR)/assets/objects/object_mask_zora/object_mask_zora.o" endseg beginseg @@ -5245,7 +5245,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_nuts/object_mask_nuts.o" + include "$(BUILD_DIR)/assets/objects/object_mask_nuts/object_mask_nuts.o" endseg beginseg @@ -5253,7 +5253,7 @@ beginseg compress romalign 0x1000 number 10 - include "build/assets/objects/object_mask_boy/object_mask_boy.o" + include "$(BUILD_DIR)/assets/objects/object_mask_boy/object_mask_boy.o" endseg beginseg @@ -5261,7 +5261,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_box/object_box.o" + include "$(BUILD_DIR)/assets/objects/object_box/object_box.o" endseg beginseg @@ -5269,7 +5269,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_okuta/object_okuta.o" + include "$(BUILD_DIR)/assets/objects/object_okuta/object_okuta.o" endseg beginseg @@ -5277,7 +5277,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wallmaster/object_wallmaster.o" + include "$(BUILD_DIR)/assets/objects/object_wallmaster/object_wallmaster.o" endseg beginseg @@ -5285,7 +5285,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dy_obj/object_dy_obj.o" + include "$(BUILD_DIR)/assets/objects/object_dy_obj/object_dy_obj.o" endseg beginseg @@ -5293,7 +5293,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_firefly/object_firefly.o" + include "$(BUILD_DIR)/assets/objects/object_firefly/object_firefly.o" endseg beginseg @@ -5301,7 +5301,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dodongo/object_dodongo.o" + include "$(BUILD_DIR)/assets/objects/object_dodongo/object_dodongo.o" endseg beginseg @@ -5309,7 +5309,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_niw/object_niw.o" + include "$(BUILD_DIR)/assets/objects/object_niw/object_niw.o" endseg beginseg @@ -5317,7 +5317,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tite/object_tite.o" + include "$(BUILD_DIR)/assets/objects/object_tite/object_tite.o" endseg beginseg @@ -5325,7 +5325,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ph/object_ph.o" + include "$(BUILD_DIR)/assets/objects/object_ph/object_ph.o" endseg beginseg @@ -5333,7 +5333,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dinofos/object_dinofos.o" + include "$(BUILD_DIR)/assets/objects/object_dinofos/object_dinofos.o" endseg beginseg @@ -5341,7 +5341,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zl1/object_zl1.o" + include "$(BUILD_DIR)/assets/objects/object_zl1/object_zl1.o" endseg beginseg @@ -5349,7 +5349,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bubble/object_bubble.o" + include "$(BUILD_DIR)/assets/objects/object_bubble/object_bubble.o" endseg beginseg @@ -5357,7 +5357,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_test3/object_test3.o" + include "$(BUILD_DIR)/assets/objects/object_test3/object_test3.o" endseg beginseg @@ -5365,7 +5365,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_famos/object_famos.o" + include "$(BUILD_DIR)/assets/objects/object_famos/object_famos.o" endseg beginseg @@ -5373,7 +5373,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_st/object_st.o" + include "$(BUILD_DIR)/assets/objects/object_st/object_st.o" endseg beginseg @@ -5381,7 +5381,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_thiefbird/object_thiefbird.o" + include "$(BUILD_DIR)/assets/objects/object_thiefbird/object_thiefbird.o" endseg beginseg @@ -5389,7 +5389,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bombf/object_bombf.o" + include "$(BUILD_DIR)/assets/objects/object_bombf/object_bombf.o" endseg beginseg @@ -5397,7 +5397,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_am/object_am.o" + include "$(BUILD_DIR)/assets/objects/object_am/object_am.o" endseg beginseg @@ -5405,7 +5405,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dekubaba/object_dekubaba.o" + include "$(BUILD_DIR)/assets/objects/object_dekubaba/object_dekubaba.o" endseg beginseg @@ -5413,7 +5413,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_warp1/object_warp1.o" + include "$(BUILD_DIR)/assets/objects/object_warp1/object_warp1.o" endseg beginseg @@ -5421,7 +5421,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_b_heart/object_b_heart.o" + include "$(BUILD_DIR)/assets/objects/object_b_heart/object_b_heart.o" endseg beginseg @@ -5429,7 +5429,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dekunuts/object_dekunuts.o" + include "$(BUILD_DIR)/assets/objects/object_dekunuts/object_dekunuts.o" endseg beginseg @@ -5437,7 +5437,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bb/object_bb.o" + include "$(BUILD_DIR)/assets/objects/object_bb/object_bb.o" endseg beginseg @@ -5445,7 +5445,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_death/object_death.o" + include "$(BUILD_DIR)/assets/objects/object_death/object_death.o" endseg beginseg @@ -5453,7 +5453,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hata/object_hata.o" + include "$(BUILD_DIR)/assets/objects/object_hata/object_hata.o" endseg beginseg @@ -5461,7 +5461,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wood02/object_wood02.o" + include "$(BUILD_DIR)/assets/objects/object_wood02/object_wood02.o" endseg beginseg @@ -5469,7 +5469,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_trap/object_trap.o" + include "$(BUILD_DIR)/assets/objects/object_trap/object_trap.o" endseg beginseg @@ -5477,7 +5477,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_vm/object_vm.o" + include "$(BUILD_DIR)/assets/objects/object_vm/object_vm.o" endseg beginseg @@ -5485,7 +5485,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_efc_star_field/object_efc_star_field.o" + include "$(BUILD_DIR)/assets/objects/object_efc_star_field/object_efc_star_field.o" endseg beginseg @@ -5493,7 +5493,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rd/object_rd.o" + include "$(BUILD_DIR)/assets/objects/object_rd/object_rd.o" endseg beginseg @@ -5501,7 +5501,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_yukimura_obj/object_yukimura_obj.o" + include "$(BUILD_DIR)/assets/objects/object_yukimura_obj/object_yukimura_obj.o" endseg beginseg @@ -5509,7 +5509,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_horse_link_child/object_horse_link_child.o" + include "$(BUILD_DIR)/assets/objects/object_horse_link_child/object_horse_link_child.o" endseg beginseg @@ -5517,7 +5517,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_syokudai/object_syokudai.o" + include "$(BUILD_DIR)/assets/objects/object_syokudai/object_syokudai.o" endseg beginseg @@ -5525,7 +5525,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_efc_tw/object_efc_tw.o" + include "$(BUILD_DIR)/assets/objects/object_efc_tw/object_efc_tw.o" endseg beginseg @@ -5533,7 +5533,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_key/object_gi_key.o" + include "$(BUILD_DIR)/assets/objects/object_gi_key/object_gi_key.o" endseg beginseg @@ -5541,7 +5541,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mir_ray/object_mir_ray.o" + include "$(BUILD_DIR)/assets/objects/object_mir_ray/object_mir_ray.o" endseg beginseg @@ -5549,7 +5549,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ctower_rot/object_ctower_rot.o" + include "$(BUILD_DIR)/assets/objects/object_ctower_rot/object_ctower_rot.o" endseg beginseg @@ -5557,7 +5557,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bdoor/object_bdoor.o" + include "$(BUILD_DIR)/assets/objects/object_bdoor/object_bdoor.o" endseg beginseg @@ -5565,7 +5565,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sb/object_sb.o" + include "$(BUILD_DIR)/assets/objects/object_sb/object_sb.o" endseg beginseg @@ -5573,7 +5573,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_melody/object_gi_melody.o" + include "$(BUILD_DIR)/assets/objects/object_gi_melody/object_gi_melody.o" endseg beginseg @@ -5581,7 +5581,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_heart/object_gi_heart.o" + include "$(BUILD_DIR)/assets/objects/object_gi_heart/object_gi_heart.o" endseg beginseg @@ -5589,7 +5589,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_compass/object_gi_compass.o" + include "$(BUILD_DIR)/assets/objects/object_gi_compass/object_gi_compass.o" endseg beginseg @@ -5597,7 +5597,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bosskey/object_gi_bosskey.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bosskey/object_gi_bosskey.o" endseg beginseg @@ -5605,7 +5605,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_nuts/object_gi_nuts.o" + include "$(BUILD_DIR)/assets/objects/object_gi_nuts/object_gi_nuts.o" endseg beginseg @@ -5613,7 +5613,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_hearts/object_gi_hearts.o" + include "$(BUILD_DIR)/assets/objects/object_gi_hearts/object_gi_hearts.o" endseg beginseg @@ -5621,7 +5621,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_arrowcase/object_gi_arrowcase.o" + include "$(BUILD_DIR)/assets/objects/object_gi_arrowcase/object_gi_arrowcase.o" endseg beginseg @@ -5629,7 +5629,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bombpouch/object_gi_bombpouch.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bombpouch/object_gi_bombpouch.o" endseg beginseg @@ -5637,7 +5637,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_in/object_in.o" + include "$(BUILD_DIR)/assets/objects/object_in/object_in.o" endseg beginseg @@ -5645,7 +5645,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_os_anime/object_os_anime.o" + include "$(BUILD_DIR)/assets/objects/object_os_anime/object_os_anime.o" endseg beginseg @@ -5653,7 +5653,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle/object_gi_bottle.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle/object_gi_bottle.o" endseg beginseg @@ -5661,7 +5661,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_stick/object_gi_stick.o" + include "$(BUILD_DIR)/assets/objects/object_gi_stick/object_gi_stick.o" endseg beginseg @@ -5669,7 +5669,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_map/object_gi_map.o" + include "$(BUILD_DIR)/assets/objects/object_gi_map/object_gi_map.o" endseg beginseg @@ -5677,7 +5677,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_oF1d_map/object_oF1d_map.o" + include "$(BUILD_DIR)/assets/objects/object_oF1d_map/object_oF1d_map.o" endseg beginseg @@ -5685,7 +5685,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ru2/object_ru2.o" + include "$(BUILD_DIR)/assets/objects/object_ru2/object_ru2.o" endseg beginseg @@ -5693,7 +5693,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_magicpot/object_gi_magicpot.o" + include "$(BUILD_DIR)/assets/objects/object_gi_magicpot/object_gi_magicpot.o" endseg beginseg @@ -5701,7 +5701,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bomb_1/object_gi_bomb_1.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bomb_1/object_gi_bomb_1.o" endseg beginseg @@ -5709,7 +5709,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ma2/object_ma2.o" + include "$(BUILD_DIR)/assets/objects/object_ma2/object_ma2.o" endseg beginseg @@ -5717,7 +5717,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_purse/object_gi_purse.o" + include "$(BUILD_DIR)/assets/objects/object_gi_purse/object_gi_purse.o" endseg beginseg @@ -5725,7 +5725,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rr/object_rr.o" + include "$(BUILD_DIR)/assets/objects/object_rr/object_rr.o" endseg beginseg @@ -5733,7 +5733,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_arrow/object_gi_arrow.o" + include "$(BUILD_DIR)/assets/objects/object_gi_arrow/object_gi_arrow.o" endseg beginseg @@ -5741,7 +5741,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bomb_2/object_gi_bomb_2.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bomb_2/object_gi_bomb_2.o" endseg beginseg @@ -5749,7 +5749,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_shield_2/object_gi_shield_2.o" + include "$(BUILD_DIR)/assets/objects/object_gi_shield_2/object_gi_shield_2.o" endseg beginseg @@ -5757,7 +5757,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_hookshot/object_gi_hookshot.o" + include "$(BUILD_DIR)/assets/objects/object_gi_hookshot/object_gi_hookshot.o" endseg beginseg @@ -5765,7 +5765,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_ocarina/object_gi_ocarina.o" + include "$(BUILD_DIR)/assets/objects/object_gi_ocarina/object_gi_ocarina.o" endseg beginseg @@ -5773,7 +5773,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_milk/object_gi_milk.o" + include "$(BUILD_DIR)/assets/objects/object_gi_milk/object_gi_milk.o" endseg beginseg @@ -5781,7 +5781,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ma1/object_ma1.o" + include "$(BUILD_DIR)/assets/objects/object_ma1/object_ma1.o" endseg beginseg @@ -5789,7 +5789,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ny/object_ny.o" + include "$(BUILD_DIR)/assets/objects/object_ny/object_ny.o" endseg beginseg @@ -5797,7 +5797,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fr/object_fr.o" + include "$(BUILD_DIR)/assets/objects/object_fr/object_fr.o" endseg beginseg @@ -5805,7 +5805,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bow/object_gi_bow.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bow/object_gi_bow.o" endseg beginseg @@ -5813,7 +5813,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_glasses/object_gi_glasses.o" + include "$(BUILD_DIR)/assets/objects/object_gi_glasses/object_gi_glasses.o" endseg beginseg @@ -5821,7 +5821,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_liquid/object_gi_liquid.o" + include "$(BUILD_DIR)/assets/objects/object_gi_liquid/object_gi_liquid.o" endseg beginseg @@ -5829,7 +5829,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ani/object_ani.o" + include "$(BUILD_DIR)/assets/objects/object_ani/object_ani.o" endseg beginseg @@ -5837,7 +5837,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_shield_3/object_gi_shield_3.o" + include "$(BUILD_DIR)/assets/objects/object_gi_shield_3/object_gi_shield_3.o" endseg beginseg @@ -5845,7 +5845,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bean/object_gi_bean.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bean/object_gi_bean.o" endseg beginseg @@ -5853,7 +5853,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_fish/object_gi_fish.o" + include "$(BUILD_DIR)/assets/objects/object_gi_fish/object_gi_fish.o" endseg beginseg @@ -5861,7 +5861,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_longsword/object_gi_longsword.o" + include "$(BUILD_DIR)/assets/objects/object_gi_longsword/object_gi_longsword.o" endseg beginseg @@ -5869,7 +5869,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zo/object_zo.o" + include "$(BUILD_DIR)/assets/objects/object_zo/object_zo.o" endseg beginseg @@ -5877,7 +5877,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_umajump/object_umajump.o" + include "$(BUILD_DIR)/assets/objects/object_umajump/object_umajump.o" endseg beginseg @@ -5885,7 +5885,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mastergolon/object_mastergolon.o" + include "$(BUILD_DIR)/assets/objects/object_mastergolon/object_mastergolon.o" endseg beginseg @@ -5893,7 +5893,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_masterzoora/object_masterzoora.o" + include "$(BUILD_DIR)/assets/objects/object_masterzoora/object_masterzoora.o" endseg beginseg @@ -5901,7 +5901,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_aob/object_aob.o" + include "$(BUILD_DIR)/assets/objects/object_aob/object_aob.o" endseg beginseg @@ -5909,7 +5909,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ik/object_ik.o" + include "$(BUILD_DIR)/assets/objects/object_ik/object_ik.o" endseg beginseg @@ -5917,7 +5917,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ahg/object_ahg.o" + include "$(BUILD_DIR)/assets/objects/object_ahg/object_ahg.o" endseg beginseg @@ -5925,7 +5925,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_cne/object_cne.o" + include "$(BUILD_DIR)/assets/objects/object_cne/object_cne.o" endseg beginseg @@ -5933,7 +5933,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bji/object_bji.o" + include "$(BUILD_DIR)/assets/objects/object_bji/object_bji.o" endseg beginseg @@ -5941,7 +5941,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bba/object_bba.o" + include "$(BUILD_DIR)/assets/objects/object_bba/object_bba.o" endseg beginseg @@ -5949,7 +5949,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_an1/object_an1.o" + include "$(BUILD_DIR)/assets/objects/object_an1/object_an1.o" endseg beginseg @@ -5957,7 +5957,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boj/object_boj.o" + include "$(BUILD_DIR)/assets/objects/object_boj/object_boj.o" endseg beginseg @@ -5965,7 +5965,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fz/object_fz.o" + include "$(BUILD_DIR)/assets/objects/object_fz/object_fz.o" endseg beginseg @@ -5973,7 +5973,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bob/object_bob.o" + include "$(BUILD_DIR)/assets/objects/object_bob/object_bob.o" endseg beginseg @@ -5981,7 +5981,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ge1/object_ge1.o" + include "$(BUILD_DIR)/assets/objects/object_ge1/object_ge1.o" endseg beginseg @@ -5989,7 +5989,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_yabusame_point/object_yabusame_point.o" + include "$(BUILD_DIR)/assets/objects/object_yabusame_point/object_yabusame_point.o" endseg beginseg @@ -5997,7 +5997,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_d_hsblock/object_d_hsblock.o" + include "$(BUILD_DIR)/assets/objects/object_d_hsblock/object_d_hsblock.o" endseg beginseg @@ -6005,7 +6005,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_d_lift/object_d_lift.o" + include "$(BUILD_DIR)/assets/objects/object_d_lift/object_d_lift.o" endseg beginseg @@ -6013,7 +6013,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mamenoki/object_mamenoki.o" + include "$(BUILD_DIR)/assets/objects/object_mamenoki/object_mamenoki.o" endseg beginseg @@ -6021,7 +6021,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_goroiwa/object_goroiwa.o" + include "$(BUILD_DIR)/assets/objects/object_goroiwa/object_goroiwa.o" endseg beginseg @@ -6029,7 +6029,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_toryo/object_toryo.o" + include "$(BUILD_DIR)/assets/objects/object_toryo/object_toryo.o" endseg beginseg @@ -6037,7 +6037,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_daiku/object_daiku.o" + include "$(BUILD_DIR)/assets/objects/object_daiku/object_daiku.o" endseg beginseg @@ -6045,7 +6045,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_nwc/object_nwc.o" + include "$(BUILD_DIR)/assets/objects/object_nwc/object_nwc.o" endseg beginseg @@ -6053,7 +6053,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gm/object_gm.o" + include "$(BUILD_DIR)/assets/objects/object_gm/object_gm.o" endseg beginseg @@ -6061,7 +6061,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ms/object_ms.o" + include "$(BUILD_DIR)/assets/objects/object_ms/object_ms.o" endseg beginseg @@ -6069,7 +6069,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hs/object_hs.o" + include "$(BUILD_DIR)/assets/objects/object_hs/object_hs.o" endseg beginseg @@ -6077,7 +6077,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_lightswitch/object_lightswitch.o" + include "$(BUILD_DIR)/assets/objects/object_lightswitch/object_lightswitch.o" endseg beginseg @@ -6085,7 +6085,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kusa/object_kusa.o" + include "$(BUILD_DIR)/assets/objects/object_kusa/object_kusa.o" endseg beginseg @@ -6093,7 +6093,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tsubo/object_tsubo.o" + include "$(BUILD_DIR)/assets/objects/object_tsubo/object_tsubo.o" endseg beginseg @@ -6101,7 +6101,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kanban/object_kanban.o" + include "$(BUILD_DIR)/assets/objects/object_kanban/object_kanban.o" endseg beginseg @@ -6109,7 +6109,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_owl/object_owl.o" + include "$(BUILD_DIR)/assets/objects/object_owl/object_owl.o" endseg beginseg @@ -6117,7 +6117,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mk/object_mk.o" + include "$(BUILD_DIR)/assets/objects/object_mk/object_mk.o" endseg beginseg @@ -6125,7 +6125,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fu/object_fu.o" + include "$(BUILD_DIR)/assets/objects/object_fu/object_fu.o" endseg beginseg @@ -6133,7 +6133,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_ki_tan_mask/object_gi_ki_tan_mask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_ki_tan_mask/object_gi_ki_tan_mask.o" endseg beginseg @@ -6141,7 +6141,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask18/object_gi_mask18.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask18/object_gi_mask18.o" endseg beginseg @@ -6149,7 +6149,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_rabit_mask/object_gi_rabit_mask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_rabit_mask/object_gi_rabit_mask.o" endseg beginseg @@ -6157,7 +6157,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_truth_mask/object_gi_truth_mask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_truth_mask/object_gi_truth_mask.o" endseg beginseg @@ -6165,7 +6165,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_stream/object_stream.o" + include "$(BUILD_DIR)/assets/objects/object_stream/object_stream.o" endseg beginseg @@ -6173,7 +6173,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mm/object_mm.o" + include "$(BUILD_DIR)/assets/objects/object_mm/object_mm.o" endseg beginseg @@ -6181,7 +6181,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_js/object_js.o" + include "$(BUILD_DIR)/assets/objects/object_js/object_js.o" endseg beginseg @@ -6189,7 +6189,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_cs/object_cs.o" + include "$(BUILD_DIR)/assets/objects/object_cs/object_cs.o" endseg beginseg @@ -6197,7 +6197,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_soldout/object_gi_soldout.o" + include "$(BUILD_DIR)/assets/objects/object_gi_soldout/object_gi_soldout.o" endseg beginseg @@ -6205,7 +6205,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mag/object_mag.o" + include "$(BUILD_DIR)/assets/objects/object_mag/object_mag.o" endseg beginseg @@ -6213,7 +6213,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_golonmask/object_gi_golonmask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_golonmask/object_gi_golonmask.o" endseg beginseg @@ -6221,7 +6221,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_zoramask/object_gi_zoramask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_zoramask/object_gi_zoramask.o" endseg beginseg @@ -6229,7 +6229,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ka/object_ka.o" + include "$(BUILD_DIR)/assets/objects/object_ka/object_ka.o" endseg beginseg @@ -6237,7 +6237,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zg/object_zg.o" + include "$(BUILD_DIR)/assets/objects/object_zg/object_zg.o" endseg beginseg @@ -6245,7 +6245,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_m_arrow/object_gi_m_arrow.o" + include "$(BUILD_DIR)/assets/objects/object_gi_m_arrow/object_gi_m_arrow.o" endseg beginseg @@ -6253,7 +6253,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ds2/object_ds2.o" + include "$(BUILD_DIR)/assets/objects/object_ds2/object_ds2.o" endseg beginseg @@ -6261,7 +6261,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fish/object_fish.o" + include "$(BUILD_DIR)/assets/objects/object_fish/object_fish.o" endseg beginseg @@ -6269,7 +6269,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_sutaru/object_gi_sutaru.o" + include "$(BUILD_DIR)/assets/objects/object_gi_sutaru/object_gi_sutaru.o" endseg beginseg @@ -6277,7 +6277,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ssh/object_ssh.o" + include "$(BUILD_DIR)/assets/objects/object_ssh/object_ssh.o" endseg beginseg @@ -6285,7 +6285,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bigslime/object_bigslime.o" + include "$(BUILD_DIR)/assets/objects/object_bigslime/object_bigslime.o" endseg beginseg @@ -6293,7 +6293,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bg/object_bg.o" + include "$(BUILD_DIR)/assets/objects/object_bg/object_bg.o" endseg beginseg @@ -6301,7 +6301,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bombiwa/object_bombiwa.o" + include "$(BUILD_DIR)/assets/objects/object_bombiwa/object_bombiwa.o" endseg beginseg @@ -6309,7 +6309,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hintnuts/object_hintnuts.o" + include "$(BUILD_DIR)/assets/objects/object_hintnuts/object_hintnuts.o" endseg beginseg @@ -6317,7 +6317,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rsn/object_rsn.o" + include "$(BUILD_DIR)/assets/objects/object_rsn/object_rsn.o" endseg beginseg @@ -6325,7 +6325,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gla/object_gla.o" + include "$(BUILD_DIR)/assets/objects/object_gla/object_gla.o" endseg beginseg @@ -6333,7 +6333,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_geldb/object_geldb.o" + include "$(BUILD_DIR)/assets/objects/object_geldb/object_geldb.o" endseg beginseg @@ -6341,7 +6341,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dog/object_dog.o" + include "$(BUILD_DIR)/assets/objects/object_dog/object_dog.o" endseg beginseg @@ -6349,7 +6349,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kibako2/object_kibako2.o" + include "$(BUILD_DIR)/assets/objects/object_kibako2/object_kibako2.o" endseg beginseg @@ -6357,7 +6357,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dns/object_dns.o" + include "$(BUILD_DIR)/assets/objects/object_dns/object_dns.o" endseg beginseg @@ -6365,7 +6365,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dnk/object_dnk.o" + include "$(BUILD_DIR)/assets/objects/object_dnk/object_dnk.o" endseg beginseg @@ -6373,7 +6373,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_insect/object_gi_insect.o" + include "$(BUILD_DIR)/assets/objects/object_gi_insect/object_gi_insect.o" endseg beginseg @@ -6381,7 +6381,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_ghost/object_gi_ghost.o" + include "$(BUILD_DIR)/assets/objects/object_gi_ghost/object_gi_ghost.o" endseg beginseg @@ -6389,7 +6389,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_soul/object_gi_soul.o" + include "$(BUILD_DIR)/assets/objects/object_gi_soul/object_gi_soul.o" endseg beginseg @@ -6397,7 +6397,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_f40_obj/object_f40_obj.o" + include "$(BUILD_DIR)/assets/objects/object_f40_obj/object_f40_obj.o" endseg beginseg @@ -6405,7 +6405,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_rupy/object_gi_rupy.o" + include "$(BUILD_DIR)/assets/objects/object_gi_rupy/object_gi_rupy.o" endseg beginseg @@ -6413,7 +6413,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_po_composer/object_po_composer.o" + include "$(BUILD_DIR)/assets/objects/object_po_composer/object_po_composer.o" endseg beginseg @@ -6421,7 +6421,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mu/object_mu.o" + include "$(BUILD_DIR)/assets/objects/object_mu/object_mu.o" endseg beginseg @@ -6429,7 +6429,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wf/object_wf.o" + include "$(BUILD_DIR)/assets/objects/object_wf/object_wf.o" endseg beginseg @@ -6437,7 +6437,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_skb/object_skb.o" + include "$(BUILD_DIR)/assets/objects/object_skb/object_skb.o" endseg beginseg @@ -6445,7 +6445,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gs/object_gs.o" + include "$(BUILD_DIR)/assets/objects/object_gs/object_gs.o" endseg beginseg @@ -6453,7 +6453,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ps/object_ps.o" + include "$(BUILD_DIR)/assets/objects/object_ps/object_ps.o" endseg beginseg @@ -6461,7 +6461,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_omoya_obj/object_omoya_obj.o" + include "$(BUILD_DIR)/assets/objects/object_omoya_obj/object_omoya_obj.o" endseg beginseg @@ -6469,7 +6469,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_crow/object_crow.o" + include "$(BUILD_DIR)/assets/objects/object_crow/object_crow.o" endseg beginseg @@ -6477,7 +6477,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_cow/object_cow.o" + include "$(BUILD_DIR)/assets/objects/object_cow/object_cow.o" endseg beginseg @@ -6485,7 +6485,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_sword_1/object_gi_sword_1.o" + include "$(BUILD_DIR)/assets/objects/object_gi_sword_1/object_gi_sword_1.o" endseg beginseg @@ -6493,7 +6493,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zl4/object_zl4.o" + include "$(BUILD_DIR)/assets/objects/object_zl4/object_zl4.o" endseg beginseg @@ -6501,7 +6501,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_grasshopper/object_grasshopper.o" + include "$(BUILD_DIR)/assets/objects/object_grasshopper/object_grasshopper.o" endseg beginseg @@ -6509,7 +6509,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boyo/object_boyo.o" + include "$(BUILD_DIR)/assets/objects/object_boyo/object_boyo.o" endseg beginseg @@ -6517,7 +6517,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fwall/object_fwall.o" + include "$(BUILD_DIR)/assets/objects/object_fwall/object_fwall.o" endseg beginseg @@ -6525,7 +6525,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_jso/object_jso.o" + include "$(BUILD_DIR)/assets/objects/object_jso/object_jso.o" endseg beginseg @@ -6533,7 +6533,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_knight/object_knight.o" + include "$(BUILD_DIR)/assets/objects/object_knight/object_knight.o" endseg beginseg @@ -6541,7 +6541,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_icicle/object_icicle.o" + include "$(BUILD_DIR)/assets/objects/object_icicle/object_icicle.o" endseg beginseg @@ -6549,7 +6549,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_spdweb/object_spdweb.o" + include "$(BUILD_DIR)/assets/objects/object_spdweb/object_spdweb.o" endseg beginseg @@ -6557,7 +6557,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss01/object_boss01.o" + include "$(BUILD_DIR)/assets/objects/object_boss01/object_boss01.o" endseg beginseg @@ -6565,7 +6565,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss02/object_boss02.o" + include "$(BUILD_DIR)/assets/objects/object_boss02/object_boss02.o" endseg beginseg @@ -6573,7 +6573,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss03/object_boss03.o" + include "$(BUILD_DIR)/assets/objects/object_boss03/object_boss03.o" endseg beginseg @@ -6581,7 +6581,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss04/object_boss04.o" + include "$(BUILD_DIR)/assets/objects/object_boss04/object_boss04.o" endseg beginseg @@ -6589,7 +6589,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss05/object_boss05.o" + include "$(BUILD_DIR)/assets/objects/object_boss05/object_boss05.o" endseg beginseg @@ -6597,7 +6597,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss07/object_boss07.o" + include "$(BUILD_DIR)/assets/objects/object_boss07/object_boss07.o" endseg beginseg @@ -6605,7 +6605,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_raf/object_raf.o" + include "$(BUILD_DIR)/assets/objects/object_raf/object_raf.o" endseg beginseg @@ -6613,7 +6613,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_funen/object_funen.o" + include "$(BUILD_DIR)/assets/objects/object_funen/object_funen.o" endseg beginseg @@ -6621,7 +6621,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_raillift/object_raillift.o" + include "$(BUILD_DIR)/assets/objects/object_raillift/object_raillift.o" endseg beginseg @@ -6629,7 +6629,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_numa_obj/object_numa_obj.o" + include "$(BUILD_DIR)/assets/objects/object_numa_obj/object_numa_obj.o" endseg beginseg @@ -6637,7 +6637,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_flowerpot/object_flowerpot.o" + include "$(BUILD_DIR)/assets/objects/object_flowerpot/object_flowerpot.o" endseg beginseg @@ -6645,7 +6645,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_spinyroll/object_spinyroll.o" + include "$(BUILD_DIR)/assets/objects/object_spinyroll/object_spinyroll.o" endseg beginseg @@ -6653,7 +6653,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ice_block/object_ice_block.o" + include "$(BUILD_DIR)/assets/objects/object_ice_block/object_ice_block.o" endseg beginseg @@ -6661,7 +6661,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_keikoku_demo/object_keikoku_demo.o" + include "$(BUILD_DIR)/assets/objects/object_keikoku_demo/object_keikoku_demo.o" endseg beginseg @@ -6669,7 +6669,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_slime/object_slime.o" + include "$(BUILD_DIR)/assets/objects/object_slime/object_slime.o" endseg beginseg @@ -6677,7 +6677,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_pr/object_pr.o" + include "$(BUILD_DIR)/assets/objects/object_pr/object_pr.o" endseg beginseg @@ -6685,7 +6685,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_f52_obj/object_f52_obj.o" + include "$(BUILD_DIR)/assets/objects/object_f52_obj/object_f52_obj.o" endseg beginseg @@ -6693,7 +6693,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_f53_obj/object_f53_obj.o" + include "$(BUILD_DIR)/assets/objects/object_f53_obj/object_f53_obj.o" endseg beginseg @@ -6701,7 +6701,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kibako/object_kibako.o" + include "$(BUILD_DIR)/assets/objects/object_kibako/object_kibako.o" endseg beginseg @@ -6709,7 +6709,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sek/object_sek.o" + include "$(BUILD_DIR)/assets/objects/object_sek/object_sek.o" endseg beginseg @@ -6717,7 +6717,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gmo/object_gmo.o" + include "$(BUILD_DIR)/assets/objects/object_gmo/object_gmo.o" endseg beginseg @@ -6725,7 +6725,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bat/object_bat.o" + include "$(BUILD_DIR)/assets/objects/object_bat/object_bat.o" endseg beginseg @@ -6733,7 +6733,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sekihil/object_sekihil.o" + include "$(BUILD_DIR)/assets/objects/object_sekihil/object_sekihil.o" endseg beginseg @@ -6741,7 +6741,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sekihig/object_sekihig.o" + include "$(BUILD_DIR)/assets/objects/object_sekihig/object_sekihig.o" endseg beginseg @@ -6749,7 +6749,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sekihin/object_sekihin.o" + include "$(BUILD_DIR)/assets/objects/object_sekihin/object_sekihin.o" endseg beginseg @@ -6757,7 +6757,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sekihiz/object_sekihiz.o" + include "$(BUILD_DIR)/assets/objects/object_sekihiz/object_sekihiz.o" endseg beginseg @@ -6765,7 +6765,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wiz/object_wiz.o" + include "$(BUILD_DIR)/assets/objects/object_wiz/object_wiz.o" endseg beginseg @@ -6773,7 +6773,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ladder/object_ladder.o" + include "$(BUILD_DIR)/assets/objects/object_ladder/object_ladder.o" endseg beginseg @@ -6781,7 +6781,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mkk/object_mkk.o" + include "$(BUILD_DIR)/assets/objects/object_mkk/object_mkk.o" endseg beginseg @@ -6789,7 +6789,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_keikoku_obj/object_keikoku_obj.o" + include "$(BUILD_DIR)/assets/objects/object_keikoku_obj/object_keikoku_obj.o" endseg beginseg @@ -6797,7 +6797,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sichitai_obj/object_sichitai_obj.o" + include "$(BUILD_DIR)/assets/objects/object_sichitai_obj/object_sichitai_obj.o" endseg beginseg @@ -6805,7 +6805,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dekucity_ana_obj/object_dekucity_ana_obj.o" + include "$(BUILD_DIR)/assets/objects/object_dekucity_ana_obj/object_dekucity_ana_obj.o" endseg beginseg @@ -6813,7 +6813,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rat/object_rat.o" + include "$(BUILD_DIR)/assets/objects/object_rat/object_rat.o" endseg beginseg @@ -6821,7 +6821,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_water_effect/object_water_effect.o" + include "$(BUILD_DIR)/assets/objects/object_water_effect/object_water_effect.o" endseg beginseg @@ -6829,7 +6829,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dblue_object/object_dblue_object.o" + include "$(BUILD_DIR)/assets/objects/object_dblue_object/object_dblue_object.o" endseg beginseg @@ -6837,7 +6837,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bal/object_bal.o" + include "$(BUILD_DIR)/assets/objects/object_bal/object_bal.o" endseg beginseg @@ -6845,7 +6845,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_warp_uzu/object_warp_uzu.o" + include "$(BUILD_DIR)/assets/objects/object_warp_uzu/object_warp_uzu.o" endseg beginseg @@ -6853,7 +6853,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_driftice/object_driftice.o" + include "$(BUILD_DIR)/assets/objects/object_driftice/object_driftice.o" endseg beginseg @@ -6861,7 +6861,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fall/object_fall.o" + include "$(BUILD_DIR)/assets/objects/object_fall/object_fall.o" endseg beginseg @@ -6869,7 +6869,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hanareyama_obj/object_hanareyama_obj.o" + include "$(BUILD_DIR)/assets/objects/object_hanareyama_obj/object_hanareyama_obj.o" endseg beginseg @@ -6877,7 +6877,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_crace_object/object_crace_object.o" + include "$(BUILD_DIR)/assets/objects/object_crace_object/object_crace_object.o" endseg beginseg @@ -6885,7 +6885,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dno/object_dno.o" + include "$(BUILD_DIR)/assets/objects/object_dno/object_dno.o" endseg beginseg @@ -6893,7 +6893,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_tokeidai/object_obj_tokeidai.o" + include "$(BUILD_DIR)/assets/objects/object_obj_tokeidai/object_obj_tokeidai.o" endseg beginseg @@ -6901,7 +6901,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_eg/object_eg.o" + include "$(BUILD_DIR)/assets/objects/object_eg/object_eg.o" endseg beginseg @@ -6909,7 +6909,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tru/object_tru.o" + include "$(BUILD_DIR)/assets/objects/object_tru/object_tru.o" endseg beginseg @@ -6917,7 +6917,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_trt/object_trt.o" + include "$(BUILD_DIR)/assets/objects/object_trt/object_trt.o" endseg beginseg @@ -6925,7 +6925,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hakugin_obj/object_hakugin_obj.o" + include "$(BUILD_DIR)/assets/objects/object_hakugin_obj/object_hakugin_obj.o" endseg beginseg @@ -6933,7 +6933,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_horse_game_check/object_horse_game_check.o" + include "$(BUILD_DIR)/assets/objects/object_horse_game_check/object_horse_game_check.o" endseg beginseg @@ -6941,7 +6941,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_stk/object_stk.o" + include "$(BUILD_DIR)/assets/objects/object_stk/object_stk.o" endseg beginseg @@ -6949,7 +6949,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mnk/object_mnk.o" + include "$(BUILD_DIR)/assets/objects/object_mnk/object_mnk.o" endseg beginseg @@ -6957,7 +6957,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle_red/object_gi_bottle_red.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle_red/object_gi_bottle_red.o" endseg beginseg @@ -6965,7 +6965,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tokei_tobira/object_tokei_tobira.o" + include "$(BUILD_DIR)/assets/objects/object_tokei_tobira/object_tokei_tobira.o" endseg beginseg @@ -6973,7 +6973,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_az/object_az.o" + include "$(BUILD_DIR)/assets/objects/object_az/object_az.o" endseg beginseg @@ -6981,7 +6981,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_twig/object_twig.o" + include "$(BUILD_DIR)/assets/objects/object_twig/object_twig.o" endseg beginseg @@ -6989,7 +6989,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dekucity_obj/object_dekucity_obj.o" + include "$(BUILD_DIR)/assets/objects/object_dekucity_obj/object_dekucity_obj.o" endseg beginseg @@ -6997,7 +6997,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_po_fusen/object_po_fusen.o" + include "$(BUILD_DIR)/assets/objects/object_po_fusen/object_po_fusen.o" endseg beginseg @@ -7005,7 +7005,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_racetsubo/object_racetsubo.o" + include "$(BUILD_DIR)/assets/objects/object_racetsubo/object_racetsubo.o" endseg beginseg @@ -7013,7 +7013,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ha/object_ha.o" + include "$(BUILD_DIR)/assets/objects/object_ha/object_ha.o" endseg beginseg @@ -7021,7 +7021,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bigokuta/object_bigokuta.o" + include "$(BUILD_DIR)/assets/objects/object_bigokuta/object_bigokuta.o" endseg beginseg @@ -7029,7 +7029,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_open_obj/object_open_obj.o" + include "$(BUILD_DIR)/assets/objects/object_open_obj/object_open_obj.o" endseg beginseg @@ -7037,7 +7037,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fu_kaiten/object_fu_kaiten.o" + include "$(BUILD_DIR)/assets/objects/object_fu_kaiten/object_fu_kaiten.o" endseg beginseg @@ -7045,7 +7045,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fu_mato/object_fu_mato.o" + include "$(BUILD_DIR)/assets/objects/object_fu_mato/object_fu_mato.o" endseg beginseg @@ -7053,7 +7053,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mtoride/object_mtoride.o" + include "$(BUILD_DIR)/assets/objects/object_mtoride/object_mtoride.o" endseg beginseg @@ -7061,7 +7061,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_osn/object_osn.o" + include "$(BUILD_DIR)/assets/objects/object_osn/object_osn.o" endseg beginseg @@ -7069,7 +7069,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tokei_step/object_tokei_step.o" + include "$(BUILD_DIR)/assets/objects/object_tokei_step/object_tokei_step.o" endseg beginseg @@ -7077,7 +7077,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_lotus/object_lotus.o" + include "$(BUILD_DIR)/assets/objects/object_lotus/object_lotus.o" endseg beginseg @@ -7085,7 +7085,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tl/object_tl.o" + include "$(BUILD_DIR)/assets/objects/object_tl/object_tl.o" endseg beginseg @@ -7093,7 +7093,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dkjail_obj/object_dkjail_obj.o" + include "$(BUILD_DIR)/assets/objects/object_dkjail_obj/object_dkjail_obj.o" endseg beginseg @@ -7101,7 +7101,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_visiblock/object_visiblock.o" + include "$(BUILD_DIR)/assets/objects/object_visiblock/object_visiblock.o" endseg beginseg @@ -7109,7 +7109,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tsn/object_tsn.o" + include "$(BUILD_DIR)/assets/objects/object_tsn/object_tsn.o" endseg beginseg @@ -7117,7 +7117,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ds2n/object_ds2n.o" + include "$(BUILD_DIR)/assets/objects/object_ds2n/object_ds2n.o" endseg beginseg @@ -7125,7 +7125,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fsn/object_fsn.o" + include "$(BUILD_DIR)/assets/objects/object_fsn/object_fsn.o" endseg beginseg @@ -7133,7 +7133,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_shn/object_shn.o" + include "$(BUILD_DIR)/assets/objects/object_shn/object_shn.o" endseg beginseg @@ -7141,7 +7141,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bigicicle/object_bigicicle.o" + include "$(BUILD_DIR)/assets/objects/object_bigicicle/object_bigicicle.o" endseg beginseg @@ -7149,7 +7149,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle_15/object_gi_bottle_15.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle_15/object_gi_bottle_15.o" endseg beginseg @@ -7157,7 +7157,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tk/object_tk.o" + include "$(BUILD_DIR)/assets/objects/object_tk/object_tk.o" endseg beginseg @@ -7165,7 +7165,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_market_obj/object_market_obj.o" + include "$(BUILD_DIR)/assets/objects/object_market_obj/object_market_obj.o" endseg beginseg @@ -7173,7 +7173,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_reserve00/object_gi_reserve00.o" + include "$(BUILD_DIR)/assets/objects/object_gi_reserve00/object_gi_reserve00.o" endseg beginseg @@ -7181,7 +7181,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_reserve01/object_gi_reserve01.o" + include "$(BUILD_DIR)/assets/objects/object_gi_reserve01/object_gi_reserve01.o" endseg beginseg @@ -7189,7 +7189,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_lightblock/object_lightblock.o" + include "$(BUILD_DIR)/assets/objects/object_lightblock/object_lightblock.o" endseg beginseg @@ -7197,7 +7197,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_takaraya_objects/object_takaraya_objects.o" + include "$(BUILD_DIR)/assets/objects/object_takaraya_objects/object_takaraya_objects.o" endseg beginseg @@ -7205,7 +7205,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wdhand/object_wdhand.o" + include "$(BUILD_DIR)/assets/objects/object_wdhand/object_wdhand.o" endseg beginseg @@ -7213,7 +7213,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sdn/object_sdn.o" + include "$(BUILD_DIR)/assets/objects/object_sdn/object_sdn.o" endseg beginseg @@ -7221,7 +7221,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_snowwd/object_snowwd.o" + include "$(BUILD_DIR)/assets/objects/object_snowwd/object_snowwd.o" endseg beginseg @@ -7229,7 +7229,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_giant/object_giant.o" + include "$(BUILD_DIR)/assets/objects/object_giant/object_giant.o" endseg beginseg @@ -7237,7 +7237,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_comb/object_comb.o" + include "$(BUILD_DIR)/assets/objects/object_comb/object_comb.o" endseg beginseg @@ -7245,7 +7245,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hana/object_hana.o" + include "$(BUILD_DIR)/assets/objects/object_hana/object_hana.o" endseg beginseg @@ -7253,7 +7253,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_boss_hakugin/object_boss_hakugin.o" + include "$(BUILD_DIR)/assets/objects/object_boss_hakugin/object_boss_hakugin.o" endseg beginseg @@ -7261,7 +7261,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_meganeana_obj/object_meganeana_obj.o" + include "$(BUILD_DIR)/assets/objects/object_meganeana_obj/object_meganeana_obj.o" endseg beginseg @@ -7269,7 +7269,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_nutsmask/object_gi_nutsmask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_nutsmask/object_gi_nutsmask.o" endseg beginseg @@ -7277,7 +7277,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_stk2/object_stk2.o" + include "$(BUILD_DIR)/assets/objects/object_stk2/object_stk2.o" endseg beginseg @@ -7285,7 +7285,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_spot11_obj/object_spot11_obj.o" + include "$(BUILD_DIR)/assets/objects/object_spot11_obj/object_spot11_obj.o" endseg beginseg @@ -7293,7 +7293,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_danpei_object/object_danpei_object.o" + include "$(BUILD_DIR)/assets/objects/object_danpei_object/object_danpei_object.o" endseg beginseg @@ -7301,7 +7301,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dhouse/object_dhouse.o" + include "$(BUILD_DIR)/assets/objects/object_dhouse/object_dhouse.o" endseg beginseg @@ -7309,7 +7309,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hakaisi/object_hakaisi.o" + include "$(BUILD_DIR)/assets/objects/object_hakaisi/object_hakaisi.o" endseg beginseg @@ -7317,7 +7317,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_po/object_po.o" + include "$(BUILD_DIR)/assets/objects/object_po/object_po.o" endseg beginseg @@ -7325,7 +7325,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_snowman/object_snowman.o" + include "$(BUILD_DIR)/assets/objects/object_snowman/object_snowman.o" endseg beginseg @@ -7333,7 +7333,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_po_sisters/object_po_sisters.o" + include "$(BUILD_DIR)/assets/objects/object_po_sisters/object_po_sisters.o" endseg beginseg @@ -7341,7 +7341,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_pp/object_pp.o" + include "$(BUILD_DIR)/assets/objects/object_pp/object_pp.o" endseg beginseg @@ -7349,7 +7349,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_goronswitch/object_goronswitch.o" + include "$(BUILD_DIR)/assets/objects/object_goronswitch/object_goronswitch.o" endseg beginseg @@ -7357,7 +7357,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_delf/object_delf.o" + include "$(BUILD_DIR)/assets/objects/object_delf/object_delf.o" endseg beginseg @@ -7365,7 +7365,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_botihasira/object_botihasira.o" + include "$(BUILD_DIR)/assets/objects/object_botihasira/object_botihasira.o" endseg beginseg @@ -7373,7 +7373,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bigbomb/object_gi_bigbomb.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bigbomb/object_gi_bigbomb.o" endseg beginseg @@ -7381,7 +7381,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_pst/object_pst.o" + include "$(BUILD_DIR)/assets/objects/object_pst/object_pst.o" endseg beginseg @@ -7389,7 +7389,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bsmask/object_bsmask.o" + include "$(BUILD_DIR)/assets/objects/object_bsmask/object_bsmask.o" endseg beginseg @@ -7397,7 +7397,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_spidertent/object_spidertent.o" + include "$(BUILD_DIR)/assets/objects/object_spidertent/object_spidertent.o" endseg beginseg @@ -7405,7 +7405,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zoraegg/object_zoraegg.o" + include "$(BUILD_DIR)/assets/objects/object_zoraegg/object_zoraegg.o" endseg beginseg @@ -7413,7 +7413,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kbt/object_kbt.o" + include "$(BUILD_DIR)/assets/objects/object_kbt/object_kbt.o" endseg beginseg @@ -7421,7 +7421,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gg/object_gg.o" + include "$(BUILD_DIR)/assets/objects/object_gg/object_gg.o" endseg beginseg @@ -7429,7 +7429,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_maruta/object_maruta.o" + include "$(BUILD_DIR)/assets/objects/object_maruta/object_maruta.o" endseg beginseg @@ -7437,7 +7437,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ghaka/object_ghaka.o" + include "$(BUILD_DIR)/assets/objects/object_ghaka/object_ghaka.o" endseg beginseg @@ -7445,7 +7445,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_oyu/object_oyu.o" + include "$(BUILD_DIR)/assets/objects/object_oyu/object_oyu.o" endseg beginseg @@ -7453,7 +7453,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dnq/object_dnq.o" + include "$(BUILD_DIR)/assets/objects/object_dnq/object_dnq.o" endseg beginseg @@ -7461,7 +7461,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dai/object_dai.o" + include "$(BUILD_DIR)/assets/objects/object_dai/object_dai.o" endseg beginseg @@ -7469,7 +7469,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kgy/object_kgy.o" + include "$(BUILD_DIR)/assets/objects/object_kgy/object_kgy.o" endseg beginseg @@ -7477,7 +7477,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fb/object_fb.o" + include "$(BUILD_DIR)/assets/objects/object_fb/object_fb.o" endseg beginseg @@ -7485,7 +7485,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_taisou/object_taisou.o" + include "$(BUILD_DIR)/assets/objects/object_taisou/object_taisou.o" endseg beginseg @@ -7493,7 +7493,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gk/object_gk.o" + include "$(BUILD_DIR)/assets/objects/object_gk/object_gk.o" endseg beginseg @@ -7501,7 +7501,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_haka_obj/object_haka_obj.o" + include "$(BUILD_DIR)/assets/objects/object_haka_obj/object_haka_obj.o" endseg beginseg @@ -7509,7 +7509,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dnt/object_dnt.o" + include "$(BUILD_DIR)/assets/objects/object_dnt/object_dnt.o" endseg beginseg @@ -7517,7 +7517,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_yukiyama/object_yukiyama.o" + include "$(BUILD_DIR)/assets/objects/object_yukiyama/object_yukiyama.o" endseg beginseg @@ -7525,7 +7525,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_icefloe/object_icefloe.o" + include "$(BUILD_DIR)/assets/objects/object_icefloe/object_icefloe.o" endseg beginseg @@ -7533,7 +7533,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_gold_dust/object_gi_gold_dust.o" + include "$(BUILD_DIR)/assets/objects/object_gi_gold_dust/object_gi_gold_dust.o" endseg beginseg @@ -7541,7 +7541,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle_16/object_gi_bottle_16.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle_16/object_gi_bottle_16.o" endseg beginseg @@ -7549,7 +7549,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle_22/object_gi_bottle_22.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle_22/object_gi_bottle_22.o" endseg beginseg @@ -7557,7 +7557,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bee/object_bee.o" + include "$(BUILD_DIR)/assets/objects/object_bee/object_bee.o" endseg beginseg @@ -7565,7 +7565,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ot/object_ot.o" + include "$(BUILD_DIR)/assets/objects/object_ot/object_ot.o" endseg beginseg @@ -7573,7 +7573,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_utubo/object_utubo.o" + include "$(BUILD_DIR)/assets/objects/object_utubo/object_utubo.o" endseg beginseg @@ -7581,7 +7581,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dora/object_dora.o" + include "$(BUILD_DIR)/assets/objects/object_dora/object_dora.o" endseg beginseg @@ -7589,7 +7589,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_loach/object_gi_loach.o" + include "$(BUILD_DIR)/assets/objects/object_gi_loach/object_gi_loach.o" endseg beginseg @@ -7597,7 +7597,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_seahorse/object_gi_seahorse.o" + include "$(BUILD_DIR)/assets/objects/object_gi_seahorse/object_gi_seahorse.o" endseg beginseg @@ -7605,7 +7605,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bigpo/object_bigpo.o" + include "$(BUILD_DIR)/assets/objects/object_bigpo/object_bigpo.o" endseg beginseg @@ -7613,7 +7613,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hariko/object_hariko.o" + include "$(BUILD_DIR)/assets/objects/object_hariko/object_hariko.o" endseg beginseg @@ -7621,7 +7621,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dnj/object_dnj.o" + include "$(BUILD_DIR)/assets/objects/object_dnj/object_dnj.o" endseg beginseg @@ -7629,7 +7629,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sinkai_kabe/object_sinkai_kabe.o" + include "$(BUILD_DIR)/assets/objects/object_sinkai_kabe/object_sinkai_kabe.o" endseg beginseg @@ -7637,7 +7637,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kin2_obj/object_kin2_obj.o" + include "$(BUILD_DIR)/assets/objects/object_kin2_obj/object_kin2_obj.o" endseg beginseg @@ -7645,7 +7645,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ishi/object_ishi.o" + include "$(BUILD_DIR)/assets/objects/object_ishi/object_ishi.o" endseg beginseg @@ -7653,7 +7653,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hakugin_demo/object_hakugin_demo.o" + include "$(BUILD_DIR)/assets/objects/object_hakugin_demo/object_hakugin_demo.o" endseg beginseg @@ -7661,7 +7661,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_jg/object_jg.o" + include "$(BUILD_DIR)/assets/objects/object_jg/object_jg.o" endseg beginseg @@ -7669,7 +7669,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_sword_2/object_gi_sword_2.o" + include "$(BUILD_DIR)/assets/objects/object_gi_sword_2/object_gi_sword_2.o" endseg beginseg @@ -7677,7 +7677,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_sword_3/object_gi_sword_3.o" + include "$(BUILD_DIR)/assets/objects/object_gi_sword_3/object_gi_sword_3.o" endseg beginseg @@ -7685,7 +7685,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_sword_4/object_gi_sword_4.o" + include "$(BUILD_DIR)/assets/objects/object_gi_sword_4/object_gi_sword_4.o" endseg beginseg @@ -7693,7 +7693,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_um/object_um.o" + include "$(BUILD_DIR)/assets/objects/object_um/object_um.o" endseg beginseg @@ -7701,7 +7701,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rb/object_rb.o" + include "$(BUILD_DIR)/assets/objects/object_rb/object_rb.o" endseg beginseg @@ -7709,7 +7709,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_mbar_obj/object_mbar_obj.o" + include "$(BUILD_DIR)/assets/objects/object_mbar_obj/object_mbar_obj.o" endseg beginseg @@ -7717,7 +7717,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ikana_obj/object_ikana_obj.o" + include "$(BUILD_DIR)/assets/objects/object_ikana_obj/object_ikana_obj.o" endseg beginseg @@ -7725,7 +7725,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kz/object_kz.o" + include "$(BUILD_DIR)/assets/objects/object_kz/object_kz.o" endseg beginseg @@ -7733,7 +7733,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tokei_turret/object_tokei_turret.o" + include "$(BUILD_DIR)/assets/objects/object_tokei_turret/object_tokei_turret.o" endseg beginseg @@ -7741,7 +7741,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zog/object_zog.o" + include "$(BUILD_DIR)/assets/objects/object_zog/object_zog.o" endseg beginseg @@ -7749,7 +7749,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rotlift/object_rotlift.o" + include "$(BUILD_DIR)/assets/objects/object_rotlift/object_rotlift.o" endseg beginseg @@ -7757,7 +7757,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_posthouse_obj/object_posthouse_obj.o" + include "$(BUILD_DIR)/assets/objects/object_posthouse_obj/object_posthouse_obj.o" endseg beginseg @@ -7765,7 +7765,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask09/object_gi_mask09.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask09/object_gi_mask09.o" endseg beginseg @@ -7773,7 +7773,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask14/object_gi_mask14.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask14/object_gi_mask14.o" endseg beginseg @@ -7781,7 +7781,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask15/object_gi_mask15.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask15/object_gi_mask15.o" endseg beginseg @@ -7789,7 +7789,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_inibs_object/object_inibs_object.o" + include "$(BUILD_DIR)/assets/objects/object_inibs_object/object_inibs_object.o" endseg beginseg @@ -7797,7 +7797,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tree/object_tree.o" + include "$(BUILD_DIR)/assets/objects/object_tree/object_tree.o" endseg beginseg @@ -7805,7 +7805,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kaizoku_obj/object_kaizoku_obj.o" + include "$(BUILD_DIR)/assets/objects/object_kaizoku_obj/object_kaizoku_obj.o" endseg beginseg @@ -7813,7 +7813,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_reserve_b_00/object_gi_reserve_b_00.o" + include "$(BUILD_DIR)/assets/objects/object_gi_reserve_b_00/object_gi_reserve_b_00.o" endseg beginseg @@ -7821,7 +7821,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_reserve_c_00/object_gi_reserve_c_00.o" + include "$(BUILD_DIR)/assets/objects/object_gi_reserve_c_00/object_gi_reserve_c_00.o" endseg beginseg @@ -7829,7 +7829,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zob/object_zob.o" + include "$(BUILD_DIR)/assets/objects/object_zob/object_zob.o" endseg beginseg @@ -7837,7 +7837,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_milkbar/object_milkbar.o" + include "$(BUILD_DIR)/assets/objects/object_milkbar/object_milkbar.o" endseg beginseg @@ -7845,7 +7845,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dmask/object_dmask.o" + include "$(BUILD_DIR)/assets/objects/object_dmask/object_dmask.o" endseg beginseg @@ -7853,7 +7853,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_reserve_c_01/object_gi_reserve_c_01.o" + include "$(BUILD_DIR)/assets/objects/object_gi_reserve_c_01/object_gi_reserve_c_01.o" endseg beginseg @@ -7861,7 +7861,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zod/object_zod.o" + include "$(BUILD_DIR)/assets/objects/object_zod/object_zod.o" endseg beginseg @@ -7869,7 +7869,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kumo30/object_kumo30.o" + include "$(BUILD_DIR)/assets/objects/object_kumo30/object_kumo30.o" endseg beginseg @@ -7877,7 +7877,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_yasi/object_obj_yasi.o" + include "$(BUILD_DIR)/assets/objects/object_obj_yasi/object_obj_yasi.o" endseg beginseg @@ -7885,7 +7885,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tanron1/object_tanron1.o" + include "$(BUILD_DIR)/assets/objects/object_tanron1/object_tanron1.o" endseg beginseg @@ -7893,7 +7893,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tanron2/object_tanron2.o" + include "$(BUILD_DIR)/assets/objects/object_tanron2/object_tanron2.o" endseg beginseg @@ -7901,7 +7901,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tanron3/object_tanron3.o" + include "$(BUILD_DIR)/assets/objects/object_tanron3/object_tanron3.o" endseg beginseg @@ -7909,7 +7909,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_magicmushroom/object_gi_magicmushroom.o" + include "$(BUILD_DIR)/assets/objects/object_gi_magicmushroom/object_gi_magicmushroom.o" endseg beginseg @@ -7917,7 +7917,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_chan/object_obj_chan.o" + include "$(BUILD_DIR)/assets/objects/object_obj_chan/object_obj_chan.o" endseg beginseg @@ -7925,7 +7925,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask10/object_gi_mask10.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask10/object_gi_mask10.o" endseg beginseg @@ -7933,7 +7933,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zos/object_zos.o" + include "$(BUILD_DIR)/assets/objects/object_zos/object_zos.o" endseg beginseg @@ -7941,7 +7941,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_an2/object_an2.o" + include "$(BUILD_DIR)/assets/objects/object_an2/object_an2.o" endseg beginseg @@ -7949,7 +7949,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_an3/object_an3.o" + include "$(BUILD_DIR)/assets/objects/object_an3/object_an3.o" endseg beginseg @@ -7957,7 +7957,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_f40_switch/object_f40_switch.o" + include "$(BUILD_DIR)/assets/objects/object_f40_switch/object_f40_switch.o" endseg beginseg @@ -7965,7 +7965,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_lodmoon/object_lodmoon.o" + include "$(BUILD_DIR)/assets/objects/object_lodmoon/object_lodmoon.o" endseg beginseg @@ -7973,7 +7973,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tro/object_tro.o" + include "$(BUILD_DIR)/assets/objects/object_tro/object_tro.o" endseg beginseg @@ -7981,7 +7981,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask12/object_gi_mask12.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask12/object_gi_mask12.o" endseg beginseg @@ -7989,7 +7989,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask23/object_gi_mask23.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask23/object_gi_mask23.o" endseg beginseg @@ -7997,7 +7997,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle_21/object_gi_bottle_21.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle_21/object_gi_bottle_21.o" endseg beginseg @@ -8005,7 +8005,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_camera/object_gi_camera.o" + include "$(BUILD_DIR)/assets/objects/object_gi_camera/object_gi_camera.o" endseg beginseg @@ -8013,7 +8013,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kamejima/object_kamejima.o" + include "$(BUILD_DIR)/assets/objects/object_kamejima/object_kamejima.o" endseg beginseg @@ -8021,7 +8021,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_nb/object_nb.o" + include "$(BUILD_DIR)/assets/objects/object_nb/object_nb.o" endseg beginseg @@ -8029,7 +8029,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_harfgibud/object_harfgibud.o" + include "$(BUILD_DIR)/assets/objects/object_harfgibud/object_harfgibud.o" endseg beginseg @@ -8037,7 +8037,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zov/object_zov.o" + include "$(BUILD_DIR)/assets/objects/object_zov/object_zov.o" endseg beginseg @@ -8045,7 +8045,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ah/object_ah.o" + include "$(BUILD_DIR)/assets/objects/object_ah/object_ah.o" endseg beginseg @@ -8053,7 +8053,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hgdoor/object_hgdoor.o" + include "$(BUILD_DIR)/assets/objects/object_hgdoor/object_hgdoor.o" endseg beginseg @@ -8061,7 +8061,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dor01/object_dor01.o" + include "$(BUILD_DIR)/assets/objects/object_dor01/object_dor01.o" endseg beginseg @@ -8069,7 +8069,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dor02/object_dor02.o" + include "$(BUILD_DIR)/assets/objects/object_dor02/object_dor02.o" endseg beginseg @@ -8077,7 +8077,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dor03/object_dor03.o" + include "$(BUILD_DIR)/assets/objects/object_dor03/object_dor03.o" endseg beginseg @@ -8085,7 +8085,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dor04/object_dor04.o" + include "$(BUILD_DIR)/assets/objects/object_dor04/object_dor04.o" endseg beginseg @@ -8093,7 +8093,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_last_obj/object_last_obj.o" + include "$(BUILD_DIR)/assets/objects/object_last_obj/object_last_obj.o" endseg beginseg @@ -8101,7 +8101,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_redead_obj/object_redead_obj.o" + include "$(BUILD_DIR)/assets/objects/object_redead_obj/object_redead_obj.o" endseg beginseg @@ -8109,7 +8109,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ikninside_obj/object_ikninside_obj.o" + include "$(BUILD_DIR)/assets/objects/object_ikninside_obj/object_ikninside_obj.o" endseg beginseg @@ -8117,7 +8117,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_iknv_obj/object_iknv_obj.o" + include "$(BUILD_DIR)/assets/objects/object_iknv_obj/object_iknv_obj.o" endseg beginseg @@ -8125,7 +8125,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_pamera/object_pamera.o" + include "$(BUILD_DIR)/assets/objects/object_pamera/object_pamera.o" endseg beginseg @@ -8133,7 +8133,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hsstump/object_hsstump.o" + include "$(BUILD_DIR)/assets/objects/object_hsstump/object_hsstump.o" endseg beginseg @@ -8141,7 +8141,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zm/object_zm.o" + include "$(BUILD_DIR)/assets/objects/object_zm/object_zm.o" endseg beginseg @@ -8149,7 +8149,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_al/object_al.o" + include "$(BUILD_DIR)/assets/objects/object_al/object_al.o" endseg beginseg @@ -8157,7 +8157,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tab/object_tab.o" + include "$(BUILD_DIR)/assets/objects/object_tab/object_tab.o" endseg beginseg @@ -8165,7 +8165,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_secom_obj/object_secom_obj.o" + include "$(BUILD_DIR)/assets/objects/object_secom_obj/object_secom_obj.o" endseg beginseg @@ -8173,7 +8173,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_dt/object_dt.o" + include "$(BUILD_DIR)/assets/objects/object_dt/object_dt.o" endseg beginseg @@ -8181,7 +8181,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask03/object_gi_mask03.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask03/object_gi_mask03.o" endseg beginseg @@ -8189,7 +8189,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_cha/object_cha.o" + include "$(BUILD_DIR)/assets/objects/object_cha/object_cha.o" endseg beginseg @@ -8197,7 +8197,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_dinner/object_obj_dinner.o" + include "$(BUILD_DIR)/assets/objects/object_obj_dinner/object_obj_dinner.o" endseg beginseg @@ -8205,7 +8205,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_reserve_b_01/object_gi_reserve_b_01.o" + include "$(BUILD_DIR)/assets/objects/object_gi_reserve_b_01/object_gi_reserve_b_01.o" endseg beginseg @@ -8213,7 +8213,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_lastday/object_lastday.o" + include "$(BUILD_DIR)/assets/objects/object_lastday/object_lastday.o" endseg beginseg @@ -8221,7 +8221,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bai/object_bai.o" + include "$(BUILD_DIR)/assets/objects/object_bai/object_bai.o" endseg beginseg @@ -8229,7 +8229,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ikn_demo/object_ikn_demo.o" + include "$(BUILD_DIR)/assets/objects/object_ikn_demo/object_ikn_demo.o" endseg beginseg @@ -8237,7 +8237,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_fieldmap/object_gi_fieldmap.o" + include "$(BUILD_DIR)/assets/objects/object_gi_fieldmap/object_gi_fieldmap.o" endseg beginseg @@ -8245,7 +8245,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_big_fwall/object_big_fwall.o" + include "$(BUILD_DIR)/assets/objects/object_big_fwall/object_big_fwall.o" endseg beginseg @@ -8253,7 +8253,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_hunsui/object_hunsui.o" + include "$(BUILD_DIR)/assets/objects/object_hunsui/object_hunsui.o" endseg beginseg @@ -8261,7 +8261,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_uch/object_uch.o" + include "$(BUILD_DIR)/assets/objects/object_uch/object_uch.o" endseg beginseg @@ -8269,7 +8269,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tanron4/object_tanron4.o" + include "$(BUILD_DIR)/assets/objects/object_tanron4/object_tanron4.o" endseg beginseg @@ -8277,7 +8277,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_tanron5/object_tanron5.o" + include "$(BUILD_DIR)/assets/objects/object_tanron5/object_tanron5.o" endseg beginseg @@ -8285,7 +8285,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_in2/object_in2.o" + include "$(BUILD_DIR)/assets/objects/object_in2/object_in2.o" endseg beginseg @@ -8293,7 +8293,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_yb/object_yb.o" + include "$(BUILD_DIR)/assets/objects/object_yb/object_yb.o" endseg beginseg @@ -8301,7 +8301,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_rz/object_rz.o" + include "$(BUILD_DIR)/assets/objects/object_rz/object_rz.o" endseg beginseg @@ -8309,7 +8309,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bjt/object_bjt.o" + include "$(BUILD_DIR)/assets/objects/object_bjt/object_bjt.o" endseg beginseg @@ -8317,7 +8317,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_taru/object_taru.o" + include "$(BUILD_DIR)/assets/objects/object_taru/object_taru.o" endseg beginseg @@ -8325,7 +8325,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_moonston/object_moonston.o" + include "$(BUILD_DIR)/assets/objects/object_moonston/object_moonston.o" endseg beginseg @@ -8333,7 +8333,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_schedule/object_gi_schedule.o" + include "$(BUILD_DIR)/assets/objects/object_gi_schedule/object_gi_schedule.o" endseg beginseg @@ -8341,7 +8341,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_stonemask/object_gi_stonemask.o" + include "$(BUILD_DIR)/assets/objects/object_gi_stonemask/object_gi_stonemask.o" endseg beginseg @@ -8349,7 +8349,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_zoraband/object_zoraband.o" + include "$(BUILD_DIR)/assets/objects/object_zoraband/object_zoraband.o" endseg beginseg @@ -8357,7 +8357,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kepn_koya/object_kepn_koya.o" + include "$(BUILD_DIR)/assets/objects/object_kepn_koya/object_kepn_koya.o" endseg beginseg @@ -8365,7 +8365,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_usiyane/object_obj_usiyane.o" + include "$(BUILD_DIR)/assets/objects/object_obj_usiyane/object_obj_usiyane.o" endseg beginseg @@ -8373,7 +8373,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask05/object_gi_mask05.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask05/object_gi_mask05.o" endseg beginseg @@ -8381,7 +8381,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask11/object_gi_mask11.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask11/object_gi_mask11.o" endseg beginseg @@ -8389,7 +8389,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask20/object_gi_mask20.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask20/object_gi_mask20.o" endseg beginseg @@ -8397,7 +8397,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_nnh/object_nnh.o" + include "$(BUILD_DIR)/assets/objects/object_nnh/object_nnh.o" endseg beginseg @@ -8405,7 +8405,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kzsaku/object_kzsaku.o" + include "$(BUILD_DIR)/assets/objects/object_kzsaku/object_kzsaku.o" endseg beginseg @@ -8413,7 +8413,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_milk_bin/object_obj_milk_bin.o" + include "$(BUILD_DIR)/assets/objects/object_obj_milk_bin/object_obj_milk_bin.o" endseg beginseg @@ -8421,7 +8421,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_random_obj/object_random_obj.o" + include "$(BUILD_DIR)/assets/objects/object_random_obj/object_random_obj.o" endseg beginseg @@ -8429,7 +8429,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kujiya/object_kujiya.o" + include "$(BUILD_DIR)/assets/objects/object_kujiya/object_kujiya.o" endseg beginseg @@ -8437,7 +8437,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kitan/object_kitan.o" + include "$(BUILD_DIR)/assets/objects/object_kitan/object_kitan.o" endseg beginseg @@ -8445,7 +8445,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask06/object_gi_mask06.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask06/object_gi_mask06.o" endseg beginseg @@ -8453,7 +8453,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask16/object_gi_mask16.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask16/object_gi_mask16.o" endseg beginseg @@ -8461,7 +8461,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_astr_obj/object_astr_obj.o" + include "$(BUILD_DIR)/assets/objects/object_astr_obj/object_astr_obj.o" endseg beginseg @@ -8469,7 +8469,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bsb/object_bsb.o" + include "$(BUILD_DIR)/assets/objects/object_bsb/object_bsb.o" endseg beginseg @@ -8477,7 +8477,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fall2/object_fall2.o" + include "$(BUILD_DIR)/assets/objects/object_fall2/object_fall2.o" endseg beginseg @@ -8485,7 +8485,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_sth/object_sth.o" + include "$(BUILD_DIR)/assets/objects/object_sth/object_sth.o" endseg beginseg @@ -8493,7 +8493,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mssa/object_gi_mssa.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mssa/object_gi_mssa.o" endseg beginseg @@ -8501,7 +8501,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_smtower/object_smtower.o" + include "$(BUILD_DIR)/assets/objects/object_smtower/object_smtower.o" endseg beginseg @@ -8509,7 +8509,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask21/object_gi_mask21.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask21/object_gi_mask21.o" endseg beginseg @@ -8517,7 +8517,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_yado_obj/object_yado_obj.o" + include "$(BUILD_DIR)/assets/objects/object_yado_obj/object_yado_obj.o" endseg beginseg @@ -8525,7 +8525,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_syoten/object_syoten.o" + include "$(BUILD_DIR)/assets/objects/object_syoten/object_syoten.o" endseg beginseg @@ -8533,7 +8533,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_moonend/object_moonend.o" + include "$(BUILD_DIR)/assets/objects/object_moonend/object_moonend.o" endseg beginseg @@ -8541,7 +8541,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ob/object_ob.o" + include "$(BUILD_DIR)/assets/objects/object_ob/object_ob.o" endseg beginseg @@ -8549,7 +8549,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_bottle_04/object_gi_bottle_04.o" + include "$(BUILD_DIR)/assets/objects/object_gi_bottle_04/object_gi_bottle_04.o" endseg beginseg @@ -8557,7 +8557,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_and/object_and.o" + include "$(BUILD_DIR)/assets/objects/object_and/object_and.o" endseg beginseg @@ -8565,7 +8565,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_obj_danpeilift/object_obj_danpeilift.o" + include "$(BUILD_DIR)/assets/objects/object_obj_danpeilift/object_obj_danpeilift.o" endseg beginseg @@ -8573,7 +8573,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_drs/object_drs.o" + include "$(BUILD_DIR)/assets/objects/object_drs/object_drs.o" endseg beginseg @@ -8581,7 +8581,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_msmo/object_msmo.o" + include "$(BUILD_DIR)/assets/objects/object_msmo/object_msmo.o" endseg beginseg @@ -8589,7 +8589,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_an4/object_an4.o" + include "$(BUILD_DIR)/assets/objects/object_an4/object_an4.o" endseg beginseg @@ -8597,7 +8597,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wdor01/object_wdor01.o" + include "$(BUILD_DIR)/assets/objects/object_wdor01/object_wdor01.o" endseg beginseg @@ -8605,7 +8605,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wdor02/object_wdor02.o" + include "$(BUILD_DIR)/assets/objects/object_wdor02/object_wdor02.o" endseg beginseg @@ -8613,7 +8613,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wdor03/object_wdor03.o" + include "$(BUILD_DIR)/assets/objects/object_wdor03/object_wdor03.o" endseg beginseg @@ -8621,7 +8621,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wdor04/object_wdor04.o" + include "$(BUILD_DIR)/assets/objects/object_wdor04/object_wdor04.o" endseg beginseg @@ -8629,7 +8629,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_wdor05/object_wdor05.o" + include "$(BUILD_DIR)/assets/objects/object_wdor05/object_wdor05.o" endseg beginseg @@ -8637,7 +8637,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_stk3/object_stk3.o" + include "$(BUILD_DIR)/assets/objects/object_stk3/object_stk3.o" endseg beginseg @@ -8645,7 +8645,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kinsta1_obj/object_kinsta1_obj.o" + include "$(BUILD_DIR)/assets/objects/object_kinsta1_obj/object_kinsta1_obj.o" endseg beginseg @@ -8653,7 +8653,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_kinsta2_obj/object_kinsta2_obj.o" + include "$(BUILD_DIR)/assets/objects/object_kinsta2_obj/object_kinsta2_obj.o" endseg beginseg @@ -8661,7 +8661,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_bh/object_bh.o" + include "$(BUILD_DIR)/assets/objects/object_bh/object_bh.o" endseg beginseg @@ -8669,7 +8669,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask17/object_gi_mask17.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask17/object_gi_mask17.o" endseg beginseg @@ -8677,7 +8677,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask22/object_gi_mask22.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask22/object_gi_mask22.o" endseg beginseg @@ -8685,7 +8685,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_lbfshot/object_lbfshot.o" + include "$(BUILD_DIR)/assets/objects/object_lbfshot/object_lbfshot.o" endseg beginseg @@ -8693,7 +8693,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_fusen/object_fusen.o" + include "$(BUILD_DIR)/assets/objects/object_fusen/object_fusen.o" endseg beginseg @@ -8701,7 +8701,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_ending_obj/object_ending_obj.o" + include "$(BUILD_DIR)/assets/objects/object_ending_obj/object_ending_obj.o" endseg beginseg @@ -8709,7 +8709,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/objects/object_gi_mask13/object_gi_mask13.o" + include "$(BUILD_DIR)/assets/objects/object_gi_mask13/object_gi_mask13.o" endseg beginseg @@ -8717,7 +8717,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_01/scene_texture_01.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_01/scene_texture_01.o" endseg beginseg @@ -8725,7 +8725,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_02/scene_texture_02.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_02/scene_texture_02.o" endseg beginseg @@ -8733,7 +8733,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_03/scene_texture_03.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_03/scene_texture_03.o" endseg beginseg @@ -8741,7 +8741,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_04/scene_texture_04.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_04/scene_texture_04.o" endseg beginseg @@ -8749,7 +8749,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_05/scene_texture_05.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_05/scene_texture_05.o" endseg beginseg @@ -8757,7 +8757,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_06/scene_texture_06.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_06/scene_texture_06.o" endseg beginseg @@ -8765,7 +8765,7 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_07/scene_texture_07.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_07/scene_texture_07.o" endseg beginseg @@ -8773,14 +8773,14 @@ beginseg compress romalign 0x1000 number 6 - include "build/assets/misc/scene_texture_08/scene_texture_08.o" + include "$(BUILD_DIR)/assets/misc/scene_texture_08/scene_texture_08.o" endseg beginseg name "nintendo_rogo_static" compress romalign 0x1000 - include "build/assets/misc/nintendo_rogo_static/nintendo_rogo_static.o" + include "$(BUILD_DIR)/assets/misc/nintendo_rogo_static/nintendo_rogo_static.o" number 1 endseg @@ -8788,7 +8788,7 @@ beginseg name "title_static" compress romalign 0x1000 - include "build/assets/misc/title_static/title_static.o" + include "$(BUILD_DIR)/assets/misc/title_static/title_static.o" number 1 endseg @@ -8796,7 +8796,7 @@ beginseg name "memerrmsg" compress romalign 0x1000 - include "build/assets/misc/memerrmsg/memerrmsg.o" + include "$(BUILD_DIR)/assets/misc/memerrmsg/memerrmsg.o" number 1 endseg @@ -8804,7 +8804,7 @@ beginseg name "locerrmsg" compress romalign 0x1000 - include "build/assets/misc/locerrmsg/locerrmsg.o" + include "$(BUILD_DIR)/assets/misc/locerrmsg/locerrmsg.o" number 1 endseg @@ -8812,14 +8812,14 @@ beginseg name "parameter_static" compress romalign 0x1000 - include "build/assets/interface/parameter_static/parameter_static.o" + include "$(BUILD_DIR)/assets/interface/parameter_static/parameter_static.o" number 2 endseg beginseg name "week_static" romalign 0x1000 - include "build/assets/interface/week_static/week_static.o" + include "$(BUILD_DIR)/assets/interface/week_static/week_static.o" number 9 endseg @@ -8827,7 +8827,7 @@ beginseg name "daytelop_static" compress romalign 0x1000 - include "build/assets/misc/daytelop_static/daytelop_static.o" + include "$(BUILD_DIR)/assets/misc/daytelop_static/daytelop_static.o" number 9 endseg @@ -8835,7 +8835,7 @@ beginseg name "ger_daytelop_static" compress romalign 0x1000 - include "build/assets/misc/ger_daytelop_static/ger_daytelop_static.o" + include "$(BUILD_DIR)/assets/misc/ger_daytelop_static/ger_daytelop_static.o" number 9 endseg @@ -8843,7 +8843,7 @@ beginseg name "fra_daytelop_static" compress romalign 0x1000 - include "build/assets/misc/fra_daytelop_static/fra_daytelop_static.o" + include "$(BUILD_DIR)/assets/misc/fra_daytelop_static/fra_daytelop_static.o" number 9 endseg @@ -8851,7 +8851,7 @@ beginseg name "esp_daytelop_static" compress romalign 0x1000 - include "build/assets/misc/esp_daytelop_static/esp_daytelop_static.o" + include "$(BUILD_DIR)/assets/misc/esp_daytelop_static/esp_daytelop_static.o" number 9 endseg @@ -8859,42 +8859,42 @@ beginseg name "d2_fine_static" compress romalign 0x1000 - include "build/assets/misc/skyboxes/d2_fine_static.o" + include "$(BUILD_DIR)/assets/misc/skyboxes/d2_fine_static.o" endseg beginseg name "d2_cloud_static" compress romalign 0x1000 - include "build/assets/misc/skyboxes/d2_cloud_static.o" + include "$(BUILD_DIR)/assets/misc/skyboxes/d2_cloud_static.o" endseg beginseg name "d2_fine_pal_static" compress romalign 0x1000 - include "build/assets/misc/skyboxes/d2_fine_pal_static.o" + include "$(BUILD_DIR)/assets/misc/skyboxes/d2_fine_pal_static.o" endseg beginseg name "elf_message_field" compress romalign 0x1000 - include "build/baserom/elf_message_field.o" + include "$(BUILD_DIR)/baserom/elf_message_field.o" endseg beginseg name "elf_message_ydan" compress romalign 0x1000 - include "build/baserom/elf_message_ydan.o" + include "$(BUILD_DIR)/baserom/elf_message_ydan.o" endseg beginseg name "Z2_20SICHITAI2" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2.o" number 2 endseg @@ -8902,7 +8902,7 @@ beginseg name "Z2_20SICHITAI2_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2_room_00.o" number 3 endseg @@ -8910,7 +8910,7 @@ beginseg name "Z2_20SICHITAI2_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2_room_01.o" number 3 endseg @@ -8918,7 +8918,7 @@ beginseg name "Z2_20SICHITAI2_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI2/Z2_20SICHITAI2_room_02.o" number 3 endseg @@ -8926,7 +8926,7 @@ beginseg name "Z2_WITCH_SHOP" compress romalign 0x1000 - include "build/assets/scenes/Z2_WITCH_SHOP/Z2_WITCH_SHOP.o" + include "$(BUILD_DIR)/assets/scenes/Z2_WITCH_SHOP/Z2_WITCH_SHOP.o" number 2 endseg @@ -8934,7 +8934,7 @@ beginseg name "Z2_WITCH_SHOP_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_WITCH_SHOP/Z2_WITCH_SHOP_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_WITCH_SHOP/Z2_WITCH_SHOP_room_00.o" number 3 endseg @@ -8942,7 +8942,7 @@ beginseg name "Z2_LAST_BS" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_BS/Z2_LAST_BS.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_BS/Z2_LAST_BS.o" number 2 endseg @@ -8950,7 +8950,7 @@ beginseg name "Z2_LAST_BS_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_BS/Z2_LAST_BS_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_BS/Z2_LAST_BS_room_00.o" number 3 endseg @@ -8958,7 +8958,7 @@ beginseg name "Z2_HAKASHITA" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA.o" number 2 endseg @@ -8966,7 +8966,7 @@ beginseg name "Z2_HAKASHITA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_00.o" number 3 endseg @@ -8974,7 +8974,7 @@ beginseg name "Z2_HAKASHITA_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_01.o" number 3 endseg @@ -8982,7 +8982,7 @@ beginseg name "Z2_HAKASHITA_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_02.o" number 3 endseg @@ -8990,7 +8990,7 @@ beginseg name "Z2_HAKASHITA_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_03.o" number 3 endseg @@ -8998,7 +8998,7 @@ beginseg name "Z2_HAKASHITA_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKASHITA/Z2_HAKASHITA_room_04.o" number 3 endseg @@ -9006,7 +9006,7 @@ beginseg name "Z2_AYASHIISHOP" compress romalign 0x1000 - include "build/assets/scenes/Z2_AYASHIISHOP/Z2_AYASHIISHOP.o" + include "$(BUILD_DIR)/assets/scenes/Z2_AYASHIISHOP/Z2_AYASHIISHOP.o" number 2 endseg @@ -9014,7 +9014,7 @@ beginseg name "Z2_AYASHIISHOP_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_AYASHIISHOP/Z2_AYASHIISHOP_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_AYASHIISHOP/Z2_AYASHIISHOP_room_00.o" number 3 endseg @@ -9022,7 +9022,7 @@ beginseg name "Z2_AYASHIISHOP_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_AYASHIISHOP/Z2_AYASHIISHOP_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_AYASHIISHOP/Z2_AYASHIISHOP_room_01.o" number 3 endseg @@ -9030,7 +9030,7 @@ beginseg name "Z2_OMOYA" compress romalign 0x1000 - include "build/assets/scenes/Z2_OMOYA/Z2_OMOYA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OMOYA/Z2_OMOYA.o" number 2 endseg @@ -9038,7 +9038,7 @@ beginseg name "Z2_OMOYA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_OMOYA/Z2_OMOYA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OMOYA/Z2_OMOYA_room_00.o" number 3 endseg @@ -9046,7 +9046,7 @@ beginseg name "Z2_OMOYA_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_OMOYA/Z2_OMOYA_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OMOYA/Z2_OMOYA_room_01.o" number 3 endseg @@ -9054,7 +9054,7 @@ beginseg name "Z2_OMOYA_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_OMOYA/Z2_OMOYA_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OMOYA/Z2_OMOYA_room_02.o" number 3 endseg @@ -9062,7 +9062,7 @@ beginseg name "Z2_BOWLING" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOWLING/Z2_BOWLING.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOWLING/Z2_BOWLING.o" number 2 endseg @@ -9070,7 +9070,7 @@ beginseg name "Z2_BOWLING_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOWLING/Z2_BOWLING_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOWLING/Z2_BOWLING_room_00.o" number 3 endseg @@ -9078,7 +9078,7 @@ beginseg name "Z2_SONCHONOIE" compress romalign 0x1000 - include "build/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE.o" number 2 endseg @@ -9086,7 +9086,7 @@ beginseg name "Z2_SONCHONOIE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_00.o" number 3 endseg @@ -9094,7 +9094,7 @@ beginseg name "Z2_SONCHONOIE_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_01.o" number 3 endseg @@ -9102,7 +9102,7 @@ beginseg name "Z2_SONCHONOIE_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_02.o" number 3 endseg @@ -9110,7 +9110,7 @@ beginseg name "Z2_SONCHONOIE_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SONCHONOIE/Z2_SONCHONOIE_room_03.o" number 3 endseg @@ -9118,7 +9118,7 @@ beginseg name "Z2_IKANA" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANA/Z2_IKANA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANA/Z2_IKANA.o" number 2 endseg @@ -9126,7 +9126,7 @@ beginseg name "Z2_IKANA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANA/Z2_IKANA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANA/Z2_IKANA_room_00.o" number 3 endseg @@ -9134,7 +9134,7 @@ beginseg name "Z2_IKANA_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANA/Z2_IKANA_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANA/Z2_IKANA_room_01.o" number 3 endseg @@ -9142,7 +9142,7 @@ beginseg name "Z2_IKANA_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANA/Z2_IKANA_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANA/Z2_IKANA_room_02.o" number 3 endseg @@ -9150,7 +9150,7 @@ beginseg name "Z2_IKANA_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANA/Z2_IKANA_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANA/Z2_IKANA_room_03.o" number 3 endseg @@ -9158,7 +9158,7 @@ beginseg name "Z2_IKANA_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANA/Z2_IKANA_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANA/Z2_IKANA_room_04.o" number 3 endseg @@ -9166,7 +9166,7 @@ beginseg name "Z2_KAIZOKU" compress romalign 0x1000 - include "build/assets/scenes/Z2_KAIZOKU/Z2_KAIZOKU.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KAIZOKU/Z2_KAIZOKU.o" number 2 endseg @@ -9174,7 +9174,7 @@ beginseg name "Z2_KAIZOKU_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KAIZOKU/Z2_KAIZOKU_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KAIZOKU/Z2_KAIZOKU_room_00.o" number 3 endseg @@ -9182,7 +9182,7 @@ beginseg name "Z2_MILK_BAR" compress romalign 0x1000 - include "build/assets/scenes/Z2_MILK_BAR/Z2_MILK_BAR.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MILK_BAR/Z2_MILK_BAR.o" number 2 endseg @@ -9190,7 +9190,7 @@ beginseg name "Z2_MILK_BAR_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_MILK_BAR/Z2_MILK_BAR_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MILK_BAR/Z2_MILK_BAR_room_00.o" number 3 endseg @@ -9198,7 +9198,7 @@ beginseg name "Z2_INISIE_N" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N.o" number 2 endseg @@ -9206,7 +9206,7 @@ beginseg name "Z2_INISIE_N_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_00.o" number 3 endseg @@ -9214,7 +9214,7 @@ beginseg name "Z2_INISIE_N_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_01.o" number 3 endseg @@ -9222,7 +9222,7 @@ beginseg name "Z2_INISIE_N_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_02.o" number 3 endseg @@ -9230,7 +9230,7 @@ beginseg name "Z2_INISIE_N_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_03.o" number 3 endseg @@ -9238,7 +9238,7 @@ beginseg name "Z2_INISIE_N_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_04.o" number 3 endseg @@ -9246,7 +9246,7 @@ beginseg name "Z2_INISIE_N_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_05.o" number 3 endseg @@ -9254,7 +9254,7 @@ beginseg name "Z2_INISIE_N_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_06.o" number 3 endseg @@ -9262,7 +9262,7 @@ beginseg name "Z2_INISIE_N_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_07.o" number 3 endseg @@ -9270,7 +9270,7 @@ beginseg name "Z2_INISIE_N_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_08.o" number 3 endseg @@ -9278,7 +9278,7 @@ beginseg name "Z2_INISIE_N_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_09.o" number 3 endseg @@ -9286,7 +9286,7 @@ beginseg name "Z2_INISIE_N_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_10.o" number 3 endseg @@ -9294,7 +9294,7 @@ beginseg name "Z2_INISIE_N_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_N/Z2_INISIE_N_room_11.o" number 3 endseg @@ -9302,7 +9302,7 @@ beginseg name "Z2_TAKARAYA" compress romalign 0x1000 - include "build/assets/scenes/Z2_TAKARAYA/Z2_TAKARAYA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TAKARAYA/Z2_TAKARAYA.o" number 2 endseg @@ -9310,7 +9310,7 @@ beginseg name "Z2_TAKARAYA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_TAKARAYA/Z2_TAKARAYA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TAKARAYA/Z2_TAKARAYA_room_00.o" number 3 endseg @@ -9318,7 +9318,7 @@ beginseg name "Z2_INISIE_R" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R.o" number 2 endseg @@ -9326,7 +9326,7 @@ beginseg name "Z2_INISIE_R_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_00.o" number 3 endseg @@ -9334,7 +9334,7 @@ beginseg name "Z2_INISIE_R_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_01.o" number 3 endseg @@ -9342,7 +9342,7 @@ beginseg name "Z2_INISIE_R_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_02.o" number 3 endseg @@ -9350,7 +9350,7 @@ beginseg name "Z2_INISIE_R_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_03.o" number 3 endseg @@ -9358,7 +9358,7 @@ beginseg name "Z2_INISIE_R_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_04.o" number 3 endseg @@ -9366,7 +9366,7 @@ beginseg name "Z2_INISIE_R_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_05.o" number 3 endseg @@ -9374,7 +9374,7 @@ beginseg name "Z2_INISIE_R_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_06.o" number 3 endseg @@ -9382,7 +9382,7 @@ beginseg name "Z2_INISIE_R_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_07.o" number 3 endseg @@ -9390,7 +9390,7 @@ beginseg name "Z2_INISIE_R_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_08.o" number 3 endseg @@ -9398,7 +9398,7 @@ beginseg name "Z2_INISIE_R_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_09.o" number 3 endseg @@ -9406,7 +9406,7 @@ beginseg name "Z2_INISIE_R_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_10.o" number 3 endseg @@ -9414,7 +9414,7 @@ beginseg name "Z2_INISIE_R_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_R/Z2_INISIE_R_room_11.o" number 3 endseg @@ -9422,7 +9422,7 @@ beginseg name "Z2_OKUJOU" compress romalign 0x1000 - include "build/assets/scenes/Z2_OKUJOU/Z2_OKUJOU.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OKUJOU/Z2_OKUJOU.o" number 2 endseg @@ -9430,7 +9430,7 @@ beginseg name "Z2_OKUJOU_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_OKUJOU/Z2_OKUJOU_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OKUJOU/Z2_OKUJOU_room_00.o" number 3 endseg @@ -9438,7 +9438,7 @@ beginseg name "Z2_OPENINGDAN" compress romalign 0x1000 - include "build/assets/scenes/Z2_OPENINGDAN/Z2_OPENINGDAN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OPENINGDAN/Z2_OPENINGDAN.o" number 2 endseg @@ -9446,7 +9446,7 @@ beginseg name "Z2_OPENINGDAN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_OPENINGDAN/Z2_OPENINGDAN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OPENINGDAN/Z2_OPENINGDAN_room_00.o" number 3 endseg @@ -9454,7 +9454,7 @@ beginseg name "Z2_OPENINGDAN_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_OPENINGDAN/Z2_OPENINGDAN_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_OPENINGDAN/Z2_OPENINGDAN_room_01.o" number 3 endseg @@ -9462,7 +9462,7 @@ beginseg name "Z2_MITURIN" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN.o" number 2 endseg @@ -9470,7 +9470,7 @@ beginseg name "Z2_MITURIN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_00.o" number 3 endseg @@ -9478,7 +9478,7 @@ beginseg name "Z2_MITURIN_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_01.o" number 3 endseg @@ -9486,7 +9486,7 @@ beginseg name "Z2_MITURIN_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_02.o" number 3 endseg @@ -9494,7 +9494,7 @@ beginseg name "Z2_MITURIN_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_03.o" number 3 endseg @@ -9502,7 +9502,7 @@ beginseg name "Z2_MITURIN_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_04.o" number 3 endseg @@ -9510,7 +9510,7 @@ beginseg name "Z2_MITURIN_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_05.o" number 3 endseg @@ -9518,7 +9518,7 @@ beginseg name "Z2_MITURIN_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_06.o" number 3 endseg @@ -9526,7 +9526,7 @@ beginseg name "Z2_MITURIN_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_07.o" number 3 endseg @@ -9534,7 +9534,7 @@ beginseg name "Z2_MITURIN_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_08.o" number 3 endseg @@ -9542,7 +9542,7 @@ beginseg name "Z2_MITURIN_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_09.o" number 3 endseg @@ -9550,7 +9550,7 @@ beginseg name "Z2_MITURIN_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_10.o" number 3 endseg @@ -9558,7 +9558,7 @@ beginseg name "Z2_MITURIN_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_11.o" number 3 endseg @@ -9566,7 +9566,7 @@ beginseg name "Z2_MITURIN_room_12" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_12.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN/Z2_MITURIN_room_12.o" number 3 endseg @@ -9574,7 +9574,7 @@ beginseg name "Z2_13HUBUKINOMITI" compress romalign 0x1000 - include "build/assets/scenes/Z2_13HUBUKINOMITI/Z2_13HUBUKINOMITI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_13HUBUKINOMITI/Z2_13HUBUKINOMITI.o" number 2 endseg @@ -9582,7 +9582,7 @@ beginseg name "Z2_13HUBUKINOMITI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_13HUBUKINOMITI/Z2_13HUBUKINOMITI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_13HUBUKINOMITI/Z2_13HUBUKINOMITI_room_00.o" number 3 endseg @@ -9590,7 +9590,7 @@ beginseg name "Z2_CASTLE" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE.o" number 2 endseg @@ -9598,7 +9598,7 @@ beginseg name "Z2_CASTLE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_00.o" number 3 endseg @@ -9606,7 +9606,7 @@ beginseg name "Z2_CASTLE_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_01.o" number 3 endseg @@ -9614,7 +9614,7 @@ beginseg name "Z2_CASTLE_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_02.o" number 3 endseg @@ -9622,7 +9622,7 @@ beginseg name "Z2_CASTLE_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_03.o" number 3 endseg @@ -9630,7 +9630,7 @@ beginseg name "Z2_CASTLE_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_04.o" number 3 endseg @@ -9638,7 +9638,7 @@ beginseg name "Z2_CASTLE_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_05.o" number 3 endseg @@ -9646,7 +9646,7 @@ beginseg name "Z2_CASTLE_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_06.o" number 3 endseg @@ -9654,7 +9654,7 @@ beginseg name "Z2_CASTLE_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_07.o" number 3 endseg @@ -9662,7 +9662,7 @@ beginseg name "Z2_CASTLE_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_08.o" number 3 endseg @@ -9670,7 +9670,7 @@ beginseg name "Z2_CASTLE_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CASTLE/Z2_CASTLE_room_09.o" number 3 endseg @@ -9678,7 +9678,7 @@ beginseg name "Z2_DEKUTES" compress romalign 0x1000 - include "build/assets/scenes/Z2_DEKUTES/Z2_DEKUTES.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DEKUTES/Z2_DEKUTES.o" number 2 endseg @@ -9686,7 +9686,7 @@ beginseg name "Z2_DEKUTES_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_DEKUTES/Z2_DEKUTES_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DEKUTES/Z2_DEKUTES_room_00.o" number 3 endseg @@ -9694,7 +9694,7 @@ beginseg name "Z2_MITURIN_BS" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN_BS/Z2_MITURIN_BS.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN_BS/Z2_MITURIN_BS.o" number 2 endseg @@ -9702,7 +9702,7 @@ beginseg name "Z2_MITURIN_BS_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_MITURIN_BS/Z2_MITURIN_BS_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MITURIN_BS/Z2_MITURIN_BS_room_00.o" number 3 endseg @@ -9710,7 +9710,7 @@ beginseg name "Z2_SYATEKI_MIZU" compress romalign 0x1000 - include "build/assets/scenes/Z2_SYATEKI_MIZU/Z2_SYATEKI_MIZU.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SYATEKI_MIZU/Z2_SYATEKI_MIZU.o" number 2 endseg @@ -9718,7 +9718,7 @@ beginseg name "Z2_SYATEKI_MIZU_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SYATEKI_MIZU/Z2_SYATEKI_MIZU_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SYATEKI_MIZU/Z2_SYATEKI_MIZU_room_00.o" number 3 endseg @@ -9726,7 +9726,7 @@ beginseg name "Z2_HAKUGIN" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN.o" number 2 endseg @@ -9734,7 +9734,7 @@ beginseg name "Z2_HAKUGIN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_00.o" number 3 endseg @@ -9742,7 +9742,7 @@ beginseg name "Z2_HAKUGIN_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_01.o" number 3 endseg @@ -9750,7 +9750,7 @@ beginseg name "Z2_HAKUGIN_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_02.o" number 3 endseg @@ -9758,7 +9758,7 @@ beginseg name "Z2_HAKUGIN_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_03.o" number 3 endseg @@ -9766,7 +9766,7 @@ beginseg name "Z2_HAKUGIN_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_04.o" number 3 endseg @@ -9774,7 +9774,7 @@ beginseg name "Z2_HAKUGIN_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_05.o" number 3 endseg @@ -9782,7 +9782,7 @@ beginseg name "Z2_HAKUGIN_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_06.o" number 3 endseg @@ -9790,7 +9790,7 @@ beginseg name "Z2_HAKUGIN_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_07.o" number 3 endseg @@ -9798,7 +9798,7 @@ beginseg name "Z2_HAKUGIN_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_08.o" number 3 endseg @@ -9806,7 +9806,7 @@ beginseg name "Z2_HAKUGIN_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_09.o" number 3 endseg @@ -9814,7 +9814,7 @@ beginseg name "Z2_HAKUGIN_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_10.o" number 3 endseg @@ -9822,7 +9822,7 @@ beginseg name "Z2_HAKUGIN_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_11.o" number 3 endseg @@ -9830,7 +9830,7 @@ beginseg name "Z2_HAKUGIN_room_12" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_12.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_12.o" number 3 endseg @@ -9838,7 +9838,7 @@ beginseg name "Z2_HAKUGIN_room_13" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_13.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN/Z2_HAKUGIN_room_13.o" number 3 endseg @@ -9846,7 +9846,7 @@ beginseg name "Z2_ROMANYMAE" compress romalign 0x1000 - include "build/assets/scenes/Z2_ROMANYMAE/Z2_ROMANYMAE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_ROMANYMAE/Z2_ROMANYMAE.o" number 2 endseg @@ -9854,7 +9854,7 @@ beginseg name "Z2_ROMANYMAE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_ROMANYMAE/Z2_ROMANYMAE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_ROMANYMAE/Z2_ROMANYMAE_room_00.o" number 3 endseg @@ -9862,7 +9862,7 @@ beginseg name "Z2_PIRATE" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE.o" number 2 endseg @@ -9870,7 +9870,7 @@ beginseg name "Z2_PIRATE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_00.o" number 3 endseg @@ -9878,7 +9878,7 @@ beginseg name "Z2_PIRATE_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_01.o" number 3 endseg @@ -9886,7 +9886,7 @@ beginseg name "Z2_PIRATE_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_02.o" number 3 endseg @@ -9894,7 +9894,7 @@ beginseg name "Z2_PIRATE_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_03.o" number 3 endseg @@ -9902,7 +9902,7 @@ beginseg name "Z2_PIRATE_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_04.o" number 3 endseg @@ -9910,7 +9910,7 @@ beginseg name "Z2_PIRATE_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_05.o" number 3 endseg @@ -9918,7 +9918,7 @@ beginseg name "Z2_PIRATE_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_06.o" number 3 endseg @@ -9926,7 +9926,7 @@ beginseg name "Z2_PIRATE_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_07.o" number 3 endseg @@ -9934,7 +9934,7 @@ beginseg name "Z2_PIRATE_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_08.o" number 3 endseg @@ -9942,7 +9942,7 @@ beginseg name "Z2_PIRATE_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_09.o" number 3 endseg @@ -9950,7 +9950,7 @@ beginseg name "Z2_PIRATE_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_10.o" number 3 endseg @@ -9958,7 +9958,7 @@ beginseg name "Z2_PIRATE_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_11.o" number 3 endseg @@ -9966,7 +9966,7 @@ beginseg name "Z2_PIRATE_room_12" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_12.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_12.o" number 3 endseg @@ -9974,7 +9974,7 @@ beginseg name "Z2_PIRATE_room_13" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_13.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_13.o" number 3 endseg @@ -9982,7 +9982,7 @@ beginseg name "Z2_PIRATE_room_14" compress romalign 0x1000 - include "build/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_14.o" + include "$(BUILD_DIR)/assets/scenes/Z2_PIRATE/Z2_PIRATE_room_14.o" number 3 endseg @@ -9990,7 +9990,7 @@ beginseg name "Z2_SYATEKI_MORI" compress romalign 0x1000 - include "build/assets/scenes/Z2_SYATEKI_MORI/Z2_SYATEKI_MORI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SYATEKI_MORI/Z2_SYATEKI_MORI.o" number 2 endseg @@ -9998,7 +9998,7 @@ beginseg name "Z2_SYATEKI_MORI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SYATEKI_MORI/Z2_SYATEKI_MORI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SYATEKI_MORI/Z2_SYATEKI_MORI_room_00.o" number 3 endseg @@ -10006,7 +10006,7 @@ beginseg name "Z2_SINKAI" compress romalign 0x1000 - include "build/assets/scenes/Z2_SINKAI/Z2_SINKAI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SINKAI/Z2_SINKAI.o" number 2 endseg @@ -10014,7 +10014,7 @@ beginseg name "Z2_SINKAI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SINKAI/Z2_SINKAI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SINKAI/Z2_SINKAI_room_00.o" number 3 endseg @@ -10022,7 +10022,7 @@ beginseg name "Z2_YOUSEI_IZUMI" compress romalign 0x1000 - include "build/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI.o" number 2 endseg @@ -10030,7 +10030,7 @@ beginseg name "Z2_YOUSEI_IZUMI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_00.o" number 3 endseg @@ -10038,7 +10038,7 @@ beginseg name "Z2_YOUSEI_IZUMI_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_01.o" number 3 endseg @@ -10046,7 +10046,7 @@ beginseg name "Z2_YOUSEI_IZUMI_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_02.o" number 3 endseg @@ -10054,7 +10054,7 @@ beginseg name "Z2_YOUSEI_IZUMI_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_03.o" number 3 endseg @@ -10062,7 +10062,7 @@ beginseg name "Z2_YOUSEI_IZUMI_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YOUSEI_IZUMI/Z2_YOUSEI_IZUMI_room_04.o" number 3 endseg @@ -10070,7 +10070,7 @@ beginseg name "Z2_KINSTA1" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1.o" number 2 endseg @@ -10078,7 +10078,7 @@ beginseg name "Z2_KINSTA1_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_00.o" number 3 endseg @@ -10086,7 +10086,7 @@ beginseg name "Z2_KINSTA1_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_01.o" number 3 endseg @@ -10094,7 +10094,7 @@ beginseg name "Z2_KINSTA1_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_02.o" number 3 endseg @@ -10102,7 +10102,7 @@ beginseg name "Z2_KINSTA1_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_03.o" number 3 endseg @@ -10110,7 +10110,7 @@ beginseg name "Z2_KINSTA1_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_04.o" number 3 endseg @@ -10118,7 +10118,7 @@ beginseg name "Z2_KINSTA1_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINSTA1/Z2_KINSTA1_room_05.o" number 3 endseg @@ -10126,7 +10126,7 @@ beginseg name "Z2_KINDAN2" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2.o" number 2 endseg @@ -10134,7 +10134,7 @@ beginseg name "Z2_KINDAN2_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_00.o" number 3 endseg @@ -10142,7 +10142,7 @@ beginseg name "Z2_KINDAN2_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_01.o" number 3 endseg @@ -10150,7 +10150,7 @@ beginseg name "Z2_KINDAN2_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_02.o" number 3 endseg @@ -10158,7 +10158,7 @@ beginseg name "Z2_KINDAN2_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_03.o" number 3 endseg @@ -10166,7 +10166,7 @@ beginseg name "Z2_KINDAN2_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_04.o" number 3 endseg @@ -10174,7 +10174,7 @@ beginseg name "Z2_KINDAN2_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KINDAN2/Z2_KINDAN2_room_05.o" number 3 endseg @@ -10182,7 +10182,7 @@ beginseg name "Z2_TENMON_DAI" compress romalign 0x1000 - include "build/assets/scenes/Z2_TENMON_DAI/Z2_TENMON_DAI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TENMON_DAI/Z2_TENMON_DAI.o" number 2 endseg @@ -10190,7 +10190,7 @@ beginseg name "Z2_TENMON_DAI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_TENMON_DAI/Z2_TENMON_DAI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TENMON_DAI/Z2_TENMON_DAI_room_00.o" number 3 endseg @@ -10198,7 +10198,7 @@ beginseg name "Z2_TENMON_DAI_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_TENMON_DAI/Z2_TENMON_DAI_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TENMON_DAI/Z2_TENMON_DAI_room_01.o" number 3 endseg @@ -10206,7 +10206,7 @@ beginseg name "Z2_LAST_DEKU" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_DEKU/Z2_LAST_DEKU.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_DEKU/Z2_LAST_DEKU.o" number 2 endseg @@ -10214,7 +10214,7 @@ beginseg name "Z2_LAST_DEKU_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_DEKU/Z2_LAST_DEKU_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_DEKU/Z2_LAST_DEKU_room_00.o" number 3 endseg @@ -10222,7 +10222,7 @@ beginseg name "Z2_LAST_DEKU_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_DEKU/Z2_LAST_DEKU_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_DEKU/Z2_LAST_DEKU_room_01.o" number 3 endseg @@ -10230,7 +10230,7 @@ beginseg name "Z2_22DEKUCITY" compress romalign 0x1000 - include "build/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY.o" + include "$(BUILD_DIR)/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY.o" number 2 endseg @@ -10238,7 +10238,7 @@ beginseg name "Z2_22DEKUCITY_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY_room_00.o" number 3 endseg @@ -10246,7 +10246,7 @@ beginseg name "Z2_22DEKUCITY_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY_room_01.o" number 3 endseg @@ -10254,7 +10254,7 @@ beginseg name "Z2_22DEKUCITY_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_22DEKUCITY/Z2_22DEKUCITY_room_02.o" number 3 endseg @@ -10262,7 +10262,7 @@ beginseg name "Z2_KAJIYA" compress romalign 0x1000 - include "build/assets/scenes/Z2_KAJIYA/Z2_KAJIYA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KAJIYA/Z2_KAJIYA.o" number 2 endseg @@ -10270,7 +10270,7 @@ beginseg name "Z2_KAJIYA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KAJIYA/Z2_KAJIYA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KAJIYA/Z2_KAJIYA_room_00.o" number 3 endseg @@ -10278,7 +10278,7 @@ beginseg name "Z2_00KEIKOKU" compress romalign 0x1000 - include "build/assets/scenes/Z2_00KEIKOKU/Z2_00KEIKOKU.o" + include "$(BUILD_DIR)/assets/scenes/Z2_00KEIKOKU/Z2_00KEIKOKU.o" number 2 endseg @@ -10286,7 +10286,7 @@ beginseg name "Z2_00KEIKOKU_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00.o" number 3 endseg @@ -10294,7 +10294,7 @@ beginseg name "Z2_POSTHOUSE" compress romalign 0x1000 - include "build/assets/scenes/Z2_POSTHOUSE/Z2_POSTHOUSE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_POSTHOUSE/Z2_POSTHOUSE.o" number 2 endseg @@ -10302,7 +10302,7 @@ beginseg name "Z2_POSTHOUSE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_POSTHOUSE/Z2_POSTHOUSE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_POSTHOUSE/Z2_POSTHOUSE_room_00.o" number 3 endseg @@ -10310,7 +10310,7 @@ beginseg name "Z2_LABO" compress romalign 0x1000 - include "build/assets/scenes/Z2_LABO/Z2_LABO.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LABO/Z2_LABO.o" number 2 endseg @@ -10318,7 +10318,7 @@ beginseg name "Z2_LABO_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LABO/Z2_LABO_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LABO/Z2_LABO_room_00.o" number 3 endseg @@ -10326,7 +10326,7 @@ beginseg name "Z2_DANPEI2TEST" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI2TEST/Z2_DANPEI2TEST.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI2TEST/Z2_DANPEI2TEST.o" number 2 endseg @@ -10334,7 +10334,7 @@ beginseg name "Z2_DANPEI2TEST_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI2TEST/Z2_DANPEI2TEST_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI2TEST/Z2_DANPEI2TEST_room_00.o" number 3 endseg @@ -10342,7 +10342,7 @@ beginseg name "Z2_DANPEI2TEST_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI2TEST/Z2_DANPEI2TEST_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI2TEST/Z2_DANPEI2TEST_room_01.o" number 3 endseg @@ -10350,7 +10350,7 @@ beginseg name "Z2_16GORON_HOUSE" compress romalign 0x1000 - include "build/assets/scenes/Z2_16GORON_HOUSE/Z2_16GORON_HOUSE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_16GORON_HOUSE/Z2_16GORON_HOUSE.o" number 2 endseg @@ -10358,7 +10358,7 @@ beginseg name "Z2_16GORON_HOUSE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_16GORON_HOUSE/Z2_16GORON_HOUSE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_16GORON_HOUSE/Z2_16GORON_HOUSE_room_00.o" number 3 endseg @@ -10366,7 +10366,7 @@ beginseg name "Z2_16GORON_HOUSE_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_16GORON_HOUSE/Z2_16GORON_HOUSE_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_16GORON_HOUSE/Z2_16GORON_HOUSE_room_01.o" number 3 endseg @@ -10374,7 +10374,7 @@ beginseg name "Z2_33ZORACITY" compress romalign 0x1000 - include "build/assets/scenes/Z2_33ZORACITY/Z2_33ZORACITY.o" + include "$(BUILD_DIR)/assets/scenes/Z2_33ZORACITY/Z2_33ZORACITY.o" number 2 endseg @@ -10382,7 +10382,7 @@ beginseg name "Z2_33ZORACITY_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_33ZORACITY/Z2_33ZORACITY_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_33ZORACITY/Z2_33ZORACITY_room_00.o" number 3 endseg @@ -10390,7 +10390,7 @@ beginseg name "Z2_8ITEMSHOP" compress romalign 0x1000 - include "build/assets/scenes/Z2_8ITEMSHOP/Z2_8ITEMSHOP.o" + include "$(BUILD_DIR)/assets/scenes/Z2_8ITEMSHOP/Z2_8ITEMSHOP.o" number 2 endseg @@ -10398,7 +10398,7 @@ beginseg name "Z2_8ITEMSHOP_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_8ITEMSHOP/Z2_8ITEMSHOP_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_8ITEMSHOP/Z2_8ITEMSHOP_room_00.o" number 3 endseg @@ -10406,7 +10406,7 @@ beginseg name "Z2_F01" compress romalign 0x1000 - include "build/assets/scenes/Z2_F01/Z2_F01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F01/Z2_F01.o" number 2 endseg @@ -10414,7 +10414,7 @@ beginseg name "Z2_F01_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_F01/Z2_F01_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F01/Z2_F01_room_00.o" number 3 endseg @@ -10422,7 +10422,7 @@ beginseg name "Z2_INISIE_BS" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_BS/Z2_INISIE_BS.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_BS/Z2_INISIE_BS.o" number 2 endseg @@ -10430,7 +10430,7 @@ beginseg name "Z2_INISIE_BS_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_INISIE_BS/Z2_INISIE_BS_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INISIE_BS/Z2_INISIE_BS_room_00.o" number 3 endseg @@ -10438,7 +10438,7 @@ beginseg name "Z2_30GYOSON" compress romalign 0x1000 - include "build/assets/scenes/Z2_30GYOSON/Z2_30GYOSON.o" + include "$(BUILD_DIR)/assets/scenes/Z2_30GYOSON/Z2_30GYOSON.o" number 2 endseg @@ -10446,7 +10446,7 @@ beginseg name "Z2_30GYOSON_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_30GYOSON/Z2_30GYOSON_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_30GYOSON/Z2_30GYOSON_room_00.o" number 3 endseg @@ -10454,7 +10454,7 @@ beginseg name "Z2_31MISAKI" compress romalign 0x1000 - include "build/assets/scenes/Z2_31MISAKI/Z2_31MISAKI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_31MISAKI/Z2_31MISAKI.o" number 2 endseg @@ -10462,7 +10462,7 @@ beginseg name "Z2_31MISAKI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_31MISAKI/Z2_31MISAKI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_31MISAKI/Z2_31MISAKI_room_00.o" number 3 endseg @@ -10470,7 +10470,7 @@ beginseg name "Z2_TAKARAKUJI" compress romalign 0x1000 - include "build/assets/scenes/Z2_TAKARAKUJI/Z2_TAKARAKUJI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TAKARAKUJI/Z2_TAKARAKUJI.o" number 2 endseg @@ -10478,7 +10478,7 @@ beginseg name "Z2_TAKARAKUJI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_TAKARAKUJI/Z2_TAKARAKUJI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TAKARAKUJI/Z2_TAKARAKUJI_room_00.o" number 3 endseg @@ -10486,7 +10486,7 @@ beginseg name "Z2_TORIDE" compress romalign 0x1000 - include "build/assets/scenes/Z2_TORIDE/Z2_TORIDE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TORIDE/Z2_TORIDE.o" number 2 endseg @@ -10494,7 +10494,7 @@ beginseg name "Z2_TORIDE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_TORIDE/Z2_TORIDE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TORIDE/Z2_TORIDE_room_00.o" number 3 endseg @@ -10502,7 +10502,7 @@ beginseg name "Z2_FISHERMAN" compress romalign 0x1000 - include "build/assets/scenes/Z2_FISHERMAN/Z2_FISHERMAN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_FISHERMAN/Z2_FISHERMAN.o" number 2 endseg @@ -10510,7 +10510,7 @@ beginseg name "Z2_FISHERMAN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_FISHERMAN/Z2_FISHERMAN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_FISHERMAN/Z2_FISHERMAN_room_00.o" number 3 endseg @@ -10518,7 +10518,7 @@ beginseg name "Z2_GORONSHOP" compress romalign 0x1000 - include "build/assets/scenes/Z2_GORONSHOP/Z2_GORONSHOP.o" + include "$(BUILD_DIR)/assets/scenes/Z2_GORONSHOP/Z2_GORONSHOP.o" number 2 endseg @@ -10526,7 +10526,7 @@ beginseg name "Z2_GORONSHOP_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_GORONSHOP/Z2_GORONSHOP_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_GORONSHOP/Z2_GORONSHOP_room_00.o" number 3 endseg @@ -10534,7 +10534,7 @@ beginseg name "Z2_DEKU_KING" compress romalign 0x1000 - include "build/assets/scenes/Z2_DEKU_KING/Z2_DEKU_KING.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DEKU_KING/Z2_DEKU_KING.o" number 2 endseg @@ -10542,7 +10542,7 @@ beginseg name "Z2_DEKU_KING_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_DEKU_KING/Z2_DEKU_KING_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DEKU_KING/Z2_DEKU_KING_room_00.o" number 3 endseg @@ -10550,7 +10550,7 @@ beginseg name "Z2_LAST_GORON" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_GORON/Z2_LAST_GORON.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_GORON/Z2_LAST_GORON.o" number 2 endseg @@ -10558,7 +10558,7 @@ beginseg name "Z2_LAST_GORON_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_GORON/Z2_LAST_GORON_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_GORON/Z2_LAST_GORON_room_00.o" number 3 endseg @@ -10566,7 +10566,7 @@ beginseg name "Z2_LAST_GORON_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_GORON/Z2_LAST_GORON_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_GORON/Z2_LAST_GORON_room_01.o" number 3 endseg @@ -10574,7 +10574,7 @@ beginseg name "Z2_24KEMONOMITI" compress romalign 0x1000 - include "build/assets/scenes/Z2_24KEMONOMITI/Z2_24KEMONOMITI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_24KEMONOMITI/Z2_24KEMONOMITI.o" number 2 endseg @@ -10582,7 +10582,7 @@ beginseg name "Z2_24KEMONOMITI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_24KEMONOMITI/Z2_24KEMONOMITI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_24KEMONOMITI/Z2_24KEMONOMITI_room_00.o" number 3 endseg @@ -10590,7 +10590,7 @@ beginseg name "Z2_F01_B" compress romalign 0x1000 - include "build/assets/scenes/Z2_F01_B/Z2_F01_B.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F01_B/Z2_F01_B.o" number 2 endseg @@ -10598,7 +10598,7 @@ beginseg name "Z2_F01_B_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_F01_B/Z2_F01_B_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F01_B/Z2_F01_B_room_00.o" number 3 endseg @@ -10606,7 +10606,7 @@ beginseg name "Z2_F01C" compress romalign 0x1000 - include "build/assets/scenes/Z2_F01C/Z2_F01C.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F01C/Z2_F01C.o" number 2 endseg @@ -10614,7 +10614,7 @@ beginseg name "Z2_F01C_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_F01C/Z2_F01C_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F01C/Z2_F01C_room_00.o" number 3 endseg @@ -10622,7 +10622,7 @@ beginseg name "Z2_BOTI" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOTI/Z2_BOTI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOTI/Z2_BOTI.o" number 2 endseg @@ -10630,7 +10630,7 @@ beginseg name "Z2_BOTI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOTI/Z2_BOTI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOTI/Z2_BOTI_room_00.o" number 3 endseg @@ -10638,7 +10638,7 @@ beginseg name "Z2_BOTI_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOTI/Z2_BOTI_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOTI/Z2_BOTI_room_01.o" number 3 endseg @@ -10646,7 +10646,7 @@ beginseg name "Z2_HAKUGIN_BS" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN_BS/Z2_HAKUGIN_BS.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN_BS/Z2_HAKUGIN_BS.o" number 2 endseg @@ -10654,7 +10654,7 @@ beginseg name "Z2_HAKUGIN_BS_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_HAKUGIN_BS/Z2_HAKUGIN_BS_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_HAKUGIN_BS/Z2_HAKUGIN_BS_room_00.o" number 3 endseg @@ -10662,7 +10662,7 @@ beginseg name "Z2_20SICHITAI" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI.o" number 2 endseg @@ -10670,7 +10670,7 @@ beginseg name "Z2_20SICHITAI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI_room_00.o" number 3 endseg @@ -10678,7 +10678,7 @@ beginseg name "Z2_20SICHITAI_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI_room_01.o" number 3 endseg @@ -10686,7 +10686,7 @@ beginseg name "Z2_20SICHITAI_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_20SICHITAI/Z2_20SICHITAI_room_02.o" number 3 endseg @@ -10694,7 +10694,7 @@ beginseg name "Z2_21MITURINMAE" compress romalign 0x1000 - include "build/assets/scenes/Z2_21MITURINMAE/Z2_21MITURINMAE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_21MITURINMAE/Z2_21MITURINMAE.o" number 2 endseg @@ -10702,7 +10702,7 @@ beginseg name "Z2_21MITURINMAE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_21MITURINMAE/Z2_21MITURINMAE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_21MITURINMAE/Z2_21MITURINMAE_room_00.o" number 3 endseg @@ -10710,7 +10710,7 @@ beginseg name "Z2_LAST_ZORA" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_ZORA/Z2_LAST_ZORA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_ZORA/Z2_LAST_ZORA.o" number 2 endseg @@ -10718,7 +10718,7 @@ beginseg name "Z2_LAST_ZORA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_ZORA/Z2_LAST_ZORA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_ZORA/Z2_LAST_ZORA_room_00.o" number 3 endseg @@ -10726,7 +10726,7 @@ beginseg name "Z2_11GORONNOSATO2" compress romalign 0x1000 - include "build/assets/scenes/Z2_11GORONNOSATO2/Z2_11GORONNOSATO2.o" + include "$(BUILD_DIR)/assets/scenes/Z2_11GORONNOSATO2/Z2_11GORONNOSATO2.o" number 2 endseg @@ -10734,7 +10734,7 @@ beginseg name "Z2_11GORONNOSATO2_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_11GORONNOSATO2/Z2_11GORONNOSATO2_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_11GORONNOSATO2/Z2_11GORONNOSATO2_room_00.o" number 3 endseg @@ -10742,7 +10742,7 @@ beginseg name "Z2_11GORONNOSATO2_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_11GORONNOSATO2/Z2_11GORONNOSATO2_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_11GORONNOSATO2/Z2_11GORONNOSATO2_room_01.o" number 3 endseg @@ -10750,7 +10750,7 @@ beginseg name "Z2_SEA" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA.o" number 2 endseg @@ -10758,7 +10758,7 @@ beginseg name "Z2_SEA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_00.o" number 3 endseg @@ -10766,7 +10766,7 @@ beginseg name "Z2_SEA_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_01.o" number 3 endseg @@ -10774,7 +10774,7 @@ beginseg name "Z2_SEA_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_02.o" number 3 endseg @@ -10782,7 +10782,7 @@ beginseg name "Z2_SEA_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_03.o" number 3 endseg @@ -10790,7 +10790,7 @@ beginseg name "Z2_SEA_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_04.o" number 3 endseg @@ -10798,7 +10798,7 @@ beginseg name "Z2_SEA_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_05.o" number 3 endseg @@ -10806,7 +10806,7 @@ beginseg name "Z2_SEA_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_06.o" number 3 endseg @@ -10814,7 +10814,7 @@ beginseg name "Z2_SEA_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_07.o" number 3 endseg @@ -10822,7 +10822,7 @@ beginseg name "Z2_SEA_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_08.o" number 3 endseg @@ -10830,7 +10830,7 @@ beginseg name "Z2_SEA_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_09.o" number 3 endseg @@ -10838,7 +10838,7 @@ beginseg name "Z2_SEA_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_10.o" number 3 endseg @@ -10846,7 +10846,7 @@ beginseg name "Z2_SEA_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_11.o" number 3 endseg @@ -10854,7 +10854,7 @@ beginseg name "Z2_SEA_room_12" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_12.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_12.o" number 3 endseg @@ -10862,7 +10862,7 @@ beginseg name "Z2_SEA_room_13" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_13.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_13.o" number 3 endseg @@ -10870,7 +10870,7 @@ beginseg name "Z2_SEA_room_14" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_14.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_14.o" number 3 endseg @@ -10878,7 +10878,7 @@ beginseg name "Z2_SEA_room_15" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA/Z2_SEA_room_15.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA/Z2_SEA_room_15.o" number 3 endseg @@ -10886,7 +10886,7 @@ beginseg name "Z2_35TAKI" compress romalign 0x1000 - include "build/assets/scenes/Z2_35TAKI/Z2_35TAKI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_35TAKI/Z2_35TAKI.o" number 2 endseg @@ -10894,7 +10894,7 @@ beginseg name "Z2_35TAKI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_35TAKI/Z2_35TAKI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_35TAKI/Z2_35TAKI_room_00.o" number 3 endseg @@ -10902,7 +10902,7 @@ beginseg name "Z2_REDEAD" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD.o" number 2 endseg @@ -10910,7 +10910,7 @@ beginseg name "Z2_REDEAD_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_00.o" number 3 endseg @@ -10918,7 +10918,7 @@ beginseg name "Z2_REDEAD_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_01.o" number 3 endseg @@ -10926,7 +10926,7 @@ beginseg name "Z2_REDEAD_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_02.o" number 3 endseg @@ -10934,7 +10934,7 @@ beginseg name "Z2_REDEAD_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_03.o" number 3 endseg @@ -10942,7 +10942,7 @@ beginseg name "Z2_REDEAD_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_04.o" number 3 endseg @@ -10950,7 +10950,7 @@ beginseg name "Z2_REDEAD_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_05.o" number 3 endseg @@ -10958,7 +10958,7 @@ beginseg name "Z2_REDEAD_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_06.o" number 3 endseg @@ -10966,7 +10966,7 @@ beginseg name "Z2_REDEAD_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_07.o" number 3 endseg @@ -10974,7 +10974,7 @@ beginseg name "Z2_REDEAD_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_08.o" number 3 endseg @@ -10982,7 +10982,7 @@ beginseg name "Z2_REDEAD_room_09" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_09.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_09.o" number 3 endseg @@ -10990,7 +10990,7 @@ beginseg name "Z2_REDEAD_room_10" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_10.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_10.o" number 3 endseg @@ -10998,7 +10998,7 @@ beginseg name "Z2_REDEAD_room_11" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_11.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_11.o" number 3 endseg @@ -11006,7 +11006,7 @@ beginseg name "Z2_REDEAD_room_12" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_12.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_12.o" number 3 endseg @@ -11014,7 +11014,7 @@ beginseg name "Z2_REDEAD_room_13" compress romalign 0x1000 - include "build/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_13.o" + include "$(BUILD_DIR)/assets/scenes/Z2_REDEAD/Z2_REDEAD_room_13.o" number 3 endseg @@ -11022,7 +11022,7 @@ beginseg name "Z2_BANDROOM" compress romalign 0x1000 - include "build/assets/scenes/Z2_BANDROOM/Z2_BANDROOM.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BANDROOM/Z2_BANDROOM.o" number 2 endseg @@ -11030,7 +11030,7 @@ beginseg name "Z2_BANDROOM_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_00.o" number 3 endseg @@ -11038,7 +11038,7 @@ beginseg name "Z2_BANDROOM_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_01.o" number 3 endseg @@ -11046,7 +11046,7 @@ beginseg name "Z2_BANDROOM_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_02.o" number 3 endseg @@ -11054,7 +11054,7 @@ beginseg name "Z2_BANDROOM_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_03.o" number 3 endseg @@ -11062,7 +11062,7 @@ beginseg name "Z2_BANDROOM_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BANDROOM/Z2_BANDROOM_room_04.o" number 3 endseg @@ -11070,7 +11070,7 @@ beginseg name "Z2_11GORONNOSATO" compress romalign 0x1000 - include "build/assets/scenes/Z2_11GORONNOSATO/Z2_11GORONNOSATO.o" + include "$(BUILD_DIR)/assets/scenes/Z2_11GORONNOSATO/Z2_11GORONNOSATO.o" number 2 endseg @@ -11078,7 +11078,7 @@ beginseg name "Z2_11GORONNOSATO_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_11GORONNOSATO/Z2_11GORONNOSATO_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_11GORONNOSATO/Z2_11GORONNOSATO_room_00.o" number 3 endseg @@ -11086,7 +11086,7 @@ beginseg name "Z2_11GORONNOSATO_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_11GORONNOSATO/Z2_11GORONNOSATO_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_11GORONNOSATO/Z2_11GORONNOSATO_room_01.o" number 3 endseg @@ -11094,7 +11094,7 @@ beginseg name "Z2_GORON_HAKA" compress romalign 0x1000 - include "build/assets/scenes/Z2_GORON_HAKA/Z2_GORON_HAKA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_GORON_HAKA/Z2_GORON_HAKA.o" number 2 endseg @@ -11102,7 +11102,7 @@ beginseg name "Z2_GORON_HAKA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_GORON_HAKA/Z2_GORON_HAKA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_GORON_HAKA/Z2_GORON_HAKA_room_00.o" number 3 endseg @@ -11110,7 +11110,7 @@ beginseg name "Z2_SECOM" compress romalign 0x1000 - include "build/assets/scenes/Z2_SECOM/Z2_SECOM.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SECOM/Z2_SECOM.o" number 2 endseg @@ -11118,7 +11118,7 @@ beginseg name "Z2_SECOM_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SECOM/Z2_SECOM_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SECOM/Z2_SECOM_room_00.o" number 3 endseg @@ -11126,7 +11126,7 @@ beginseg name "Z2_SECOM_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_SECOM/Z2_SECOM_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SECOM/Z2_SECOM_room_01.o" number 3 endseg @@ -11134,7 +11134,7 @@ beginseg name "Z2_10YUKIYAMANOMURA" compress romalign 0x1000 - include "build/assets/scenes/Z2_10YUKIYAMANOMURA/Z2_10YUKIYAMANOMURA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_10YUKIYAMANOMURA/Z2_10YUKIYAMANOMURA.o" number 2 endseg @@ -11142,7 +11142,7 @@ beginseg name "Z2_10YUKIYAMANOMURA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_10YUKIYAMANOMURA/Z2_10YUKIYAMANOMURA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_10YUKIYAMANOMURA/Z2_10YUKIYAMANOMURA_room_00.o" number 3 endseg @@ -11150,7 +11150,7 @@ beginseg name "Z2_TOUGITES" compress romalign 0x1000 - include "build/assets/scenes/Z2_TOUGITES/Z2_TOUGITES.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TOUGITES/Z2_TOUGITES.o" number 2 endseg @@ -11158,7 +11158,7 @@ beginseg name "Z2_TOUGITES_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_TOUGITES/Z2_TOUGITES_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TOUGITES/Z2_TOUGITES_room_00.o" number 3 endseg @@ -11166,7 +11166,7 @@ beginseg name "Z2_DANPEI" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI.o" number 2 endseg @@ -11174,7 +11174,7 @@ beginseg name "Z2_DANPEI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_00.o" number 3 endseg @@ -11182,7 +11182,7 @@ beginseg name "Z2_DANPEI_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_01.o" number 3 endseg @@ -11190,7 +11190,7 @@ beginseg name "Z2_DANPEI_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_02.o" number 3 endseg @@ -11198,7 +11198,7 @@ beginseg name "Z2_DANPEI_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_03.o" number 3 endseg @@ -11206,7 +11206,7 @@ beginseg name "Z2_DANPEI_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_04.o" number 3 endseg @@ -11214,7 +11214,7 @@ beginseg name "Z2_DANPEI_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_05.o" number 3 endseg @@ -11222,7 +11222,7 @@ beginseg name "Z2_DANPEI_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_06.o" number 3 endseg @@ -11230,7 +11230,7 @@ beginseg name "Z2_DANPEI_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_07.o" number 3 endseg @@ -11238,7 +11238,7 @@ beginseg name "Z2_DANPEI_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DANPEI/Z2_DANPEI_room_08.o" number 3 endseg @@ -11246,7 +11246,7 @@ beginseg name "Z2_IKANAMAE" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANAMAE/Z2_IKANAMAE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANAMAE/Z2_IKANAMAE.o" number 2 endseg @@ -11254,7 +11254,7 @@ beginseg name "Z2_IKANAMAE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKANAMAE/Z2_IKANAMAE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKANAMAE/Z2_IKANAMAE_room_00.o" number 3 endseg @@ -11262,7 +11262,7 @@ beginseg name "Z2_DOUJOU" compress romalign 0x1000 - include "build/assets/scenes/Z2_DOUJOU/Z2_DOUJOU.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DOUJOU/Z2_DOUJOU.o" number 2 endseg @@ -11270,7 +11270,7 @@ beginseg name "Z2_DOUJOU_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_DOUJOU/Z2_DOUJOU_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_DOUJOU/Z2_DOUJOU_room_00.o" number 3 endseg @@ -11278,7 +11278,7 @@ beginseg name "Z2_MUSICHOUSE" compress romalign 0x1000 - include "build/assets/scenes/Z2_MUSICHOUSE/Z2_MUSICHOUSE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MUSICHOUSE/Z2_MUSICHOUSE.o" number 2 endseg @@ -11286,7 +11286,7 @@ beginseg name "Z2_MUSICHOUSE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_MUSICHOUSE/Z2_MUSICHOUSE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MUSICHOUSE/Z2_MUSICHOUSE_room_00.o" number 3 endseg @@ -11294,7 +11294,7 @@ beginseg name "Z2_IKNINSIDE" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKNINSIDE/Z2_IKNINSIDE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKNINSIDE/Z2_IKNINSIDE.o" number 2 endseg @@ -11302,7 +11302,7 @@ beginseg name "Z2_IKNINSIDE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKNINSIDE/Z2_IKNINSIDE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKNINSIDE/Z2_IKNINSIDE_room_00.o" number 3 endseg @@ -11310,7 +11310,7 @@ beginseg name "Z2_IKNINSIDE_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_IKNINSIDE/Z2_IKNINSIDE_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_IKNINSIDE/Z2_IKNINSIDE_room_01.o" number 3 endseg @@ -11318,7 +11318,7 @@ beginseg name "Z2_MAP_SHOP" compress romalign 0x1000 - include "build/assets/scenes/Z2_MAP_SHOP/Z2_MAP_SHOP.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MAP_SHOP/Z2_MAP_SHOP.o" number 2 endseg @@ -11326,7 +11326,7 @@ beginseg name "Z2_MAP_SHOP_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_MAP_SHOP/Z2_MAP_SHOP_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_MAP_SHOP/Z2_MAP_SHOP_room_00.o" number 3 endseg @@ -11334,7 +11334,7 @@ beginseg name "Z2_F40" compress romalign 0x1000 - include "build/assets/scenes/Z2_F40/Z2_F40.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F40/Z2_F40.o" number 2 endseg @@ -11342,7 +11342,7 @@ beginseg name "Z2_F40_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_F40/Z2_F40_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F40/Z2_F40_room_00.o" number 3 endseg @@ -11350,7 +11350,7 @@ beginseg name "Z2_F41" compress romalign 0x1000 - include "build/assets/scenes/Z2_F41/Z2_F41.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F41/Z2_F41.o" number 2 endseg @@ -11358,7 +11358,7 @@ beginseg name "Z2_F41_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_F41/Z2_F41_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_F41/Z2_F41_room_00.o" number 3 endseg @@ -11366,7 +11366,7 @@ beginseg name "Z2_10YUKIYAMANOMURA2" compress romalign 0x1000 - include "build/assets/scenes/Z2_10YUKIYAMANOMURA2/Z2_10YUKIYAMANOMURA2.o" + include "$(BUILD_DIR)/assets/scenes/Z2_10YUKIYAMANOMURA2/Z2_10YUKIYAMANOMURA2.o" number 2 endseg @@ -11374,7 +11374,7 @@ beginseg name "Z2_10YUKIYAMANOMURA2_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_10YUKIYAMANOMURA2/Z2_10YUKIYAMANOMURA2_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_10YUKIYAMANOMURA2/Z2_10YUKIYAMANOMURA2_room_00.o" number 3 endseg @@ -11382,7 +11382,7 @@ beginseg name "Z2_10YUKIYAMANOMURA2_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_10YUKIYAMANOMURA2/Z2_10YUKIYAMANOMURA2_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_10YUKIYAMANOMURA2/Z2_10YUKIYAMANOMURA2_room_01.o" number 3 endseg @@ -11390,7 +11390,7 @@ beginseg name "Z2_14YUKIDAMANOMITI" compress romalign 0x1000 - include "build/assets/scenes/Z2_14YUKIDAMANOMITI/Z2_14YUKIDAMANOMITI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_14YUKIDAMANOMITI/Z2_14YUKIDAMANOMITI.o" number 2 endseg @@ -11398,7 +11398,7 @@ beginseg name "Z2_14YUKIDAMANOMITI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_14YUKIDAMANOMITI/Z2_14YUKIDAMANOMITI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_14YUKIDAMANOMITI/Z2_14YUKIDAMANOMITI_room_00.o" number 3 endseg @@ -11406,7 +11406,7 @@ beginseg name "Z2_12HAKUGINMAE" compress romalign 0x1000 - include "build/assets/scenes/Z2_12HAKUGINMAE/Z2_12HAKUGINMAE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_12HAKUGINMAE/Z2_12HAKUGINMAE.o" number 2 endseg @@ -11414,7 +11414,7 @@ beginseg name "Z2_12HAKUGINMAE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_12HAKUGINMAE/Z2_12HAKUGINMAE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_12HAKUGINMAE/Z2_12HAKUGINMAE_room_00.o" number 3 endseg @@ -11422,7 +11422,7 @@ beginseg name "Z2_17SETUGEN" compress romalign 0x1000 - include "build/assets/scenes/Z2_17SETUGEN/Z2_17SETUGEN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_17SETUGEN/Z2_17SETUGEN.o" number 2 endseg @@ -11430,7 +11430,7 @@ beginseg name "Z2_17SETUGEN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_17SETUGEN/Z2_17SETUGEN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_17SETUGEN/Z2_17SETUGEN_room_00.o" number 3 endseg @@ -11438,7 +11438,7 @@ beginseg name "Z2_17SETUGEN2" compress romalign 0x1000 - include "build/assets/scenes/Z2_17SETUGEN2/Z2_17SETUGEN2.o" + include "$(BUILD_DIR)/assets/scenes/Z2_17SETUGEN2/Z2_17SETUGEN2.o" number 2 endseg @@ -11446,7 +11446,7 @@ beginseg name "Z2_17SETUGEN2_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_17SETUGEN2/Z2_17SETUGEN2_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_17SETUGEN2/Z2_17SETUGEN2_room_00.o" number 3 endseg @@ -11454,7 +11454,7 @@ beginseg name "Z2_SEA_BS" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA_BS/Z2_SEA_BS.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA_BS/Z2_SEA_BS.o" number 2 endseg @@ -11462,7 +11462,7 @@ beginseg name "Z2_SEA_BS_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SEA_BS/Z2_SEA_BS_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SEA_BS/Z2_SEA_BS_room_00.o" number 3 endseg @@ -11470,7 +11470,7 @@ beginseg name "Z2_RANDOM" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM.o" number 2 endseg @@ -11478,7 +11478,7 @@ beginseg name "Z2_RANDOM_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_00.o" number 3 endseg @@ -11486,7 +11486,7 @@ beginseg name "Z2_RANDOM_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_01.o" number 3 endseg @@ -11494,7 +11494,7 @@ beginseg name "Z2_RANDOM_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_02.o" number 3 endseg @@ -11502,7 +11502,7 @@ beginseg name "Z2_RANDOM_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_03.o" number 3 endseg @@ -11510,7 +11510,7 @@ beginseg name "Z2_RANDOM_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_04.o" number 3 endseg @@ -11518,7 +11518,7 @@ beginseg name "Z2_RANDOM_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_RANDOM/Z2_RANDOM_room_05.o" number 3 endseg @@ -11526,7 +11526,7 @@ beginseg name "Z2_YADOYA" compress romalign 0x1000 - include "build/assets/scenes/Z2_YADOYA/Z2_YADOYA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YADOYA/Z2_YADOYA.o" number 2 endseg @@ -11534,7 +11534,7 @@ beginseg name "Z2_YADOYA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_00.o" number 3 endseg @@ -11542,7 +11542,7 @@ beginseg name "Z2_YADOYA_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_01.o" number 3 endseg @@ -11550,7 +11550,7 @@ beginseg name "Z2_YADOYA_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_02.o" number 3 endseg @@ -11558,7 +11558,7 @@ beginseg name "Z2_YADOYA_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_03.o" number 3 endseg @@ -11566,7 +11566,7 @@ beginseg name "Z2_YADOYA_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_YADOYA/Z2_YADOYA_room_04.o" number 3 endseg @@ -11574,7 +11574,7 @@ beginseg name "Z2_KONPEKI_ENT" compress romalign 0x1000 - include "build/assets/scenes/Z2_KONPEKI_ENT/Z2_KONPEKI_ENT.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KONPEKI_ENT/Z2_KONPEKI_ENT.o" number 2 endseg @@ -11582,7 +11582,7 @@ beginseg name "Z2_KONPEKI_ENT_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KONPEKI_ENT/Z2_KONPEKI_ENT_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KONPEKI_ENT/Z2_KONPEKI_ENT_room_00.o" number 3 endseg @@ -11590,7 +11590,7 @@ beginseg name "Z2_INSIDETOWER" compress romalign 0x1000 - include "build/assets/scenes/Z2_INSIDETOWER/Z2_INSIDETOWER.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INSIDETOWER/Z2_INSIDETOWER.o" number 2 endseg @@ -11598,7 +11598,7 @@ beginseg name "Z2_INSIDETOWER_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_INSIDETOWER/Z2_INSIDETOWER_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INSIDETOWER/Z2_INSIDETOWER_room_00.o" number 3 endseg @@ -11606,7 +11606,7 @@ beginseg name "Z2_INSIDETOWER_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_INSIDETOWER/Z2_INSIDETOWER_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_INSIDETOWER/Z2_INSIDETOWER_room_01.o" number 3 endseg @@ -11614,7 +11614,7 @@ beginseg name "Z2_26SARUNOMORI" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI.o" number 2 endseg @@ -11622,7 +11622,7 @@ beginseg name "Z2_26SARUNOMORI_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_00.o" number 3 endseg @@ -11630,7 +11630,7 @@ beginseg name "Z2_26SARUNOMORI_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_01.o" number 3 endseg @@ -11638,7 +11638,7 @@ beginseg name "Z2_26SARUNOMORI_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_02.o" number 3 endseg @@ -11646,7 +11646,7 @@ beginseg name "Z2_26SARUNOMORI_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_03.o" number 3 endseg @@ -11654,7 +11654,7 @@ beginseg name "Z2_26SARUNOMORI_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_04.o" number 3 endseg @@ -11662,7 +11662,7 @@ beginseg name "Z2_26SARUNOMORI_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_05.o" number 3 endseg @@ -11670,7 +11670,7 @@ beginseg name "Z2_26SARUNOMORI_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_06.o" number 3 endseg @@ -11678,7 +11678,7 @@ beginseg name "Z2_26SARUNOMORI_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_07.o" number 3 endseg @@ -11686,7 +11686,7 @@ beginseg name "Z2_26SARUNOMORI_room_08" compress romalign 0x1000 - include "build/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_08.o" + include "$(BUILD_DIR)/assets/scenes/Z2_26SARUNOMORI/Z2_26SARUNOMORI_room_08.o" number 3 endseg @@ -11694,7 +11694,7 @@ beginseg name "Z2_LOST_WOODS" compress romalign 0x1000 - include "build/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS.o" number 2 endseg @@ -11702,7 +11702,7 @@ beginseg name "Z2_LOST_WOODS_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS_room_00.o" number 3 endseg @@ -11710,7 +11710,7 @@ beginseg name "Z2_LOST_WOODS_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS_room_01.o" number 3 endseg @@ -11718,7 +11718,7 @@ beginseg name "Z2_LOST_WOODS_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LOST_WOODS/Z2_LOST_WOODS_room_02.o" number 3 endseg @@ -11726,7 +11726,7 @@ beginseg name "Z2_LAST_LINK" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK.o" number 2 endseg @@ -11734,7 +11734,7 @@ beginseg name "Z2_LAST_LINK_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_00.o" number 3 endseg @@ -11742,7 +11742,7 @@ beginseg name "Z2_LAST_LINK_room_01" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_01.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_01.o" number 3 endseg @@ -11750,7 +11750,7 @@ beginseg name "Z2_LAST_LINK_room_02" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_02.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_02.o" number 3 endseg @@ -11758,7 +11758,7 @@ beginseg name "Z2_LAST_LINK_room_03" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_03.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_03.o" number 3 endseg @@ -11766,7 +11766,7 @@ beginseg name "Z2_LAST_LINK_room_04" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_04.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_04.o" number 3 endseg @@ -11774,7 +11774,7 @@ beginseg name "Z2_LAST_LINK_room_05" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_05.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_05.o" number 3 endseg @@ -11782,7 +11782,7 @@ beginseg name "Z2_LAST_LINK_room_06" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_06.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_06.o" number 3 endseg @@ -11790,7 +11790,7 @@ beginseg name "Z2_LAST_LINK_room_07" compress romalign 0x1000 - include "build/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_07.o" + include "$(BUILD_DIR)/assets/scenes/Z2_LAST_LINK/Z2_LAST_LINK_room_07.o" number 3 endseg @@ -11798,7 +11798,7 @@ beginseg name "Z2_SOUGEN" compress romalign 0x1000 - include "build/assets/scenes/Z2_SOUGEN/Z2_SOUGEN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SOUGEN/Z2_SOUGEN.o" number 2 endseg @@ -11806,7 +11806,7 @@ beginseg name "Z2_SOUGEN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_SOUGEN/Z2_SOUGEN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_SOUGEN/Z2_SOUGEN_room_00.o" number 3 endseg @@ -11814,7 +11814,7 @@ beginseg name "Z2_BOMYA" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOMYA/Z2_BOMYA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOMYA/Z2_BOMYA.o" number 2 endseg @@ -11822,7 +11822,7 @@ beginseg name "Z2_BOMYA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_BOMYA/Z2_BOMYA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BOMYA/Z2_BOMYA_room_00.o" number 3 endseg @@ -11830,7 +11830,7 @@ beginseg name "Z2_KYOJINNOMA" compress romalign 0x1000 - include "build/assets/scenes/Z2_KYOJINNOMA/Z2_KYOJINNOMA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KYOJINNOMA/Z2_KYOJINNOMA.o" number 2 endseg @@ -11838,7 +11838,7 @@ beginseg name "Z2_KYOJINNOMA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KYOJINNOMA/Z2_KYOJINNOMA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KYOJINNOMA/Z2_KYOJINNOMA_room_00.o" number 3 endseg @@ -11846,7 +11846,7 @@ beginseg name "Z2_KOEPONARACE" compress romalign 0x1000 - include "build/assets/scenes/Z2_KOEPONARACE/Z2_KOEPONARACE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KOEPONARACE/Z2_KOEPONARACE.o" number 2 endseg @@ -11854,7 +11854,7 @@ beginseg name "Z2_KOEPONARACE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_KOEPONARACE/Z2_KOEPONARACE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_KOEPONARACE/Z2_KOEPONARACE_room_00.o" number 3 endseg @@ -11862,7 +11862,7 @@ beginseg name "Z2_GORONRACE" compress romalign 0x1000 - include "build/assets/scenes/Z2_GORONRACE/Z2_GORONRACE.o" + include "$(BUILD_DIR)/assets/scenes/Z2_GORONRACE/Z2_GORONRACE.o" number 2 endseg @@ -11870,7 +11870,7 @@ beginseg name "Z2_GORONRACE_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_GORONRACE/Z2_GORONRACE_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_GORONRACE/Z2_GORONRACE_room_00.o" number 3 endseg @@ -11878,7 +11878,7 @@ beginseg name "Z2_TOWN" compress romalign 0x1000 - include "build/assets/scenes/Z2_TOWN/Z2_TOWN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TOWN/Z2_TOWN.o" number 2 endseg @@ -11886,7 +11886,7 @@ beginseg name "Z2_TOWN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_TOWN/Z2_TOWN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_TOWN/Z2_TOWN_room_00.o" number 3 endseg @@ -11894,7 +11894,7 @@ beginseg name "Z2_ICHIBA" compress romalign 0x1000 - include "build/assets/scenes/Z2_ICHIBA/Z2_ICHIBA.o" + include "$(BUILD_DIR)/assets/scenes/Z2_ICHIBA/Z2_ICHIBA.o" number 2 endseg @@ -11902,7 +11902,7 @@ beginseg name "Z2_ICHIBA_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_ICHIBA/Z2_ICHIBA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_ICHIBA/Z2_ICHIBA_room_00.o" number 3 endseg @@ -11910,7 +11910,7 @@ beginseg name "Z2_BACKTOWN" compress romalign 0x1000 - include "build/assets/scenes/Z2_BACKTOWN/Z2_BACKTOWN.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BACKTOWN/Z2_BACKTOWN.o" number 2 endseg @@ -11918,7 +11918,7 @@ beginseg name "Z2_BACKTOWN_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_BACKTOWN/Z2_BACKTOWN_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_BACKTOWN/Z2_BACKTOWN_room_00.o" number 3 endseg @@ -11926,7 +11926,7 @@ beginseg name "Z2_CLOCKTOWER" compress romalign 0x1000 - include "build/assets/scenes/Z2_CLOCKTOWER/Z2_CLOCKTOWER.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CLOCKTOWER/Z2_CLOCKTOWER.o" number 2 endseg @@ -11934,7 +11934,7 @@ beginseg name "Z2_CLOCKTOWER_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_CLOCKTOWER/Z2_CLOCKTOWER_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_CLOCKTOWER/Z2_CLOCKTOWER_room_00.o" number 3 endseg @@ -11942,7 +11942,7 @@ beginseg name "Z2_ALLEY" compress romalign 0x1000 - include "build/assets/scenes/Z2_ALLEY/Z2_ALLEY.o" + include "$(BUILD_DIR)/assets/scenes/Z2_ALLEY/Z2_ALLEY.o" number 2 endseg @@ -11950,7 +11950,7 @@ beginseg name "Z2_ALLEY_room_00" compress romalign 0x1000 - include "build/assets/scenes/Z2_ALLEY/Z2_ALLEY_room_00.o" + include "$(BUILD_DIR)/assets/scenes/Z2_ALLEY/Z2_ALLEY_room_00.o" number 3 endseg @@ -11958,7 +11958,7 @@ beginseg name "SPOT00" compress romalign 0x1000 - include "build/assets/scenes/SPOT00/SPOT00.o" + include "$(BUILD_DIR)/assets/scenes/SPOT00/SPOT00.o" number 2 endseg @@ -11966,7 +11966,7 @@ beginseg name "SPOT00_room_00" compress romalign 0x1000 - include "build/assets/scenes/SPOT00/SPOT00_room_00.o" + include "$(BUILD_DIR)/assets/scenes/SPOT00/SPOT00_room_00.o" number 3 endseg @@ -11974,7 +11974,7 @@ beginseg name "KAKUSIANA" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA.o" number 2 endseg @@ -11982,7 +11982,7 @@ beginseg name "KAKUSIANA_room_00" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_00.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_00.o" number 3 endseg @@ -11990,7 +11990,7 @@ beginseg name "KAKUSIANA_room_01" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_01.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_01.o" number 3 endseg @@ -11998,7 +11998,7 @@ beginseg name "KAKUSIANA_room_02" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_02.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_02.o" number 3 endseg @@ -12006,7 +12006,7 @@ beginseg name "KAKUSIANA_room_03" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_03.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_03.o" number 3 endseg @@ -12014,7 +12014,7 @@ beginseg name "KAKUSIANA_room_04" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_04.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_04.o" number 3 endseg @@ -12022,7 +12022,7 @@ beginseg name "KAKUSIANA_room_05" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_05.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_05.o" number 3 endseg @@ -12030,7 +12030,7 @@ beginseg name "KAKUSIANA_room_06" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_06.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_06.o" number 3 endseg @@ -12038,7 +12038,7 @@ beginseg name "KAKUSIANA_room_07" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_07.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_07.o" number 3 endseg @@ -12046,7 +12046,7 @@ beginseg name "KAKUSIANA_room_08" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_08.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_08.o" number 3 endseg @@ -12054,7 +12054,7 @@ beginseg name "KAKUSIANA_room_09" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_09.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_09.o" number 3 endseg @@ -12062,7 +12062,7 @@ beginseg name "KAKUSIANA_room_10" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_10.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_10.o" number 3 endseg @@ -12070,7 +12070,7 @@ beginseg name "KAKUSIANA_room_11" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_11.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_11.o" number 3 endseg @@ -12078,7 +12078,7 @@ beginseg name "KAKUSIANA_room_12" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_12.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_12.o" number 3 endseg @@ -12086,7 +12086,7 @@ beginseg name "KAKUSIANA_room_13" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_13.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_13.o" number 3 endseg @@ -12094,7 +12094,7 @@ beginseg name "KAKUSIANA_room_14" compress romalign 0x1000 - include "build/assets/scenes/KAKUSIANA/KAKUSIANA_room_14.o" + include "$(BUILD_DIR)/assets/scenes/KAKUSIANA/KAKUSIANA_room_14.o" number 3 endseg @@ -12102,83 +12102,96 @@ beginseg name "bump_texture_static" compress romalign 0x1000 - include "build/baserom/bump_texture_static.o" + include "$(BUILD_DIR)/baserom/bump_texture_static.o" endseg beginseg name "anime_model_1_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_model_1_static.o" + include "$(BUILD_DIR)/baserom/anime_model_1_static.o" endseg beginseg name "anime_model_2_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_model_2_static.o" + include "$(BUILD_DIR)/baserom/anime_model_2_static.o" endseg beginseg name "anime_model_3_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_model_3_static.o" + include "$(BUILD_DIR)/baserom/anime_model_3_static.o" endseg beginseg name "anime_model_4_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_model_4_static.o" + include "$(BUILD_DIR)/baserom/anime_model_4_static.o" endseg beginseg name "anime_model_5_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_model_5_static.o" + include "$(BUILD_DIR)/baserom/anime_model_5_static.o" endseg beginseg name "anime_model_6_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_model_6_static.o" + include "$(BUILD_DIR)/baserom/anime_model_6_static.o" endseg beginseg name "anime_texture_1_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_texture_1_static.o" + include "$(BUILD_DIR)/baserom/anime_texture_1_static.o" endseg beginseg name "anime_texture_2_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_texture_2_static.o" + include "$(BUILD_DIR)/baserom/anime_texture_2_static.o" endseg beginseg name "anime_texture_3_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_texture_3_static.o" + include "$(BUILD_DIR)/baserom/anime_texture_3_static.o" endseg beginseg name "anime_texture_4_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_texture_4_static.o" + include "$(BUILD_DIR)/baserom/anime_texture_4_static.o" endseg beginseg name "anime_texture_5_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_texture_5_static.o" + include "$(BUILD_DIR)/baserom/anime_texture_5_static.o" endseg beginseg name "anime_texture_6_static" + flags SYMS romalign 0x1000 - include "build/baserom/anime_texture_6_static.o" + include "$(BUILD_DIR)/baserom/anime_texture_6_static.o" endseg beginseg name "softsprite_matrix_static" + flags SYMS romalign 0x1000 - include "build/baserom/softsprite_matrix_static.o" + include "$(BUILD_DIR)/baserom/softsprite_matrix_static.o" endseg diff --git a/src/dmadata/dmadata.c b/src/dmadata/dmadata.c index 988e0aface..faeb5f3386 100644 --- a/src/dmadata/dmadata.c +++ b/src/dmadata/dmadata.c @@ -3,17 +3,17 @@ // Linker symbol declarations (used in the table below) #define DEFINE_DMA_ENTRY(name, _nameString) DECLARE_ROM_SEGMENT(name) -#define DEFINE_DMA_ENTRY_UNSET(name, _nameString) DECLARE_ROM_SEGMENT(name) +#define DEFINE_DMA_ENTRY_SYMS(name, _nameString) DECLARE_ROM_SEGMENT(name) #include "tables/dmadata_table.h" #undef DEFINE_DMA_ENTRY -#undef DEFINE_DMA_ENTRY_UNSET +#undef DEFINE_DMA_ENTRY_SYMS // dmadata Table definition #define DEFINE_DMA_ENTRY(name, _nameString) \ { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name), SEGMENT_ROM_START(name), 0 }, -#define DEFINE_DMA_ENTRY_UNSET(name, _nameString) \ +#define DEFINE_DMA_ENTRY_SYMS(name, _nameString) \ { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name), 0xFFFFFFFF, 0xFFFFFFFF }, DmaEntry gDmaDataTable[] = { @@ -22,7 +22,7 @@ DmaEntry gDmaDataTable[] = { }; #undef DEFINE_DMA_ENTRY -#undef DEFINE_DMA_ENTRY_UNSET +#undef DEFINE_DMA_ENTRY_SYMS u8 sDmaDataPadding[0xF0] = { 0 }; static s32 sBssPad; diff --git a/src/overlays/actors/ovl_En_Ah/z_en_ah.c b/src/overlays/actors/ovl_En_Ah/z_en_ah.c index 6699c75944..52fc5d2e46 100644 --- a/src/overlays/actors/ovl_En_Ah/z_en_ah.c +++ b/src/overlays/actors/ovl_En_Ah/z_en_ah.c @@ -18,7 +18,7 @@ void EnAh_Draw(Actor* thisx, PlayState* play); void func_80BD3768(EnAh* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Ah/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Ah/scheduleScripts.schl.inc" s32 D_80BD3DE8[] = { 0x0E28FF0C, 0x10000000 }; diff --git a/src/overlays/actors/ovl_En_Al/z_en_al.c b/src/overlays/actors/ovl_En_Al/z_en_al.c index f19a68fd48..5418ad15a1 100644 --- a/src/overlays/actors/ovl_En_Al/z_en_al.c +++ b/src/overlays/actors/ovl_En_Al/z_en_al.c @@ -17,7 +17,7 @@ void EnAl_Draw(Actor* thisx, PlayState* play); void func_80BDF6C4(EnAl* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Al/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Al/scheduleScripts.schl.inc" s32 D_80BDFCBC[] = { 0x09000017, 0x0E27A50C, 0x09000018, 0x0E27A60C, 0x09000017, 0x0E27A70C, 0x09000018, 0x0E27A80C, diff --git a/src/overlays/actors/ovl_En_An/z_en_an.c b/src/overlays/actors/ovl_En_An/z_en_an.c index 713833c25b..a5e9d878f9 100644 --- a/src/overlays/actors/ovl_En_An/z_en_an.c +++ b/src/overlays/actors/ovl_En_An/z_en_an.c @@ -158,7 +158,7 @@ typedef enum AnjuScheduleResult { /* 64 */ ANJU_SCH_MAX } AnjuScheduleResult; -#include "build/src/overlays/actors/ovl_En_An/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_An/scheduleScripts.schl.inc" static s32 sSearchTimePathLimit[ANJU_SCH_MAX] = { -1, // ANJU_SCH_NONE diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index 3dc83e1bf7..fdd425131a 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -129,7 +129,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -#include "build/src/overlays/actors/ovl_En_Baba/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Baba/scheduleScripts.schl.inc" static s32 sSearchTimePathLimit[] = { -1, -1, 0 }; diff --git a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c index a21f80c8aa..aa96a74257 100644 --- a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c +++ b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c @@ -29,7 +29,7 @@ typedef enum { /* 1 */ TOILET_HAND_SCH_AVAILABLE } ToiletHandScheduleResult; -#include "build/src/overlays/actors/ovl_En_Bjt/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Bjt/scheduleScripts.schl.inc" static u8 sMsgEventScript[] = { 0x0E, 0x29, 0x48, 0x0C, 0x0E, 0x00, 0xFF, 0x2B, 0x00, 0x00, 0x00, 0x52, 0x00, 0x5F, 0x2C, 0x29, 0x4A, 0x0C, 0x2F, diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 4521bf0285..75c6249d86 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -36,7 +36,7 @@ void func_80867144(EnDoor* this, PlayState* play); void func_808670F0(EnDoor* this, PlayState* play); void func_80866A5C(EnDoor* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Door/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Door/scheduleScripts.schl.inc" ScheduleScript* D_8086778C[] = { D_808675D0, D_808675E4, D_80867634, D_80867640, D_8086764C, D_80867658, D_80867684, D_80867688, diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 1616111939..68e68d2364 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -19,7 +19,7 @@ void EnGm_Draw(Actor* thisx, PlayState* play); void func_80950CDC(EnGm* this, PlayState* play); void func_80950DB8(EnGm* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Gm/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Gm/scheduleScripts.schl.inc" static s32 D_80951A0C[] = { -1, 1, 4, 1, -1, 1, -1, -1, -1, 0, 2, 3, 5, 6, 8, 1, 0, 8, 3, 6, 0, 1, 4, 7, 0, 1, 2, 4, 5, 7, 1, diff --git a/src/overlays/actors/ovl_En_Ig/z_en_ig.c b/src/overlays/actors/ovl_En_Ig/z_en_ig.c index a254dc64ac..c971c71e9d 100644 --- a/src/overlays/actors/ovl_En_Ig/z_en_ig.c +++ b/src/overlays/actors/ovl_En_Ig/z_en_ig.c @@ -19,7 +19,7 @@ void EnIg_Draw(Actor* thisx, PlayState* play); void func_80BF2AF8(EnIg* this, PlayState* play); void func_80BF2BD4(EnIg* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Ig/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Ig/scheduleScripts.schl.inc" static s32 D_80BF3318[] = { -1, -1, 3, 1, 3, 1, 2, 0, 3, 5, 0, 3, 1, 2, 4 }; diff --git a/src/overlays/actors/ovl_En_Ja/z_en_ja.c b/src/overlays/actors/ovl_En_Ja/z_en_ja.c index 0d713c048a..cde5ec71c1 100644 --- a/src/overlays/actors/ovl_En_Ja/z_en_ja.c +++ b/src/overlays/actors/ovl_En_Ja/z_en_ja.c @@ -21,7 +21,7 @@ void func_80BC2EA4(EnJa* this); void func_80BC32D8(EnJa* this, PlayState* play); void func_80BC3594(EnJa* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Ja/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Ja/scheduleScripts.schl.inc" s32 D_80BC360C[] = { 0x0E29370C, 0x170E2938, 0x0C180E29, 0x390C170E, 0x293A0C09, 0x0000180E, 0x293B0C09, 0x00001000, diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index f2bb78d400..8ede3029dd 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -36,7 +36,7 @@ typedef enum EnNbScheduleResult { /* 4 */ EN_NB_SCH_4 } EnNbScheduleResult; -#include "build/src/overlays/actors/ovl_En_Nb/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Nb/scheduleScripts.schl.inc" u8 D_80BC1464[] = { 0x1B, 0x04, 0x08, 0x00, 0x6A, 0x0A, 0x00, 0x10, 0x00, 0x08, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x0E, diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 9e554f02d8..1388575eb7 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -20,7 +20,7 @@ void EnPm_Draw(Actor* thisx, PlayState* play); void func_80AFA4D0(EnPm* this, PlayState* play); void func_80AFA5FC(EnPm* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Pm/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Pm/scheduleScripts.schl.inc" static s32 D_80AFB430[] = { -1, 0, 4, 1, 0, 0, 1, 4, -1, -1, 15, 5, 0, 3, -1, -1, 1, 2, 11, 3, -1, -1, -1, 0, 0, 0, 0, 0, 1, 12, -1, diff --git a/src/overlays/actors/ovl_En_Pst/z_en_pst.c b/src/overlays/actors/ovl_En_Pst/z_en_pst.c index 56b4af9253..459c68cc76 100644 --- a/src/overlays/actors/ovl_En_Pst/z_en_pst.c +++ b/src/overlays/actors/ovl_En_Pst/z_en_pst.c @@ -28,7 +28,7 @@ typedef enum { /* 1 */ POSTBOX_BEHAVIOUR_TAKE_ITEM } PostboxBehaviour; -#include "build/src/overlays/actors/ovl_En_Pst/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Pst/scheduleScripts.schl.inc" s32 D_80B2C23C[] = { 0x0E27840C, 0x0E00FF2B, 0x00000031, 0x00392800, 0x0A122C27, 0xA40C2F00, 0x000C1012, diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index b3686700be..8f9a3ac9d0 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -142,7 +142,7 @@ static TrackOptionsSet sTrackOptions = { { 0x1770, 4, 1, 6 }, }; -#include "build/src/overlays/actors/ovl_En_Suttari/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Suttari/scheduleScripts.schl.inc" static s32 D_80BAE8F8[] = { -1, -1, -1, -1, -1, -1, 1, 2, 0, 3, 1, 2, 0, 0, 3, 0, diff --git a/src/overlays/actors/ovl_En_Tab/z_en_tab.c b/src/overlays/actors/ovl_En_Tab/z_en_tab.c index dcaa8a8d31..44e01259a7 100644 --- a/src/overlays/actors/ovl_En_Tab/z_en_tab.c +++ b/src/overlays/actors/ovl_En_Tab/z_en_tab.c @@ -20,7 +20,7 @@ void EnTab_Draw(Actor* thisx, PlayState* play); void func_80BE127C(EnTab* this, PlayState* play); void func_80BE1348(EnTab* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Tab/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Tab/scheduleScripts.schl.inc" s32 D_80BE1914[] = { 0x003A0200, 0x080E2AF9, 0x0C113A02, 0x100E2AFA, 0x0C150900, 0x000E2AFB, diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c index 59507d3287..51911d9aea 100644 --- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c +++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c @@ -82,7 +82,7 @@ void func_80A4084C(EnTest3* this, PlayState* play); void func_80A40908(EnTest3* this, PlayState* play); void func_80A40A6C(EnTest3* this, PlayState* play); -#include "build/src/overlays/actors/ovl_En_Test3/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Test3/scheduleScripts.schl.inc" ActorInit En_Test3_InitVars = { /**/ ACTOR_EN_TEST3, diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index cba5445795..2af884100d 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -62,7 +62,7 @@ void func_80AEF5F4(Actor* thisx, PlayState* play); static s32 D_80AF0050; -#include "build/src/overlays/actors/ovl_En_Tk/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_En_Tk/scheduleScripts.schl.inc" ActorInit En_Tk_InitVars = { /**/ ACTOR_EN_TK, diff --git a/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c b/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c index 49fd1a289c..4ac6ce4b73 100644 --- a/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c +++ b/src/overlays/actors/ovl_Obj_Shutter/z_obj_shutter.c @@ -34,7 +34,7 @@ void ObjShutter_Init(Actor* thisx, PlayState* play) { void ObjShutter_Destroy(Actor* thisx, PlayState* play) { } -#include "build/src/overlays/actors/ovl_Obj_Shutter/scheduleScripts.schl.inc" +#include "src/overlays/actors/ovl_Obj_Shutter/scheduleScripts.schl.inc" void ObjShutter_Update(Actor* thisx, PlayState* play2) { ObjShutter* this = THIS; diff --git a/sym_info.py b/sym_info.py index 8578b2812a..7634c3ddd8 100755 --- a/sym_info.py +++ b/sym_info.py @@ -14,10 +14,11 @@ def symInfoMain(): parser = argparse.ArgumentParser(description="Display various information about a symbol or address.") parser.add_argument("symname", help="symbol name or VROM/VRAM address to lookup") parser.add_argument("-e", "--expected", dest="use_expected", action="store_true", help="use the map file in expected/build/ instead of build/") + parser.add_argument("-v", "--version", help="Which version should be processed", default="n64-us") args = parser.parse_args() - BUILTMAP = Path(f"build") / f"mm.map" + BUILTMAP = Path(f"build/{args.version}/mm-{args.version}.map") mapPath = BUILTMAP if args.use_expected: diff --git a/tools/Makefile b/tools/Makefile index 5534e56108..86523b4450 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -6,15 +6,12 @@ all: $(PROGRAMS) $(MAKE) -C ZAPD $(MAKE) -C fado $(MAKE) -C buildtools -# Some gcc versions give a warning about the -flto flag with no parameters. So we override the CFLAGS as a workaround - $(MAKE) -C z64compress CFLAGS="-Os -flto=auto" clean: $(RM) $(PROGRAMS) $(MAKE) -C ZAPD clean $(MAKE) -C fado clean $(MAKE) -C buildtools clean - $(MAKE) -C z64compress clean vtxdis_SOURCES := vtxdis.c diff --git a/tools/assist.py b/tools/assist.py index 7381c85a7a..fefb68ca4f 100755 --- a/tools/assist.py +++ b/tools/assist.py @@ -10,10 +10,10 @@ gAddressWidth = 18 # if your ld >= 2.40 change this to 10 script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = script_dir + "/../" asm_dir = root_dir + "asm/non_matchings/overlays" -build_dir = root_dir + "build/" +build_dir = root_dir + "build/n64-us/" def read_rom(): - with open("baserom_uncompressed.z64", "rb") as f: + with open("baseroms/n64-us/baserom-decompressed.z64", "rb") as f: return f.read() @@ -162,7 +162,7 @@ parser.add_argument("--num-out", help="number of functions to display", type=int args = parser.parse_args() rom_bytes = read_rom() -map_syms = parse_map(build_dir + "mm.map") +map_syms = parse_map(build_dir + "mm-n64-us.map") map_offsets = get_map_offsets(map_syms) s_files = get_all_s_files() diff --git a/tools/buildtools/compress.py b/tools/buildtools/compress.py new file mode 100644 index 0000000000..0aa7a96b24 --- /dev/null +++ b/tools/buildtools/compress.py @@ -0,0 +1,284 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: 2024 zeldaret +# SPDX-License-Identifier: CC0-1.0 + +from __future__ import annotations + +import argparse +from pathlib import Path +import dataclasses +import time +import multiprocessing +import multiprocessing.pool + +import crunch64 + +import dmadata + + +def align(v: int): + v += 0xF + return v // 0x10 * 0x10 + + +@dataclasses.dataclass +class RomSegment: + vrom_start: int + vrom_end: int + is_compressed: bool + is_syms: bool + data: memoryview | None + data_async: multiprocessing.pool.AsyncResult | None + + @property + def uncompressed_size(self): + return self.vrom_end - self.vrom_start + + +# Make interrupting the compression with ^C less jank +# https://stackoverflow.com/questions/72967793/keyboardinterrupt-with-python-multiprocessing-pool +def set_sigint_ignored(): + import signal + + signal.signal(signal.SIGINT, signal.SIG_IGN) + + +def compress_rom( + rom_data: memoryview, + dmadata_start: int, + compress_entries_indices: set[int], + n_threads: int = None, +): + """ + rom_data: the uncompressed rom data + dmadata_start: the offset in the rom where the dmadata starts + compress_entries_indices: the indices in the dmadata of the segments that should be compressed + n_threads: how many cores to use for compression + """ + + # Segments of the compressed rom (not all are compressed) + compressed_rom_segments: list[RomSegment] = [] + dma_entries = dmadata.read_dmadata(rom_data, dmadata_start) + # We sort the DMA entries by ROM start because `compress_entries_indices` + # refers to indices in ROM order, but the uncompressed dmadata might not be + # in ROM order. + dma_entries.sort(key=lambda dma_entry: dma_entry.vrom_start) + + with multiprocessing.Pool(n_threads, initializer=set_sigint_ignored) as p: + # Extract each segment from the input rom + for entry_index, dma_entry in enumerate(dma_entries): + segment_rom_start = dma_entry.rom_start + segment_rom_end = dma_entry.rom_start + ( + dma_entry.vrom_end - dma_entry.vrom_start + ) + segment_data_uncompressed = rom_data[segment_rom_start:segment_rom_end] + + is_compressed = entry_index in compress_entries_indices + + if is_compressed: + segment_data = None + segment_data_async = p.apply_async( + crunch64.yaz0.compress, + (bytes(segment_data_uncompressed),), + ) + else: + segment_data = segment_data_uncompressed + segment_data_async = None + + compressed_rom_segments.append( + RomSegment( + dma_entry.vrom_start, + dma_entry.vrom_end, + is_compressed, + dma_entry.is_syms(), + segment_data, + segment_data_async, + ) + ) + + # Wait on compression of all compressed segments + waiting_on_segments = [ + segment for segment in compressed_rom_segments if segment.is_compressed + ] + total_uncompressed_size_of_data_to_compress = sum( + segment.uncompressed_size for segment in waiting_on_segments + ) + uncompressed_size_of_data_compressed_so_far = 0 + while waiting_on_segments: + # Show progress + progress = ( + uncompressed_size_of_data_compressed_so_far + / total_uncompressed_size_of_data_to_compress + ) + print(f"Compressing... {progress * 100:.1f}%", end="\r") + + # The segments for which the compression is not finished yet are + # added to this list + still_waiting_on_segments = [] + got_some_results = False + for segment in waiting_on_segments: + assert segment.data is None + assert segment.data_async is not None + + try: + compressed_data = segment.data_async.get(0) + except multiprocessing.TimeoutError: + # Compression not finished yet + still_waiting_on_segments.append(segment) + else: + # Compression finished! + assert isinstance(compressed_data, bytes) + segment.data = memoryview(compressed_data) + uncompressed_size_of_data_compressed_so_far += ( + segment.uncompressed_size + ) + got_some_results = True + segment.data_async = None + + if not got_some_results and still_waiting_on_segments: + # Nothing happened this wait iteration, idle a bit + time.sleep(0.010) + + waiting_on_segments = still_waiting_on_segments + + print("Putting together the compressed rom...") + + # Put together the compressed rom + compressed_rom_size = sum( + align(len(segment.data)) for segment in compressed_rom_segments + ) + pad_to_multiple_of = 8 * 2**20 # 8 MiB + compressed_rom_size_padded = ( + (compressed_rom_size + pad_to_multiple_of - 1) + // pad_to_multiple_of + * pad_to_multiple_of + ) + compressed_rom_data = memoryview(bytearray(compressed_rom_size_padded)) + compressed_rom_dma_entries: list[dmadata.DmaEntry] = [] + rom_offset = 0 + for segment in compressed_rom_segments: + assert segment.data is not None + + segment_rom_start = rom_offset + segment_rom_end = align(segment_rom_start + len(segment.data)) + + i = segment_rom_start + len(segment.data) + assert i <= len(compressed_rom_data) + compressed_rom_data[segment_rom_start:i] = segment.data + + rom_offset = segment_rom_end + + if segment.is_syms: + segment_rom_start = 0xFFFFFFFF + segment_rom_end = 0xFFFFFFFF + elif not segment.is_compressed: + segment_rom_end = 0 + + compressed_rom_dma_entries.append( + dmadata.DmaEntry( + segment.vrom_start, + segment.vrom_end, + segment_rom_start, + segment_rom_end, + ) + ) + + assert rom_offset == compressed_rom_size + # Pad the compressed rom with the pattern matching the baseroms + for i in range(compressed_rom_size, compressed_rom_size_padded): + compressed_rom_data[i] = i % 256 + + # Write the new dmadata + offset = dmadata_start + for dma_entry in compressed_rom_dma_entries: + dma_entry.to_bin(compressed_rom_data[offset:]) + offset += dmadata.DmaEntry.SIZE_BYTES + + return compressed_rom_data + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument( + "--in", + dest="in_rom", + required=True, + help="path to an uncompressed rom to be compressed", + ) + parser.add_argument( + "--out", + dest="out_rom", + required=True, + help="path of the compressed rom to write out", + ) + parser.add_argument( + "--dma-start", + dest="dma_start", + type=lambda s: int(s, 16), + required=True, + help=( + "The dmadata location in the rom, as a hexadecimal offset (e.g. 0x12f70)." + ), + ) + parser.add_argument( + "--compress", + dest="compress_ranges", + required=True, + help=( + "The indices in the dmadata of the entries to be compressed," + " where 0 is the first entry." + " It is a comma-separated list of individual indices and inclusive ranges." + " e.g. '0-1,3,5,6-9' is all indices from 0 to 9 (included) except 2 and 4." + ), + ) + parser.add_argument( + "--threads", + dest="n_threads", + type=int, + default=1, + help="how many cores to use for parallel compression", + ) + args = parser.parse_args() + + in_rom_p = Path(args.in_rom) + if not in_rom_p.exists(): + parser.error(f"Input rom file {in_rom_p} doesn't exist.") + + out_rom_p = Path(args.out_rom) + + dmadata_start = args.dma_start + + compress_ranges_str: str = args.compress_ranges + compress_entries_indices = set() + for compress_range_str in compress_ranges_str.split(","): + compress_range_ends_str = compress_range_str.split("-") + assert len(compress_range_ends_str) <= 2, ( + compress_range_ends_str, + compress_range_str, + compress_ranges_str, + ) + compress_range_ends = [int(v_str) for v_str in compress_range_ends_str] + if len(compress_range_ends) == 1: + compress_entries_indices.add(compress_range_ends[0]) + else: + assert len(compress_range_ends) == 2 + compress_range_first, compress_range_last = compress_range_ends + compress_entries_indices.update( + range(compress_range_first, compress_range_last + 1) + ) + + n_threads = args.n_threads + + in_rom_data = in_rom_p.read_bytes() + out_rom_data = compress_rom( + memoryview(in_rom_data), + dmadata_start, + compress_entries_indices, + n_threads, + ) + out_rom_p.write_bytes(out_rom_data) + + +if __name__ == "__main__": + main() diff --git a/tools/buildtools/decompress_baserom.py b/tools/buildtools/decompress_baserom.py new file mode 100755 index 0000000000..87c0321316 --- /dev/null +++ b/tools/buildtools/decompress_baserom.py @@ -0,0 +1,242 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: © 2024 ZeldaRET +# SPDX-License-Identifier: CC0-1.0 + +from __future__ import annotations + +import argparse +import hashlib +import io +from pathlib import Path +import struct +import sys + +import crunch64 +import ipl3checksum +import zlib + +import dmadata + + +def decompress_zlib(data: bytes) -> bytes: + decomp = zlib.decompressobj(-zlib.MAX_WBITS) + output = bytearray() + output.extend(decomp.decompress(data)) + while decomp.unconsumed_tail: + output.extend(decomp.decompress(decomp.unconsumed_tail)) + output.extend(decomp.flush()) + return bytes(output) + + +def decompress(data: bytes, is_zlib_compressed: bool) -> bytes: + if is_zlib_compressed: + return decompress_zlib(data) + return crunch64.yaz0.decompress(data) + + +def round_up(n, shift): + mod = 1 << shift + return (n + mod - 1) >> shift << shift + + +def update_crc(decompressed: io.BytesIO) -> io.BytesIO: + print("Recalculating crc...") + calculated_checksum = ipl3checksum.CICKind.CIC_X105.calculateChecksum( + bytes(decompressed.getbuffer()) + ) + new_crc = struct.pack(f">II", calculated_checksum[0], calculated_checksum[1]) + + decompressed.seek(0x10) + decompressed.write(new_crc) + return decompressed + + +def decompress_rom( + file_content: bytearray, + dmadata_start: int, + dma_entries: list[dmadata.DmaEntry], + is_zlib_compressed: bool, +) -> bytearray: + rom_segments = {} # vrom start : data s.t. len(data) == vrom_end - vrom_start + new_dmadata = [] # new dmadata: list[dmadata.Entry] + + decompressed = io.BytesIO(b"") + + for dma_entry in dma_entries: + v_start = dma_entry.vrom_start + v_end = dma_entry.vrom_end + p_start = dma_entry.rom_start + p_end = dma_entry.rom_end + if dma_entry.is_syms(): + new_dmadata.append(dma_entry) + continue + if dma_entry.is_compressed(): + new_contents = decompress(file_content[p_start:p_end], is_zlib_compressed) + rom_segments[v_start] = new_contents + else: + rom_segments[v_start] = file_content[p_start : p_start + v_end - v_start] + new_dmadata.append(dmadata.DmaEntry(v_start, v_end, v_start, 0)) + + # write rom segments to vaddrs + for vrom_st, data in rom_segments.items(): + decompressed.seek(vrom_st) + decompressed.write(data) + # write new dmadata + decompressed.seek(dmadata_start) + for dma_entry in new_dmadata: + entry_data = bytearray(dmadata.DmaEntry.SIZE_BYTES) + dma_entry.to_bin(entry_data) + decompressed.write(entry_data) + # pad to size + padding_end = round_up(dma_entries[-1].vrom_end, 17) + decompressed.seek(padding_end - 1) + decompressed.write(bytearray([0])) + # re-calculate crc + return bytearray(update_crc(decompressed).getbuffer()) + + +def get_str_hash(byte_array): + return str(hashlib.md5(byte_array).hexdigest()) + + +def check_existing_rom(rom_path: Path, correct_str_hash: str): + # If the baserom exists and is correct, we don't need to change anything + if rom_path.exists(): + if get_str_hash(rom_path.read_bytes()) == correct_str_hash: + return True + return False + + +def word_swap(file_content: bytearray) -> bytearray: + words = str(int(len(file_content) / 4)) + little_byte_format = "<" + words + "I" + big_byte_format = ">" + words + "I" + tmp = struct.unpack_from(little_byte_format, file_content, 0) + struct.pack_into(big_byte_format, file_content, 0, *tmp) + return file_content + + +def byte_swap(file_content: bytearray) -> bytearray: + halfwords = str(int(len(file_content) / 2)) + little_byte_format = "<" + halfwords + "H" + big_byte_format = ">" + halfwords + "H" + tmp = struct.unpack_from(little_byte_format, file_content, 0) + struct.pack_into(big_byte_format, file_content, 0, *tmp) + return file_content + + +def per_version_fixes(file_content: bytearray, version: str) -> bytearray: + return file_content + + +def pad_rom(file_content: bytearray, dma_entries: list[dmadata.DmaEntry]) -> bytearray: + padding_start = round_up(dma_entries[-1].vrom_end, 12) + padding_end = round_up(dma_entries[-1].vrom_end, 17) + print(f"Padding from {padding_start:X} to {padding_end:X}...") + for i in range(padding_start, padding_end): + file_content[i] = 0xFF + return file_content + + +# Determine if we have a ROM file +ROM_FILE_EXTENSIONS = ["z64", "n64", "v64"] + + +def find_baserom(version: str) -> Path | None: + for rom_file_ext_lower in ROM_FILE_EXTENSIONS: + for rom_file_ext in (rom_file_ext_lower, rom_file_ext_lower.upper()): + rom_file_name_candidate = Path(f"baseroms/{version}/baserom.{rom_file_ext}") + if rom_file_name_candidate.exists(): + return rom_file_name_candidate + return None + + +def main(): + parser = argparse.ArgumentParser( + description="Convert a rom that uses dmadata to an uncompressed one." + ) + parser.add_argument( + "version", + help="Version of the game to decompress.", + ) + + args = parser.parse_args() + + version = args.version + + baserom_dir = Path(f"baseroms/{version}") + if not baserom_dir.exists(): + print(f"Error: Unknown version '{version}'.", file=sys.stderr) + exit(1) + + uncompressed_path = baserom_dir / "baserom-decompressed.z64" + + dmadata_start = int((baserom_dir / "dmadata_start.txt").read_text(), 16) + correct_str_hash = (baserom_dir / "checksum.md5").read_text().split()[0] + + if check_existing_rom(uncompressed_path, correct_str_hash): + print("Found valid baserom - exiting early") + return + + rom_file_name = find_baserom(version) + + if rom_file_name is None: + path_list = [ + f"baseroms/{version}/baserom.{rom_file_ext}" + for rom_file_ext in ROM_FILE_EXTENSIONS + ] + print(f"Error: Could not find {','.join(path_list)}.", file=sys.stderr) + exit(1) + + # Read in the original ROM + print(f"File '{rom_file_name}' found.") + + file_content = bytearray(rom_file_name.read_bytes()) + + # Check if ROM needs to be byte/word swapped + # Little-endian + if file_content[0] == 0x40: + # Word Swap ROM + print("ROM needs to be word swapped...") + file_content = word_swap(file_content) + print("Word swapping done.") + + # Byte-swapped + elif file_content[0] == 0x37: + # Byte Swap ROM + print("ROM needs to be byte swapped...") + file_content = byte_swap(file_content) + print("Byte swapping done.") + + file_content = per_version_fixes(file_content, version) + + dma_entries = dmadata.read_dmadata(file_content, dmadata_start) + # Decompress + if any(dma_entry.is_compressed() for dma_entry in dma_entries): + print("Decompressing rom...") + is_zlib_compressed = version in {"ique-cn", "ique-zh"} + file_content = decompress_rom( + file_content, dmadata_start, dma_entries, is_zlib_compressed + ) + + file_content = pad_rom(file_content, dma_entries) + + # Check to see if the ROM is a "vanilla" ROM + str_hash = get_str_hash(file_content) + if str_hash != correct_str_hash: + print( + f"Error: Expected a hash of {correct_str_hash} but got {str_hash}. The baserom has probably been tampered, find a new one", + file=sys.stderr, + ) + exit(1) + + # Write out our new ROM + print(f"Writing new ROM {uncompressed_path}...") + uncompressed_path.write_bytes(file_content) + + print("Done!") + + +if __name__ == "__main__": + main() diff --git a/tools/buildtools/dmadata.py b/tools/buildtools/dmadata.py new file mode 100644 index 0000000000..06b9ae7557 --- /dev/null +++ b/tools/buildtools/dmadata.py @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: © 2024 ZeldaRET +# SPDX-License-Identifier: CC0-1.0 + +from __future__ import annotations + +import dataclasses +import struct + + +STRUCT_IIII = struct.Struct(">IIII") + + +@dataclasses.dataclass +class DmaEntry: + """ + A Python counterpart to the dmadata entry struct: + ```c + typedef struct { + /* 0x00 */ uintptr_t vromStart; + /* 0x04 */ uintptr_t vromEnd; + /* 0x08 */ uintptr_t romStart; + /* 0x0C */ uintptr_t romEnd; + } DmaEntry; + ``` + """ + + vrom_start: int + vrom_end: int + rom_start: int + rom_end: int + + def __repr__(self): + return ( + "DmaEntry(" + f"vrom_start=0x{self.vrom_start:08X}, " + f"vrom_end=0x{self.vrom_end:08X}, " + f"rom_start=0x{self.rom_start:08X}, " + f"rom_end=0x{self.rom_end:08X}" + ")" + ) + + SIZE_BYTES = STRUCT_IIII.size + + def to_bin(self, data: memoryview): + STRUCT_IIII.pack_into( + data, + 0, + self.vrom_start, + self.vrom_end, + self.rom_start, + self.rom_end, + ) + + @staticmethod + def from_bin(data: memoryview): + return DmaEntry(*STRUCT_IIII.unpack_from(data)) + + def is_compressed(self) -> bool: + return self.rom_end != 0 + + def is_syms(self) -> bool: + """ + "SYMS" DMA entries describe segments that are always filled with 0's in the ROM. + The DMA entry has both rom_start and rom_end set to 0xFFFFFFFF, where the actual rom start and end is given by vrom_start and vrom_end instead. + These zeroed segments are used to record the offsets/sizes of subfiles in compressed yaz0 archive files but are not used by the game directly. + """ + return self.rom_start == 0xFFFFFFFF and self.rom_end == 0xFFFFFFFF + + +DMA_ENTRY_END = DmaEntry(0, 0, 0, 0) + + +def read_dmadata(rom_data: memoryview, start_offset: int) -> list[DmaEntry]: + result = [] + + offset = start_offset + while ( + entry := DmaEntry.from_bin(rom_data[offset : offset + DmaEntry.SIZE_BYTES]) + ) != DMA_ENTRY_END: + result.append(entry) + offset += DmaEntry.SIZE_BYTES + + return result diff --git a/tools/buildtools/dmadata_start.sh b/tools/buildtools/dmadata_start.sh new file mode 100755 index 0000000000..920d9fe0b2 --- /dev/null +++ b/tools/buildtools/dmadata_start.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +NM=$1 +ELF=$2 + +# dmadata_syms contents look like: +# ffffffff80015850 T _dmadataSegmentTextStart +# 00000000 A _dmadataSegmentTextSize +# 00011a40 A _dmadataSegmentRomStart +# ffffffff8001b920 T _dmadataSegmentRoDataEnd +dmadata_syms=`$NM $ELF --no-sort --radix=x --format=bsd | grep dmadata` + +_dmadataSegmentRomStart=`echo "$dmadata_syms" | grep '\b_dmadataSegmentRomStart\b' | cut -d' ' -f1` + +echo 0x"$_dmadataSegmentRomStart" diff --git a/tools/buildtools/extract_baserom.py b/tools/buildtools/extract_baserom.py new file mode 100755 index 0000000000..1d62f8c06e --- /dev/null +++ b/tools/buildtools/extract_baserom.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: © 2024 ZeldaRET +# SPDX-License-Identifier: CC0-1.0 + +from __future__ import annotations + +import argparse +from pathlib import Path +import sys + +import dmadata + + +def main(): + parser = argparse.ArgumentParser( + description="Extract segments from an uncompressed ROM, based on its dmadata." + ) + parser.add_argument( + "rom", metavar="ROM", type=Path, help="Path to uncompressed ROM" + ) + parser.add_argument( + "-o", + "--output-dir", + type=Path, + required=True, + help="Output directory for segments", + ) + parser.add_argument( + "--dmadata-start", + type=lambda s: int(s, 16), + required=True, + help=( + "The dmadata location in the rom, as a hexadecimal offset (e.g. 0x12f70)" + ), + ) + parser.add_argument( + "--dmadata-names", + type=Path, + required=True, + help="Path to file containing segment names", + ) + + args = parser.parse_args() + + rom_data = memoryview(args.rom.read_bytes()) + + dma_names = args.dmadata_names.read_text().splitlines() + dma_entries = dmadata.read_dmadata(rom_data, args.dmadata_start) + if len(dma_names) != len(dma_entries): + print( + f"Error: expected {len(dma_names)} DMA entries but found {len(dma_entries)} in ROM", + file=sys.stderr, + ) + exit(1) + + args.output_dir.mkdir(parents=True, exist_ok=True) + for dma_name, dma_entry in zip(dma_names, dma_entries): + if dma_entry.is_syms(): + segment_rom_start = dma_entry.vrom_start + elif not dma_entry.is_compressed(): + segment_rom_start = dma_entry.rom_start + else: # Segment compressed + print(f"Error: segment {dma_name} is compressed", file=sys.stderr) + exit(1) + + segment_rom_end = segment_rom_start + ( + dma_entry.vrom_end - dma_entry.vrom_start + ) + + segment_data = rom_data[segment_rom_start:segment_rom_end] + segment_path = args.output_dir / dma_name + segment_path.write_bytes(segment_data) + + print(f"Extracted {len(dma_entries)} segments to {args.output_dir}") + + +if __name__ == "__main__": + main() diff --git a/tools/decompress_yars.py b/tools/buildtools/extract_yars.py similarity index 79% rename from tools/decompress_yars.py rename to tools/buildtools/extract_yars.py index 9db990e6f8..a06447ab3b 100755 --- a/tools/decompress_yars.py +++ b/tools/buildtools/extract_yars.py @@ -7,7 +7,7 @@ # # This program decompresses every raw yar binary file listed in # `tools/filelists/{version}/archives.csv` to a corresponding -# `baserom/{file}.unarchive` raw file. +# `extracted/{version}/baserom/{file}.unarchive` raw file. # # It works by decompressing every Yaz0 block and appending them one by one into # a new raw binary file so it can be processed normally by other tools. @@ -24,6 +24,7 @@ import struct PRINT_XML = False + @dataclasses.dataclass class ArchiveMeta: start: int @@ -45,7 +46,9 @@ def getOffsetsList(archiveBytes: bytearray) -> list[ArchiveMeta]: firstEntryOffset = readBytesAsWord(archiveBytes, 0) firstEntrySize = readBytesAsWord(archiveBytes, 4) - archivesOffsets.append(ArchiveMeta(firstEntryOffset, firstEntryOffset + firstEntrySize)) + archivesOffsets.append( + ArchiveMeta(firstEntryOffset, firstEntryOffset + firstEntrySize) + ) offset = 4 while offset < firstEntryOffset - 4: @@ -71,29 +74,33 @@ def extractArchive(archivePath: Path, outPath: Path): archivesOffsets = getOffsetsList(archiveBytes) if PRINT_XML: - print('') + print("") print(f' ') with outPath.open("wb") as out: currentOffset = 0 for meta in archivesOffsets: - decompressedBytes = crunch64.yaz0.decompress(archiveBytes[meta.start:meta.end]) + decompressedBytes = crunch64.yaz0.decompress( + archiveBytes[meta.start : meta.end] + ) decompressedSize = len(decompressedBytes) out.write(decompressedBytes) if PRINT_XML: - print(f' ') + print( + f' ' + ) currentOffset += decompressedSize if PRINT_XML: - print(f' ') - print('') + print(f" ") + print("") def main(): parser = argparse.ArgumentParser(description="MM archives extractor") - parser.add_argument("-v", "--version", help="version to process", default="mm.us.rev1") + parser.add_argument("version", help="version to process", default="n64-us") parser.add_argument("--xml", help="Generate xml to stdout", action="store_true") args = parser.parse_args() @@ -106,10 +113,11 @@ def main(): with archivesCsvPath.open() as f: for line in f: archiveName = line.strip().split(",")[1] - archivePath = Path(f"baserom/{archiveName}") + archivePath = Path(f"extracted/{args.version}/baserom/{archiveName}") extractedPath = Path(str(archivePath) + ".unarchive") extractArchive(archivePath, extractedPath) + if __name__ == "__main__": main() diff --git a/tools/buildtools/mkdmadata.c b/tools/buildtools/mkdmadata.c index 1dfd07e7f6..cd769971bb 100644 --- a/tools/buildtools/mkdmadata.c +++ b/tools/buildtools/mkdmadata.c @@ -23,30 +23,70 @@ static void write_dmadata_table(FILE *fout) } if (g_segments[i].flags & FLAG_SYMS) { - // For segments set with SYMS, unset in the dma table - fprintf(fout, "DEFINE_DMA_ENTRY_UNSET(%s, \"%s\")\n", g_segments[i].name, g_segments[i].name); + fprintf(fout, "DEFINE_DMA_ENTRY_SYMS(%s, \"%s\")\n", g_segments[i].name, g_segments[i].name); } else { fprintf(fout, "DEFINE_DMA_ENTRY(%s, \"%s\")\n", g_segments[i].name, g_segments[i].name); } } } +static void write_compress_ranges(FILE *fout) +{ + int i; + int rom_index = 0; + bool continue_list = false; + int stride_first = -1; + + for (i = 0; i < g_segmentsCount; i++) { + bool compress = g_segments[i].compress; + + // Don't consider segments set with NOLOAD when calculating indices + if (g_segments[i].flags & FLAG_NOLOAD) { + continue; + } + + if (compress) { + if (stride_first == -1) + stride_first = rom_index; + } + if (!compress || i == g_segmentsCount - 1) { + if (stride_first != -1) { + int stride_last = compress ? rom_index : rom_index - 1; + if (continue_list) { + fprintf(fout, ","); + } + if (stride_first == stride_last) { + fprintf(fout, "%d", stride_first); + } else { + fprintf(fout, "%d-%d", stride_first, stride_last); + } + continue_list = true; + stride_first = -1; + } + } + + rom_index++; + } +} + static void usage(const char *execname) { fprintf(stderr, "zelda64 dmadata generation tool v0.01\n" - "usage: %s SPEC_FILE DMADATA_TABLE\n" - "SPEC_FILE file describing the organization of object files into segments\n" - "DMADATA_TABLE filename of output dmadata table header\n", + "usage: %s SPEC_FILE DMADATA_TABLE COMPRESS_RANGES\n" + "SPEC_FILE file describing the organization of object files into segments\n" + "DMADATA_TABLE filename of output dmadata table header\n" + "COMPRESS_RANGES filename to write which files are compressed (e.g. 0-5,7,10-20)\n", execname); } int main(int argc, char **argv) { FILE *dmaout; + FILE *compress_ranges_out; void *spec; size_t size; - if (argc != 3) + if (argc != 4) { usage(argv[0]); return 1; @@ -60,6 +100,13 @@ int main(int argc, char **argv) util_fatal_error("failed to open file '%s' for writing", argv[2]); write_dmadata_table(dmaout); fclose(dmaout); + + compress_ranges_out = fopen(argv[3], "w"); + if (compress_ranges_out == NULL) + util_fatal_error("failed to open file '%s' for writing", argv[3]); + write_compress_ranges(compress_ranges_out); + fclose(compress_ranges_out); + free_rom_spec(g_segments, g_segmentsCount); free(spec); diff --git a/tools/shiftjis_conv.py b/tools/buildtools/shiftjis_conv.py similarity index 100% rename from tools/shiftjis_conv.py rename to tools/buildtools/shiftjis_conv.py diff --git a/tools/buildtools/spec.c b/tools/buildtools/spec.c index 65c04d5cdd..26c3c134da 100644 --- a/tools/buildtools/spec.c +++ b/tools/buildtools/spec.c @@ -152,7 +152,6 @@ bool parse_segment_statement(struct Segment* currSeg, STMTId stmt, char* args, i util_fatal_error("line %i: duplicate '%s' statement", lineNum, stmtNames[stmt]); currSeg->fields |= 1 << stmt; - currSeg->compress = false; // statements valid within a segment definition switch (stmt) { diff --git a/tools/calc_bss.sh b/tools/calc_bss.sh index 23fcfe486f..9e292f2d53 100755 --- a/tools/calc_bss.sh +++ b/tools/calc_bss.sh @@ -34,7 +34,7 @@ echo "char measurement;" >> $TEMPC $(pwd)/tools/ido_recomp/linux/7.1/cc -G 0 -non_shared \ -Xfullwarn -Xcpluscomm -O2 -g3 -Xcpluscomm -mips2 \ - -I $(pwd)/ -I $(pwd)/include/ -I $(pwd)/src/ -I $(pwd)/assets/ -I $(pwd)/build/ \ + -I $(pwd)/ -I $(pwd)/include/ -I $(pwd)/src/ -I $(pwd)/assets/ -I $(pwd)/build/n64-us/ \ -Wab,-r4300_mul -woff 624,649,838,712 -c $TEMPC -o $TEMPO LINE=$(${CROSS}objdump -t $TEMPO | grep measurement | cut -d' ' -f1) diff --git a/tools/disasm/disasm.py b/tools/disasm/disasm.py index be599728bc..4a91303bba 100755 --- a/tools/disasm/disasm.py +++ b/tools/disasm/disasm.py @@ -73,8 +73,8 @@ def discard_decomped_files(files_spec, include_files): i += 1 # For every file within this segment, look through the seg for lines with this file's name - # if found, check whether it's still in build/asm/ or build/data/, in which case it's not decomped - # if all references to it are in build/src/ then it should be ok to skip, some code/boot files are a bit different + # if found, check whether it's still in $(BUILD_DIR)/asm/ or $(BUILD_DIR)/data/, in which case it's not decomped + # if all references to it are in $(BUILD_DIR)/src/ then it should be ok to skip, some code/boot files are a bit different seg_start = i new_files = {} @@ -99,20 +99,20 @@ def discard_decomped_files(files_spec, include_files): if f"/{file}." in spec[i]: if spec[i].count(".") == 1: last_line = spec[i] - if "build/asm/" in spec[i] or "build/data/" in spec[i]: + if "$(BUILD_DIR)/asm/" in spec[i] or "$(BUILD_DIR)/data/" in spec[i]: include = True break i += 1 else: # Many code/boot files only have a single section (i.e .text) - # In that case it will be inside build/src/ and pragma in the asm + # In that case it will be inside $(BUILD_DIR)/src/ and pragma in the asm # For these files, open the source and look for the pragmas to be sure # Overlays always have at least a data section we can check in the spec, so it's not needed for them if type != "overlay" and last_line != "": assert last_line.count(".") == 1 last_line = ( last_line.strip() - .split("build/", 1)[1] + .split("$(BUILD_DIR)/", 1)[1] .replace(".o", ".c")[:-1] ) with open(root_path / last_line, "r") as f2: @@ -1802,7 +1802,7 @@ def disassemble_makerom(section): elif section[-1]["type"] == "ipl3": # TODO disassemble this eventually, low priority - out = f"{asm_header('.text')}\n.incbin \"baserom/makerom\", 0x40, 0xFC0\n" + out = f"{asm_header('.text')}\n.incbin \"extracted/n64-us/baserom/makerom\", 0x40, 0xFC0\n" with open(ASM_OUT + "/makerom/ipl3.s", "w") as outfile: outfile.write(out) diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt index c32ffbc870..7868c70f8f 100644 --- a/tools/disasm/files.txt +++ b/tools/disasm/files.txt @@ -8,7 +8,7 @@ # [ - ['makerom', 'baserom/', 'makerom', + ['makerom', 'extracted/n64-us/baserom/', 'makerom', [ # fake ram addresses [0x8007F000, 0x8007F040, 'rom_header', None], @@ -21,7 +21,7 @@ 0x80080000 : "entry", }, ], - ['dmadata', 'baserom/', 'dmadata', + ['dmadata', 'extracted/n64-us/baserom/', 'dmadata', [ [0x8009F8B0, 0x800A5AB0, 'dmadata', None], [0x800A5AB0, 0x800A5AC0, 'bss', None], @@ -30,7 +30,7 @@ 0x8009F8B0 : "dmadata", }, ], - ['boot', 'baserom/', 'boot', + ['boot', 'extracted/n64-us/baserom/', 'boot', [ [0x80080060, 0x800969C0, 'text', None], [0x800969C0, 0x80098190, 'data', None], @@ -342,7 +342,7 @@ 0x8009E690 : "vimgr", }, ], - ['code', 'baserom/', 'code', + ['code', 'extracted/n64-us/baserom/', 'code', [ [0x800A5AC0, 0x801AAAB0, 'text', ((0x80186028, 0x80186A70, 'data', None, None, None),)], [0x801AAAB0, 0x801DBDF0, 'data', None], @@ -754,621 +754,621 @@ 0x80780000 : "framebuffer_hi", }, ], - ['ovl_title', 'baserom/', 'overlay', [], { 0x80800000 : "ovl_title" }], - ['ovl_select', 'baserom/', 'overlay', [], { 0x80800910 : "ovl_select" }], - ['ovl_opening', 'baserom/', 'overlay', [], { 0x80803DF0 : "ovl_opening" }], - ['ovl_file_choose', 'baserom/', 'overlay', [], { 0x80804010 : "ovl_file_choose" }], - ['ovl_daytelop', 'baserom/', 'overlay', [], { 0x80814EB0 : "ovl_daytelop" }], - ['ovl_kaleido_scope', 'baserom/', 'overlay', [], { 0x808160A0 : "ovl_kaleido_scope" }], - ['ovl_player_actor', 'baserom/', 'overlay', [], { 0x8082DA90 : "ovl_player_actor" }], - ['ovl_En_Test', 'baserom/', 'overlay', [], { 0x80862B70 : "ovl_En_Test" }], - ['ovl_En_GirlA', 'baserom/', 'overlay', [], { 0x80863870 : "ovl_En_GirlA" }], - ['ovl_En_Part', 'baserom/', 'overlay', [], { 0x80865370 : "ovl_En_Part" }], - ['ovl_En_Light', 'baserom/', 'overlay', [], { 0x80865990 : "ovl_En_Light" }], - ['ovl_En_Door', 'baserom/', 'overlay', [], { 0x80866800 : "ovl_En_Door" }], - ['ovl_En_Box', 'baserom/', 'overlay', [], { 0x80867BD0 : "ovl_En_Box" }], - ['ovl_En_Pametfrog', 'baserom/', 'overlay', [], { 0x80869D90 : "ovl_En_Pametfrog" }], - ['ovl_En_Okuta', 'baserom/', 'overlay', [], { 0x8086DE20 : "ovl_En_Okuta" }], - ['ovl_En_Bom', 'baserom/', 'overlay', [], { 0x80870DB0 : "ovl_En_Bom" }], - ['ovl_En_Wallmas', 'baserom/', 'overlay', [], { 0x80874810 : "ovl_En_Wallmas" }], - ['ovl_En_Dodongo', 'baserom/', 'overlay', [], { 0x80876670 : "ovl_En_Dodongo" }], - ['ovl_En_Firefly', 'baserom/', 'overlay', [], { 0x808796F0 : "ovl_En_Firefly" }], - ['ovl_En_Horse', 'baserom/', 'overlay', [], { 0x8087B730 : "ovl_En_Horse" }], - ['ovl_En_Arrow', 'baserom/', 'overlay', [], { 0x8088A240 : "ovl_En_Arrow" }], - ['ovl_En_Elf', 'baserom/', 'overlay', [], { 0x8088C510 : "ovl_En_Elf" }], - ['ovl_En_Niw', 'baserom/', 'overlay', [], { 0x80891060 : "ovl_En_Niw" }], - ['ovl_En_Tite', 'baserom/', 'overlay', [], { 0x808937F0 : "ovl_En_Tite" }], - ['ovl_En_Peehat', 'baserom/', 'overlay', [], { 0x80896F30 : "ovl_En_Peehat" }], - ['ovl_En_Holl', 'baserom/', 'overlay', [], { 0x80899960 : "ovl_En_Holl" }], - ['ovl_En_Dinofos', 'baserom/', 'overlay', [], { 0x8089A6E0 : "ovl_En_Dinofos" }], - ['ovl_En_Hata', 'baserom/', 'overlay', [], { 0x8089E8E0 : "ovl_En_Hata" }], - ['ovl_En_Zl1', 'baserom/', 'overlay', [], { 0x8089ED90 : "ovl_En_Zl1" }], - ['ovl_En_Viewer', 'baserom/', 'overlay', [], { 0x8089EE20 : "ovl_En_Viewer" }], - ['ovl_En_Bubble', 'baserom/', 'overlay', [], { 0x8089F4E0 : "ovl_En_Bubble" }], - ['ovl_Door_Shutter', 'baserom/', 'overlay', [], { 0x808A08F0 : "ovl_Door_Shutter" }], - ['ovl_En_Boom', 'baserom/', 'overlay', [], { 0x808A24D0 : "ovl_En_Boom" }], - ['ovl_En_Torch2', 'baserom/', 'overlay', [], { 0x808A31B0 : "ovl_En_Torch2" }], - ['ovl_En_Minifrog', 'baserom/', 'overlay', [], { 0x808A3670 : "ovl_En_Minifrog" }], - ['ovl_En_St', 'baserom/', 'overlay', [], { 0x808A5050 : "ovl_En_St" }], - ['ovl_Obj_Wturn', 'baserom/', 'overlay', [], { 0x808A7930 : "ovl_Obj_Wturn" }], - ['ovl_En_River_Sound', 'baserom/', 'overlay', [], { 0x808A7E30 : "ovl_En_River_Sound" }], - ['ovl_En_Ossan', 'baserom/', 'overlay', [], { 0x808A80A0 : "ovl_En_Ossan" }], - ['ovl_En_Famos', 'baserom/', 'overlay', [], { 0x808AC920 : "ovl_En_Famos" }], - ['ovl_En_Bombf', 'baserom/', 'overlay', [], { 0x808AE8C0 : "ovl_En_Bombf" }], - ['ovl_En_Am', 'baserom/', 'overlay', [], { 0x808AFCD0 : "ovl_En_Am" }], - ['ovl_En_Dekubaba', 'baserom/', 'overlay', [], { 0x808B1330 : "ovl_En_Dekubaba" }], - ['ovl_En_M_Fire1', 'baserom/', 'overlay', [], { 0x808B5230 : "ovl_En_M_Fire1" }], - ['ovl_En_M_Thunder', 'baserom/', 'overlay', [], { 0x808B53C0 : "ovl_En_M_Thunder" }], - ['ovl_Bg_Breakwall', 'baserom/', 'overlay', [], { 0x808B7360 : "ovl_Bg_Breakwall" }], - ['ovl_Door_Warp1', 'baserom/', 'overlay', [], { 0x808B8490 : "ovl_Door_Warp1" }], - ['ovl_Obj_Syokudai', 'baserom/', 'overlay', [], { 0x808BC010 : "ovl_Obj_Syokudai" }], - ['ovl_Item_B_Heart', 'baserom/', 'overlay', [], { 0x808BCDF0 : "ovl_Item_B_Heart" }], - ['ovl_En_Dekunuts', 'baserom/', 'overlay', [], { 0x808BD1E0 : "ovl_En_Dekunuts" }], - ['ovl_En_Bbfall', 'baserom/', 'overlay', [], { 0x808BF220 : "ovl_En_Bbfall" }], - ['ovl_Arms_Hook', 'baserom/', 'overlay', [], { 0x808C1030 : "ovl_Arms_Hook" }], - ['ovl_En_Bb', 'baserom/', 'overlay', [], { 0x808C1D40 : "ovl_En_Bb" }], - ['ovl_Bg_Keikoku_Spr', 'baserom/', 'overlay', [], { 0x808C3A50 : "ovl_Bg_Keikoku_Spr" }], - ['ovl_En_Wood02', 'baserom/', 'overlay', [], { 0x808C3C00 : "ovl_En_Wood02" }], - ['ovl_En_Death', 'baserom/', 'overlay', [], { 0x808C4F80 : "ovl_En_Death" }], - ['ovl_En_Minideath', 'baserom/', 'overlay', [], { 0x808CA0B0 : "ovl_En_Minideath" }], - ['ovl_En_Vm', 'baserom/', 'overlay', [], { 0x808CC260 : "ovl_En_Vm" }], - ['ovl_Demo_Effect', 'baserom/', 'overlay', [], { 0x808CD740 : "ovl_Demo_Effect" }], - ['ovl_Demo_Kankyo', 'baserom/', 'overlay', [], { 0x808CE450 : "ovl_Demo_Kankyo" }], - ['ovl_En_Floormas', 'baserom/', 'overlay', [], { 0x808D0680 : "ovl_En_Floormas" }], - ['ovl_En_Rd', 'baserom/', 'overlay', [], { 0x808D3E20 : "ovl_En_Rd" }], - ['ovl_Bg_F40_Flift', 'baserom/', 'overlay', [], { 0x808D7550 : "ovl_Bg_F40_Flift" }], - ['ovl_Obj_Mure', 'baserom/', 'overlay', [], { 0x808D78D0 : "ovl_Obj_Mure" }], - ['ovl_En_Sw', 'baserom/', 'overlay', [], { 0x808D8940 : "ovl_En_Sw" }], - ['ovl_Object_Kankyo', 'baserom/', 'overlay', [], { 0x808DBE80 : "ovl_Object_Kankyo" }], - ['ovl_En_Horse_Link_Child', 'baserom/', 'overlay', [], { 0x808DE5C0 : "ovl_En_Horse_Link_Child" }], - ['ovl_Door_Ana', 'baserom/', 'overlay', [], { 0x808E01A0 : "ovl_Door_Ana" }], - ['ovl_En_Encount1', 'baserom/', 'overlay', [], { 0x808E0830 : "ovl_En_Encount1" }], - ['ovl_Demo_Tre_Lgt', 'baserom/', 'overlay', [], { 0x808E0E40 : "ovl_Demo_Tre_Lgt" }], - ['ovl_En_Encount2', 'baserom/', 'overlay', [], { 0x808E1560 : "ovl_En_Encount2" }], - ['ovl_En_Fire_Rock', 'baserom/', 'overlay', [], { 0x808E1FE0 : "ovl_En_Fire_Rock" }], - ['ovl_Bg_Ctower_Rot', 'baserom/', 'overlay', [], { 0x808E2070 : "ovl_Bg_Ctower_Rot" }], - ['ovl_Mir_Ray', 'baserom/', 'overlay', [], { 0x808E2600 : "ovl_Mir_Ray" }], - ['ovl_En_Sb', 'baserom/', 'overlay', [], { 0x808E3EF0 : "ovl_En_Sb" }], - ['ovl_En_Bigslime', 'baserom/', 'overlay', [], { 0x808E4FC0 : "ovl_En_Bigslime" }], - ['ovl_En_Karebaba', 'baserom/', 'overlay', [], { 0x808F1200 : "ovl_En_Karebaba" }], - ['ovl_En_In', 'baserom/', 'overlay', [], { 0x808F30B0 : "ovl_En_In" }], - ['ovl_En_Bom_Chu', 'baserom/', 'overlay', [], { 0x808F74B0 : "ovl_En_Bom_Chu" }], - ['ovl_En_Horse_Game_Check', 'baserom/', 'overlay', [], { 0x808F8AA0 : "ovl_En_Horse_Game_Check" }], - ['ovl_En_Rr', 'baserom/', 'overlay', [], { 0x808F9E00 : "ovl_En_Rr" }], - ['ovl_En_Fr', 'baserom/', 'overlay', [], { 0x808FC550 : "ovl_En_Fr" }], - ['ovl_En_Fishing', 'baserom/', 'overlay', [], { 0x808FC6C0 : "ovl_En_Fishing" }], - ['ovl_Obj_Oshihiki', 'baserom/', 'overlay', [], { 0x80917290 : "ovl_Obj_Oshihiki" }], - ['ovl_Eff_Dust', 'baserom/', 'overlay', [], { 0x80918B40 : "ovl_Eff_Dust" }], - ['ovl_Bg_Umajump', 'baserom/', 'overlay', [], { 0x80919F30 : "ovl_Bg_Umajump" }], - ['ovl_En_Insect', 'baserom/', 'overlay', [], { 0x8091A8A0 : "ovl_En_Insect" }], - ['ovl_En_Butte', 'baserom/', 'overlay', [], { 0x8091C0A0 : "ovl_En_Butte" }], - ['ovl_En_Fish', 'baserom/', 'overlay', [], { 0x8091D630 : "ovl_En_Fish" }], - ['ovl_Item_Etcetera', 'baserom/', 'overlay', [], { 0x8091FEF0 : "ovl_Item_Etcetera" }], - ['ovl_Arrow_Fire', 'baserom/', 'overlay', [], { 0x80920340 : "ovl_Arrow_Fire" }], - ['ovl_Arrow_Ice', 'baserom/', 'overlay', [], { 0x80922430 : "ovl_Arrow_Ice" }], - ['ovl_Arrow_Light', 'baserom/', 'overlay', [], { 0x80924300 : "ovl_Arrow_Light" }], - ['ovl_Obj_Kibako', 'baserom/', 'overlay', [], { 0x809261B0 : "ovl_Obj_Kibako" }], - ['ovl_Obj_Tsubo', 'baserom/', 'overlay', [], { 0x809275C0 : "ovl_Obj_Tsubo" }], - ['ovl_En_Ik', 'baserom/', 'overlay', [], { 0x80929910 : "ovl_En_Ik" }], - ['ovl_Demo_Shd', 'baserom/', 'overlay', [], { 0x8092C530 : "ovl_Demo_Shd" }], - ['ovl_En_Dns', 'baserom/', 'overlay', [], { 0x8092C5C0 : "ovl_En_Dns" }], - ['ovl_Elf_Msg', 'baserom/', 'overlay', [], { 0x8092DF90 : "ovl_Elf_Msg" }], - ['ovl_En_Honotrap', 'baserom/', 'overlay', [], { 0x8092E510 : "ovl_En_Honotrap" }], - ['ovl_En_Tubo_Trap', 'baserom/', 'overlay', [], { 0x809307E0 : "ovl_En_Tubo_Trap" }], - ['ovl_Obj_Ice_Poly', 'baserom/', 'overlay', [], { 0x80931560 : "ovl_Obj_Ice_Poly" }], - ['ovl_En_Fz', 'baserom/', 'overlay', [], { 0x80932490 : "ovl_En_Fz" }], - ['ovl_En_Kusa', 'baserom/', 'overlay', [], { 0x809349E0 : "ovl_En_Kusa" }], - ['ovl_Obj_Bean', 'baserom/', 'overlay', [], { 0x80936CF0 : "ovl_Obj_Bean" }], - ['ovl_Obj_Bombiwa', 'baserom/', 'overlay', [], { 0x809393B0 : "ovl_Obj_Bombiwa" }], - ['ovl_Obj_Switch', 'baserom/', 'overlay', [], { 0x8093ABD0 : "ovl_Obj_Switch" }], - ['ovl_Obj_Lift', 'baserom/', 'overlay', [], { 0x8093D3C0 : "ovl_Obj_Lift" }], - ['ovl_Obj_Hsblock', 'baserom/', 'overlay', [], { 0x8093DEA0 : "ovl_Obj_Hsblock" }], - ['ovl_En_Okarina_Tag', 'baserom/', 'overlay', [], { 0x8093E420 : "ovl_En_Okarina_Tag" }], - ['ovl_En_Goroiwa', 'baserom/', 'overlay', [], { 0x8093E8A0 : "ovl_En_Goroiwa" }], - ['ovl_En_Daiku', 'baserom/', 'overlay', [], { 0x809434B0 : "ovl_En_Daiku" }], - ['ovl_En_Nwc', 'baserom/', 'overlay', [], { 0x809441E0 : "ovl_En_Nwc" }], - ['ovl_Item_Inbox', 'baserom/', 'overlay', [], { 0x809454F0 : "ovl_Item_Inbox" }], - ['ovl_En_Ge1', 'baserom/', 'overlay', [], { 0x80945650 : "ovl_En_Ge1" }], - ['ovl_Obj_Blockstop', 'baserom/', 'overlay', [], { 0x809466A0 : "ovl_Obj_Blockstop" }], - ['ovl_En_Sda', 'baserom/', 'overlay', [], { 0x809468D0 : "ovl_En_Sda" }], - ['ovl_En_Clear_Tag', 'baserom/', 'overlay', [], { 0x80947F60 : "ovl_En_Clear_Tag" }], - ['ovl_En_Gm', 'baserom/', 'overlay', [], { 0x8094DEE0 : "ovl_En_Gm" }], - ['ovl_En_Ms', 'baserom/', 'overlay', [], { 0x80952620 : "ovl_En_Ms" }], - ['ovl_En_Hs', 'baserom/', 'overlay', [], { 0x80952C50 : "ovl_En_Hs" }], - ['ovl_Bg_Ingate', 'baserom/', 'overlay', [], { 0x80953A90 : "ovl_Bg_Ingate" }], - ['ovl_En_Kanban', 'baserom/', 'overlay', [], { 0x80954960 : "ovl_En_Kanban" }], - ['ovl_En_Attack_Niw', 'baserom/', 'overlay', [], { 0x809580C0 : "ovl_En_Attack_Niw" }], - ['ovl_En_Mk', 'baserom/', 'overlay', [], { 0x809592E0 : "ovl_En_Mk" }], - ['ovl_En_Owl', 'baserom/', 'overlay', [], { 0x8095A510 : "ovl_En_Owl" }], - ['ovl_En_Ishi', 'baserom/', 'overlay', [], { 0x8095D6E0 : "ovl_En_Ishi" }], - ['ovl_Obj_Hana', 'baserom/', 'overlay', [], { 0x8095FB10 : "ovl_Obj_Hana" }], - ['ovl_Obj_Lightswitch', 'baserom/', 'overlay', [], { 0x8095FBF0 : "ovl_Obj_Lightswitch" }], - ['ovl_Obj_Mure2', 'baserom/', 'overlay', [], { 0x80960CF0 : "ovl_Obj_Mure2" }], - ['ovl_En_Fu', 'baserom/', 'overlay', [], { 0x809616E0 : "ovl_En_Fu" }], - ['ovl_En_Stream', 'baserom/', 'overlay', [], { 0x80965650 : "ovl_En_Stream" }], - ['ovl_En_Mm', 'baserom/', 'overlay', [], { 0x80965BB0 : "ovl_En_Mm" }], - ['ovl_En_Weather_Tag', 'baserom/', 'overlay', [], { 0x80966410 : "ovl_En_Weather_Tag" }], - ['ovl_En_Ani', 'baserom/', 'overlay', [], { 0x809679D0 : "ovl_En_Ani" }], - ['ovl_En_Js', 'baserom/', 'overlay', [], { 0x809687B0 : "ovl_En_Js" }], - ['ovl_En_Okarina_Effect', 'baserom/', 'overlay', [], { 0x8096B0A0 : "ovl_En_Okarina_Effect" }], - ['ovl_En_Mag', 'baserom/', 'overlay', [], { 0x8096B310 : "ovl_En_Mag" }], - ['ovl_Elf_Msg2', 'baserom/', 'overlay', [], { 0x8096EC40 : "ovl_Elf_Msg2" }], - ['ovl_Bg_F40_Swlift', 'baserom/', 'overlay', [], { 0x8096F160 : "ovl_Bg_F40_Swlift" }], - ['ovl_En_Kakasi', 'baserom/', 'overlay', [], { 0x8096F5E0 : "ovl_En_Kakasi" }], - ['ovl_Obj_Makeoshihiki', 'baserom/', 'overlay', [], { 0x80972350 : "ovl_Obj_Makeoshihiki" }], - ['ovl_Oceff_Spot', 'baserom/', 'overlay', [], { 0x80972680 : "ovl_Oceff_Spot" }], - ['ovl_En_Torch', 'baserom/', 'overlay', [], { 0x80973550 : "ovl_En_Torch" }], - ['ovl_Shot_Sun', 'baserom/', 'overlay', [], { 0x80973640 : "ovl_Shot_Sun" }], - ['ovl_Obj_Roomtimer', 'baserom/', 'overlay', [], { 0x80973C50 : "ovl_Obj_Roomtimer" }], - ['ovl_En_Ssh', 'baserom/', 'overlay', [], { 0x80973EF0 : "ovl_En_Ssh" }], - ['ovl_Oceff_Wipe', 'baserom/', 'overlay', [], { 0x809764B0 : "ovl_Oceff_Wipe" }], - ['ovl_Effect_Ss_Dust', 'baserom/', 'overlay', [], { 0x80977210 : "ovl_Effect_Ss_Dust" }], - ['ovl_Effect_Ss_Kirakira', 'baserom/', 'overlay', [], { 0x80977A00 : "ovl_Effect_Ss_Kirakira" }], - ['ovl_Effect_Ss_Bomb2', 'baserom/', 'overlay', [], { 0x80978070 : "ovl_Effect_Ss_Bomb2" }], - ['ovl_Effect_Ss_Blast', 'baserom/', 'overlay', [], { 0x809788D0 : "ovl_Effect_Ss_Blast" }], - ['ovl_Effect_Ss_G_Spk', 'baserom/', 'overlay', [], { 0x80978C30 : "ovl_Effect_Ss_G_Spk" }], - ['ovl_Effect_Ss_D_Fire', 'baserom/', 'overlay', [], { 0x809791B0 : "ovl_Effect_Ss_D_Fire" }], - ['ovl_Effect_Ss_Bubble', 'baserom/', 'overlay', [], { 0x809795C0 : "ovl_Effect_Ss_Bubble" }], - ['ovl_Effect_Ss_G_Ripple', 'baserom/', 'overlay', [], { 0x80979B30 : "ovl_Effect_Ss_G_Ripple" }], - ['ovl_Effect_Ss_G_Splash', 'baserom/', 'overlay', [], { 0x8097A050 : "ovl_Effect_Ss_G_Splash" }], - ['ovl_Effect_Ss_G_Fire', 'baserom/', 'overlay', [], { 0x8097A470 : "ovl_Effect_Ss_G_Fire" }], - ['ovl_Effect_Ss_Lightning', 'baserom/', 'overlay', [], { 0x8097A680 : "ovl_Effect_Ss_Lightning" }], - ['ovl_Effect_Ss_Dt_Bubble', 'baserom/', 'overlay', [], { 0x8097AD60 : "ovl_Effect_Ss_Dt_Bubble" }], - ['ovl_Effect_Ss_Hahen', 'baserom/', 'overlay', [], { 0x8097B270 : "ovl_Effect_Ss_Hahen" }], - ['ovl_Effect_Ss_Stick', 'baserom/', 'overlay', [], { 0x8097B810 : "ovl_Effect_Ss_Stick" }], - ['ovl_Effect_Ss_Sibuki', 'baserom/', 'overlay', [], { 0x8097BAD0 : "ovl_Effect_Ss_Sibuki" }], - ['ovl_Effect_Ss_Stone1', 'baserom/', 'overlay', [], { 0x8097C130 : "ovl_Effect_Ss_Stone1" }], - ['ovl_Effect_Ss_Hitmark', 'baserom/', 'overlay', [], { 0x8097C490 : "ovl_Effect_Ss_Hitmark" }], - ['ovl_Effect_Ss_Fhg_Flash', 'baserom/', 'overlay', [], { 0x8097C990 : "ovl_Effect_Ss_Fhg_Flash" }], - ['ovl_Effect_Ss_K_Fire', 'baserom/', 'overlay', [], { 0x8097D410 : "ovl_Effect_Ss_K_Fire" }], - ['ovl_Effect_Ss_Solder_Srch_Ball', 'baserom/', 'overlay', [], { 0x8097D850 : "ovl_Effect_Ss_Solder_Srch_Ball" }], - ['ovl_Effect_Ss_Kakera', 'baserom/', 'overlay', [], { 0x8097DCA0 : "ovl_Effect_Ss_Kakera" }], - ['ovl_Effect_Ss_Ice_Piece', 'baserom/', 'overlay', [], { 0x8097ECD0 : "ovl_Effect_Ss_Ice_Piece" }], - ['ovl_Effect_Ss_En_Ice', 'baserom/', 'overlay', [], { 0x8097F0D0 : "ovl_Effect_Ss_En_Ice" }], - ['ovl_Effect_Ss_Fire_Tail', 'baserom/', 'overlay', [], { 0x8097F880 : "ovl_Effect_Ss_Fire_Tail" }], - ['ovl_Effect_Ss_En_Fire', 'baserom/', 'overlay', [], { 0x8097FF60 : "ovl_Effect_Ss_En_Fire" }], - ['ovl_Effect_Ss_Extra', 'baserom/', 'overlay', [], { 0x809805D0 : "ovl_Effect_Ss_Extra" }], - ['ovl_Effect_Ss_Dead_Db', 'baserom/', 'overlay', [], { 0x80980940 : "ovl_Effect_Ss_Dead_Db" }], - ['ovl_Effect_Ss_Dead_Dd', 'baserom/', 'overlay', [], { 0x80980D50 : "ovl_Effect_Ss_Dead_Dd" }], - ['ovl_Effect_Ss_Dead_Ds', 'baserom/', 'overlay', [], { 0x809812E0 : "ovl_Effect_Ss_Dead_Ds" }], - ['ovl_Oceff_Storm', 'baserom/', 'overlay', [], { 0x80981760 : "ovl_Oceff_Storm" }], - ['ovl_Obj_Demo', 'baserom/', 'overlay', [], { 0x80983520 : "ovl_Obj_Demo" }], - ['ovl_En_Minislime', 'baserom/', 'overlay', [], { 0x809838F0 : "ovl_En_Minislime" }], - ['ovl_En_Nutsball', 'baserom/', 'overlay', [], { 0x80985C40 : "ovl_En_Nutsball" }], - ['ovl_Oceff_Wipe2', 'baserom/', 'overlay', [], { 0x80986270 : "ovl_Oceff_Wipe2" }], - ['ovl_Oceff_Wipe3', 'baserom/', 'overlay', [], { 0x809879E0 : "ovl_Oceff_Wipe3" }], - ['ovl_En_Dg', 'baserom/', 'overlay', [], { 0x80989140 : "ovl_En_Dg" }], - ['ovl_En_Si', 'baserom/', 'overlay', [], { 0x8098CA20 : "ovl_En_Si" }], - ['ovl_Obj_Comb', 'baserom/', 'overlay', [], { 0x8098CE40 : "ovl_Obj_Comb" }], - ['ovl_Obj_Kibako2', 'baserom/', 'overlay', [], { 0x8098E5C0 : "ovl_Obj_Kibako2" }], - ['ovl_En_Hs2', 'baserom/', 'overlay', [], { 0x8098EF60 : "ovl_En_Hs2" }], - ['ovl_Obj_Mure3', 'baserom/', 'overlay', [], { 0x8098F040 : "ovl_Obj_Mure3" }], - ['ovl_En_Tg', 'baserom/', 'overlay', [], { 0x8098F800 : "ovl_En_Tg" }], - ['ovl_En_Wf', 'baserom/', 'overlay', [], { 0x80990310 : "ovl_En_Wf" }], - ['ovl_En_Skb', 'baserom/', 'overlay', [], { 0x809947B0 : "ovl_En_Skb" }], - ['ovl_En_Gs', 'baserom/', 'overlay', [], { 0x80997A90 : "ovl_En_Gs" }], - ['ovl_Obj_Sound', 'baserom/', 'overlay', [], { 0x8099A920 : "ovl_Obj_Sound" }], - ['ovl_En_Crow', 'baserom/', 'overlay', [], { 0x8099AB30 : "ovl_En_Crow" }], - ['ovl_En_Cow', 'baserom/', 'overlay', [], { 0x8099C290 : "ovl_En_Cow" }], - ['ovl_Oceff_Wipe4', 'baserom/', 'overlay', [], { 0x8099D780 : "ovl_Oceff_Wipe4" }], - ['ovl_En_Zo', 'baserom/', 'overlay', [], { 0x8099E790 : "ovl_En_Zo" }], - ['ovl_Effect_Ss_Ice_Smoke', 'baserom/', 'overlay', [], { 0x8099F730 : "ovl_Effect_Ss_Ice_Smoke" }], - ['ovl_Obj_Makekinsuta', 'baserom/', 'overlay', [], { 0x8099FA40 : "ovl_Obj_Makekinsuta" }], - ['ovl_En_Ge3', 'baserom/', 'overlay', [], { 0x8099FEB0 : "ovl_En_Ge3" }], - ['ovl_Obj_Hamishi', 'baserom/', 'overlay', [], { 0x809A0F20 : "ovl_Obj_Hamishi" }], - ['ovl_En_Zl4', 'baserom/', 'overlay', [], { 0x809A1BB0 : "ovl_En_Zl4" }], - ['ovl_En_Mm2', 'baserom/', 'overlay', [], { 0x809A2030 : "ovl_En_Mm2" }], - ['ovl_Door_Spiral', 'baserom/', 'overlay', [], { 0x809A2B60 : "ovl_Door_Spiral" }], - ['ovl_Obj_Pzlblock', 'baserom/', 'overlay', [], { 0x809A33E0 : "ovl_Obj_Pzlblock" }], - ['ovl_Obj_Toge', 'baserom/', 'overlay', [], { 0x809A41C0 : "ovl_Obj_Toge" }], - ['ovl_Obj_Armos', 'baserom/', 'overlay', [], { 0x809A4E00 : "ovl_Obj_Armos" }], - ['ovl_Obj_Boyo', 'baserom/', 'overlay', [], { 0x809A5D10 : "ovl_Obj_Boyo" }], - ['ovl_En_Grasshopper', 'baserom/', 'overlay', [], { 0x809A6280 : "ovl_En_Grasshopper" }], - ['ovl_Obj_Grass', 'baserom/', 'overlay', [], { 0x809A9110 : "ovl_Obj_Grass" }], - ['ovl_Obj_Grass_Carry', 'baserom/', 'overlay', [], { 0x809AAE60 : "ovl_Obj_Grass_Carry" }], - ['ovl_Obj_Grass_Unit', 'baserom/', 'overlay', [], { 0x809ABDE0 : "ovl_Obj_Grass_Unit" }], - ['ovl_Bg_Fire_Wall', 'baserom/', 'overlay', [], { 0x809AC4B0 : "ovl_Bg_Fire_Wall" }], - ['ovl_En_Bu', 'baserom/', 'overlay', [], { 0x809ACD90 : "ovl_En_Bu" }], - ['ovl_En_Encount3', 'baserom/', 'overlay', [], { 0x809ACF40 : "ovl_En_Encount3" }], - ['ovl_En_Jso', 'baserom/', 'overlay', [], { 0x809AD8E0 : "ovl_En_Jso" }], - ['ovl_Obj_Chikuwa', 'baserom/', 'overlay', [], { 0x809B1550 : "ovl_Obj_Chikuwa" }], - ['ovl_En_Knight', 'baserom/', 'overlay', [], { 0x809B20F0 : "ovl_En_Knight" }], - ['ovl_En_Warp_tag', 'baserom/', 'overlay', [], { 0x809C0760 : "ovl_En_Warp_tag" }], - ['ovl_En_Aob_01', 'baserom/', 'overlay', [], { 0x809C10B0 : "ovl_En_Aob_01" }], - ['ovl_En_Boj_01', 'baserom/', 'overlay', [], { 0x809C3D80 : "ovl_En_Boj_01" }], - ['ovl_En_Boj_02', 'baserom/', 'overlay', [], { 0x809C3E10 : "ovl_En_Boj_02" }], - ['ovl_En_Boj_03', 'baserom/', 'overlay', [], { 0x809C3EA0 : "ovl_En_Boj_03" }], - ['ovl_En_Encount4', 'baserom/', 'overlay', [], { 0x809C3F30 : "ovl_En_Encount4" }], - ['ovl_En_Bom_Bowl_Man', 'baserom/', 'overlay', [], { 0x809C4790 : "ovl_En_Bom_Bowl_Man" }], - ['ovl_En_Syateki_Man', 'baserom/', 'overlay', [], { 0x809C64C0 : "ovl_En_Syateki_Man" }], - ['ovl_Bg_Icicle', 'baserom/', 'overlay', [], { 0x809C9A60 : "ovl_Bg_Icicle" }], - ['ovl_En_Syateki_Crow', 'baserom/', 'overlay', [], { 0x809CA3F0 : "ovl_En_Syateki_Crow" }], - ['ovl_En_Boj_04', 'baserom/', 'overlay', [], { 0x809CB200 : "ovl_En_Boj_04" }], - ['ovl_En_Cne_01', 'baserom/', 'overlay', [], { 0x809CB290 : "ovl_En_Cne_01" }], - ['ovl_En_Bba_01', 'baserom/', 'overlay', [], { 0x809CC060 : "ovl_En_Bba_01" }], - ['ovl_En_Bji_01', 'baserom/', 'overlay', [], { 0x809CCDE0 : "ovl_En_Bji_01" }], - ['ovl_Bg_Spdweb', 'baserom/', 'overlay', [], { 0x809CDEC0 : "ovl_Bg_Spdweb" }], - ['ovl_En_Mt_tag', 'baserom/', 'overlay', [], { 0x809CF350 : "ovl_En_Mt_tag" }], - ['ovl_Boss_01', 'baserom/', 'overlay', [], { 0x809D0530 : "ovl_Boss_01" }], - ['ovl_Boss_02', 'baserom/', 'overlay', [], { 0x809DA1D0 : "ovl_Boss_02" }], - ['ovl_Boss_03', 'baserom/', 'overlay', [], { 0x809E2760 : "ovl_Boss_03" }], - ['ovl_Boss_04', 'baserom/', 'overlay', [], { 0x809EC040 : "ovl_Boss_04" }], - ['ovl_Boss_05', 'baserom/', 'overlay', [], { 0x809EE4E0 : "ovl_Boss_05" }], - ['ovl_Boss_06', 'baserom/', 'overlay', [], { 0x809F2120 : "ovl_Boss_06" }], - ['ovl_Boss_07', 'baserom/', 'overlay', [], { 0x809F4980 : "ovl_Boss_07" }], - ['ovl_Bg_Dy_Yoseizo', 'baserom/', 'overlay', [], { 0x80A0A8A0 : "ovl_Bg_Dy_Yoseizo" }], - ['ovl_En_Boj_05', 'baserom/', 'overlay', [], { 0x80A0C780 : "ovl_En_Boj_05" }], - ['ovl_En_Sob1', 'baserom/', 'overlay', [], { 0x80A0C810 : "ovl_En_Sob1" }], - ['ovl_En_Go', 'baserom/', 'overlay', [], { 0x80A10FD0 : "ovl_En_Go" }], - ['ovl_En_Raf', 'baserom/', 'overlay', [], { 0x80A16D40 : "ovl_En_Raf" }], - ['ovl_Obj_Funen', 'baserom/', 'overlay', [], { 0x80A19740 : "ovl_Obj_Funen" }], - ['ovl_Obj_Raillift', 'baserom/', 'overlay', [], { 0x80A19910 : "ovl_Obj_Raillift" }], - ['ovl_Bg_Numa_Hana', 'baserom/', 'overlay', [], { 0x80A1A500 : "ovl_Bg_Numa_Hana" }], - ['ovl_Obj_Flowerpot', 'baserom/', 'overlay', [], { 0x80A1B3D0 : "ovl_Obj_Flowerpot" }], - ['ovl_Obj_Spinyroll', 'baserom/', 'overlay', [], { 0x80A1DA50 : "ovl_Obj_Spinyroll" }], - ['ovl_Dm_Hina', 'baserom/', 'overlay', [], { 0x80A1F410 : "ovl_Dm_Hina" }], - ['ovl_En_Syateki_Wf', 'baserom/', 'overlay', [], { 0x80A1FE50 : "ovl_En_Syateki_Wf" }], - ['ovl_Obj_Skateblock', 'baserom/', 'overlay', [], { 0x80A21150 : "ovl_Obj_Skateblock" }], - ['ovl_Effect_En_Ice_Block', 'baserom/', 'overlay', [], { 0x80A22D40 : "ovl_Effect_En_Ice_Block" }], - ['ovl_Obj_Iceblock', 'baserom/', 'overlay', [], { 0x80A23090 : "ovl_Obj_Iceblock" }], - ['ovl_En_Bigpamet', 'baserom/', 'overlay', [], { 0x80A27520 : "ovl_En_Bigpamet" }], - ['ovl_Bg_Dblue_Movebg', 'baserom/', 'overlay', [], { 0x80A29A80 : "ovl_Bg_Dblue_Movebg" }], - ['ovl_En_Syateki_Dekunuts', 'baserom/', 'overlay', [], { 0x80A2BC00 : "ovl_En_Syateki_Dekunuts" }], - ['ovl_Elf_Msg3', 'baserom/', 'overlay', [], { 0x80A2CD10 : "ovl_Elf_Msg3" }], - ['ovl_En_Fg', 'baserom/', 'overlay', [], { 0x80A2D280 : "ovl_En_Fg" }], - ['ovl_Dm_Ravine', 'baserom/', 'overlay', [], { 0x80A2E7A0 : "ovl_Dm_Ravine" }], - ['ovl_Dm_Sa', 'baserom/', 'overlay', [], { 0x80A2E960 : "ovl_Dm_Sa" }], - ['ovl_En_Slime', 'baserom/', 'overlay', [], { 0x80A2EDA0 : "ovl_En_Slime" }], - ['ovl_En_Pr', 'baserom/', 'overlay', [], { 0x80A32210 : "ovl_En_Pr" }], - ['ovl_Obj_Toudai', 'baserom/', 'overlay', [], { 0x80A33B00 : "ovl_Obj_Toudai" }], - ['ovl_Obj_Entotu', 'baserom/', 'overlay', [], { 0x80A34700 : "ovl_Obj_Entotu" }], - ['ovl_Obj_Bell', 'baserom/', 'overlay', [], { 0x80A35510 : "ovl_Obj_Bell" }], - ['ovl_En_Syateki_Okuta', 'baserom/', 'overlay', [], { 0x80A35FF0 : "ovl_En_Syateki_Okuta" }], - ['ovl_Obj_Shutter', 'baserom/', 'overlay', [], { 0x80A37ED0 : "ovl_Obj_Shutter" }], - ['ovl_Dm_Zl', 'baserom/', 'overlay', [], { 0x80A38190 : "ovl_Dm_Zl" }], - ['ovl_En_Ru', 'baserom/', 'overlay', [], { 0x80A389A0 : "ovl_En_Ru" }], - ['ovl_En_Elfgrp', 'baserom/', 'overlay', [], { 0x80A396B0 : "ovl_En_Elfgrp" }], - ['ovl_Dm_Tsg', 'baserom/', 'overlay', [], { 0x80A3AC60 : "ovl_Dm_Tsg" }], - ['ovl_En_Baguo', 'baserom/', 'overlay', [], { 0x80A3B080 : "ovl_En_Baguo" }], - ['ovl_Obj_Vspinyroll', 'baserom/', 'overlay', [], { 0x80A3C4E0 : "ovl_Obj_Vspinyroll" }], - ['ovl_Obj_Smork', 'baserom/', 'overlay', [], { 0x80A3D680 : "ovl_Obj_Smork" }], - ['ovl_En_Test2', 'baserom/', 'overlay', [], { 0x80A3E390 : "ovl_En_Test2" }], - ['ovl_En_Test3', 'baserom/', 'overlay', [], { 0x80A3E7E0 : "ovl_En_Test3" }], - ['ovl_En_Test4', 'baserom/', 'overlay', [], { 0x80A41D70 : "ovl_En_Test4" }], - ['ovl_En_Bat', 'baserom/', 'overlay', [], { 0x80A434E0 : "ovl_En_Bat" }], - ['ovl_En_Sekihi', 'baserom/', 'overlay', [], { 0x80A44C80 : "ovl_En_Sekihi" }], - ['ovl_En_Wiz', 'baserom/', 'overlay', [], { 0x80A45360 : "ovl_En_Wiz" }], - ['ovl_En_Wiz_Brock', 'baserom/', 'overlay', [], { 0x80A48FE0 : "ovl_En_Wiz_Brock" }], - ['ovl_En_Wiz_Fire', 'baserom/', 'overlay', [], { 0x80A496A0 : "ovl_En_Wiz_Fire" }], - ['ovl_Eff_Change', 'baserom/', 'overlay', [], { 0x80A4C490 : "ovl_Eff_Change" }], - ['ovl_Dm_Statue', 'baserom/', 'overlay', [], { 0x80A4C9B0 : "ovl_Dm_Statue" }], - ['ovl_Obj_Fireshield', 'baserom/', 'overlay', [], { 0x80A4CA90 : "ovl_Obj_Fireshield" }], - ['ovl_Bg_Ladder', 'baserom/', 'overlay', [], { 0x80A4D9F0 : "ovl_Bg_Ladder" }], - ['ovl_En_Mkk', 'baserom/', 'overlay', [], { 0x80A4DED0 : "ovl_En_Mkk" }], - ['ovl_Demo_Getitem', 'baserom/', 'overlay', [], { 0x80A4FA40 : "ovl_Demo_Getitem" }], - ['ovl_En_Dnb', 'baserom/', 'overlay', [], { 0x80A4FDD0 : "ovl_En_Dnb" }], - ['ovl_En_Dnh', 'baserom/', 'overlay', [], { 0x80A50D40 : "ovl_En_Dnh" }], - ['ovl_En_Dnk', 'baserom/', 'overlay', [], { 0x80A514F0 : "ovl_En_Dnk" }], - ['ovl_En_Dnq', 'baserom/', 'overlay', [], { 0x80A52530 : "ovl_En_Dnq" }], - ['ovl_Bg_Keikoku_Saku', 'baserom/', 'overlay', [], { 0x80A537D0 : "ovl_Bg_Keikoku_Saku" }], - ['ovl_Obj_Hugebombiwa', 'baserom/', 'overlay', [], { 0x80A53BE0 : "ovl_Obj_Hugebombiwa" }], - ['ovl_En_Firefly2', 'baserom/', 'overlay', [], { 0x80A560C0 : "ovl_En_Firefly2" }], - ['ovl_En_Rat', 'baserom/', 'overlay', [], { 0x80A56150 : "ovl_En_Rat" }], - ['ovl_En_Water_Effect', 'baserom/', 'overlay', [], { 0x80A587A0 : "ovl_En_Water_Effect" }], - ['ovl_En_Kusa2', 'baserom/', 'overlay', [], { 0x80A5B160 : "ovl_En_Kusa2" }], - ['ovl_Bg_Spout_Fire', 'baserom/', 'overlay', [], { 0x80A60B20 : "ovl_Bg_Spout_Fire" }], - ['ovl_En_Dy_Extra', 'baserom/', 'overlay', [], { 0x80A612B0 : "ovl_En_Dy_Extra" }], - ['ovl_En_Bal', 'baserom/', 'overlay', [], { 0x80A61810 : "ovl_En_Bal" }], - ['ovl_En_Ginko_Man', 'baserom/', 'overlay', [], { 0x80A644A0 : "ovl_En_Ginko_Man" }], - ['ovl_En_Warp_Uzu', 'baserom/', 'overlay', [], { 0x80A66180 : "ovl_En_Warp_Uzu" }], - ['ovl_Obj_Driftice', 'baserom/', 'overlay', [], { 0x80A66570 : "ovl_Obj_Driftice" }], - ['ovl_En_Look_Nuts', 'baserom/', 'overlay', [], { 0x80A678B0 : "ovl_En_Look_Nuts" }], - ['ovl_En_Mushi2', 'baserom/', 'overlay', [], { 0x80A687A0 : "ovl_En_Mushi2" }], - ['ovl_En_Fall', 'baserom/', 'overlay', [], { 0x80A6BF90 : "ovl_En_Fall" }], - ['ovl_En_Mm3', 'baserom/', 'overlay', [], { 0x80A6F0A0 : "ovl_En_Mm3" }], - ['ovl_Bg_Crace_Movebg', 'baserom/', 'overlay', [], { 0x80A706F0 : "ovl_Bg_Crace_Movebg" }], - ['ovl_En_Dno', 'baserom/', 'overlay', [], { 0x80A711D0 : "ovl_En_Dno" }], - ['ovl_En_Pr2', 'baserom/', 'overlay', [], { 0x80A73FA0 : "ovl_En_Pr2" }], - ['ovl_En_Prz', 'baserom/', 'overlay', [], { 0x80A75DC0 : "ovl_En_Prz" }], - ['ovl_En_Jso2', 'baserom/', 'overlay', [], { 0x80A773C0 : "ovl_En_Jso2" }], - ['ovl_Obj_Etcetera', 'baserom/', 'overlay', [], { 0x80A7BC70 : "ovl_Obj_Etcetera" }], - ['ovl_En_Egol', 'baserom/', 'overlay', [], { 0x80A7C990 : "ovl_En_Egol" }], - ['ovl_Obj_Mine', 'baserom/', 'overlay', [], { 0x80A811D0 : "ovl_Obj_Mine" }], - ['ovl_Obj_Purify', 'baserom/', 'overlay', [], { 0x80A84CD0 : "ovl_Obj_Purify" }], - ['ovl_En_Tru', 'baserom/', 'overlay', [], { 0x80A85620 : "ovl_En_Tru" }], - ['ovl_En_Trt', 'baserom/', 'overlay', [], { 0x80A8B770 : "ovl_En_Trt" }], - ['ovl_En_Test5', 'baserom/', 'overlay', [], { 0x80A903B0 : "ovl_En_Test5" }], - ['ovl_En_Test6', 'baserom/', 'overlay', [], { 0x80A90730 : "ovl_En_Test6" }], - ['ovl_En_Az', 'baserom/', 'overlay', [], { 0x80A94A30 : "ovl_En_Az" }], - ['ovl_En_Estone', 'baserom/', 'overlay', [], { 0x80A99EA0 : "ovl_En_Estone" }], - ['ovl_Bg_Hakugin_Post', 'baserom/', 'overlay', [], { 0x80A9ACD0 : "ovl_Bg_Hakugin_Post" }], - ['ovl_Dm_Opstage', 'baserom/', 'overlay', [], { 0x80A9F950 : "ovl_Dm_Opstage" }], - ['ovl_Dm_Stk', 'baserom/', 'overlay', [], { 0x80A9FDB0 : "ovl_Dm_Stk" }], - ['ovl_Dm_Char00', 'baserom/', 'overlay', [], { 0x80AA5580 : "ovl_Dm_Char00" }], - ['ovl_Dm_Char01', 'baserom/', 'overlay', [], { 0x80AA81E0 : "ovl_Dm_Char01" }], - ['ovl_Dm_Char02', 'baserom/', 'overlay', [], { 0x80AAAE30 : "ovl_Dm_Char02" }], - ['ovl_Dm_Char03', 'baserom/', 'overlay', [], { 0x80AAB4A0 : "ovl_Dm_Char03" }], - ['ovl_Dm_Char04', 'baserom/', 'overlay', [], { 0x80AABC40 : "ovl_Dm_Char04" }], - ['ovl_Dm_Char05', 'baserom/', 'overlay', [], { 0x80AAC5A0 : "ovl_Dm_Char05" }], - ['ovl_Dm_Char06', 'baserom/', 'overlay', [], { 0x80AAE680 : "ovl_Dm_Char06" }], - ['ovl_Dm_Char07', 'baserom/', 'overlay', [], { 0x80AAE9C0 : "ovl_Dm_Char07" }], - ['ovl_Dm_Char08', 'baserom/', 'overlay', [], { 0x80AAF050 : "ovl_Dm_Char08" }], - ['ovl_Dm_Char09', 'baserom/', 'overlay', [], { 0x80AB1E10 : "ovl_Dm_Char09" }], - ['ovl_Obj_Tokeidai', 'baserom/', 'overlay', [], { 0x80AB2790 : "ovl_Obj_Tokeidai" }], - ['ovl_En_Mnk', 'baserom/', 'overlay', [], { 0x80AB4D10 : "ovl_En_Mnk" }], - ['ovl_En_Egblock', 'baserom/', 'overlay', [], { 0x80ABA7A0 : "ovl_En_Egblock" }], - ['ovl_En_Guard_Nuts', 'baserom/', 'overlay', [], { 0x80ABB0E0 : "ovl_En_Guard_Nuts" }], - ['ovl_Bg_Hakugin_Bombwall', 'baserom/', 'overlay', [], { 0x80ABBFC0 : "ovl_Bg_Hakugin_Bombwall" }], - ['ovl_Obj_Tokei_Tobira', 'baserom/', 'overlay', [], { 0x80ABD1D0 : "ovl_Obj_Tokei_Tobira" }], - ['ovl_Bg_Hakugin_Elvpole', 'baserom/', 'overlay', [], { 0x80ABD830 : "ovl_Bg_Hakugin_Elvpole" }], - ['ovl_En_Ma4', 'baserom/', 'overlay', [], { 0x80ABDCA0 : "ovl_En_Ma4" }], - ['ovl_En_Twig', 'baserom/', 'overlay', [], { 0x80AC0830 : "ovl_En_Twig" }], - ['ovl_En_Po_Fusen', 'baserom/', 'overlay', [], { 0x80AC1270 : "ovl_En_Po_Fusen" }], - ['ovl_En_Door_Etc', 'baserom/', 'overlay', [], { 0x80AC1ED0 : "ovl_En_Door_Etc" }], - ['ovl_En_Bigokuta', 'baserom/', 'overlay', [], { 0x80AC26F0 : "ovl_En_Bigokuta" }], - ['ovl_Bg_Icefloe', 'baserom/', 'overlay', [], { 0x80AC48F0 : "ovl_Bg_Icefloe" }], - ['ovl_fbdemo_triforce', 'baserom/', 'overlay', [], { 0x80AC5070 : "ovl_fbdemo_triforce" }], - ['ovl_fbdemo_wipe1', 'baserom/', 'overlay', [], { 0x80AC57B0 : "ovl_fbdemo_wipe1" }], - ['ovl_fbdemo_wipe3', 'baserom/', 'overlay', [], { 0x80AC6740 : "ovl_fbdemo_wipe3" }], - ['ovl_fbdemo_wipe4', 'baserom/', 'overlay', [], { 0x80AC8430 : "ovl_fbdemo_wipe4" }], - ['ovl_fbdemo_wipe5', 'baserom/', 'overlay', [], { 0x80AC86F0 : "ovl_fbdemo_wipe5" }], - ['ovl_Effect_Ss_Sbn', 'baserom/', 'overlay', [], { 0x80AC8B50 : "ovl_Effect_Ss_Sbn" }], - ['ovl_Obj_Ocarinalift', 'baserom/', 'overlay', [], { 0x80AC94C0 : "ovl_Obj_Ocarinalift" }], - ['ovl_En_Time_Tag', 'baserom/', 'overlay', [], { 0x80AC9EA0 : "ovl_En_Time_Tag" }], - ['ovl_Bg_Open_Shutter', 'baserom/', 'overlay', [], { 0x80ACAB10 : "ovl_Bg_Open_Shutter" }], - ['ovl_Bg_Open_Spot', 'baserom/', 'overlay', [], { 0x80ACB1E0 : "ovl_Bg_Open_Spot" }], - ['ovl_Bg_Fu_Kaiten', 'baserom/', 'overlay', [], { 0x80ACB400 : "ovl_Bg_Fu_Kaiten" }], - ['ovl_Obj_Aqua', 'baserom/', 'overlay', [], { 0x80ACB6A0 : "ovl_Obj_Aqua" }], - ['ovl_En_Elforg', 'baserom/', 'overlay', [], { 0x80ACC470 : "ovl_En_Elforg" }], - ['ovl_En_Elfbub', 'baserom/', 'overlay', [], { 0x80ACDCD0 : "ovl_En_Elfbub" }], - ['ovl_En_Fu_Mato', 'baserom/', 'overlay', [], { 0x80ACE330 : "ovl_En_Fu_Mato" }], - ['ovl_En_Fu_Kago', 'baserom/', 'overlay', [], { 0x80ACF780 : "ovl_En_Fu_Kago" }], - ['ovl_En_Osn', 'baserom/', 'overlay', [], { 0x80AD0830 : "ovl_En_Osn" }], - ['ovl_Bg_Ctower_Gear', 'baserom/', 'overlay', [], { 0x80AD2B70 : "ovl_Bg_Ctower_Gear" }], - ['ovl_En_Trt2', 'baserom/', 'overlay', [], { 0x80AD3380 : "ovl_En_Trt2" }], - ['ovl_Obj_Tokei_Step', 'baserom/', 'overlay', [], { 0x80AD5BB0 : "ovl_Obj_Tokei_Step" }], - ['ovl_Bg_Lotus', 'baserom/', 'overlay', [], { 0x80AD6760 : "ovl_Bg_Lotus" }], - ['ovl_En_Kame', 'baserom/', 'overlay', [], { 0x80AD6DD0 : "ovl_En_Kame" }], - ['ovl_Obj_Takaraya_Wall', 'baserom/', 'overlay', [], { 0x80AD9240 : "ovl_Obj_Takaraya_Wall" }], - ['ovl_Bg_Fu_Mizu', 'baserom/', 'overlay', [], { 0x80ADAAF0 : "ovl_Bg_Fu_Mizu" }], - ['ovl_En_Sellnuts', 'baserom/', 'overlay', [], { 0x80ADADD0 : "ovl_En_Sellnuts" }], - ['ovl_Bg_Dkjail_Ivy', 'baserom/', 'overlay', [], { 0x80ADE230 : "ovl_Bg_Dkjail_Ivy" }], - ['ovl_Obj_Visiblock', 'baserom/', 'overlay', [], { 0x80ADEA70 : "ovl_Obj_Visiblock" }], - ['ovl_En_Takaraya', 'baserom/', 'overlay', [], { 0x80ADEB90 : "ovl_En_Takaraya" }], - ['ovl_En_Tsn', 'baserom/', 'overlay', [], { 0x80ADFCA0 : "ovl_En_Tsn" }], - ['ovl_En_Ds2n', 'baserom/', 'overlay', [], { 0x80AE1650 : "ovl_En_Ds2n" }], - ['ovl_En_Fsn', 'baserom/', 'overlay', [], { 0x80AE1B70 : "ovl_En_Fsn" }], - ['ovl_En_Shn', 'baserom/', 'overlay', [], { 0x80AE6130 : "ovl_En_Shn" }], - ['ovl_En_Stop_heishi', 'baserom/', 'overlay', [], { 0x80AE73A0 : "ovl_En_Stop_heishi" }], - ['ovl_Obj_Bigicicle', 'baserom/', 'overlay', [], { 0x80AE8B70 : "ovl_Obj_Bigicicle" }], - ['ovl_En_Lift_Nuts', 'baserom/', 'overlay', [], { 0x80AE9A20 : "ovl_En_Lift_Nuts" }], - ['ovl_En_Tk', 'baserom/', 'overlay', [], { 0x80AEC460 : "ovl_En_Tk" }], - ['ovl_Bg_Market_Step', 'baserom/', 'overlay', [], { 0x80AF0060 : "ovl_Bg_Market_Step" }], - ['ovl_Obj_Lupygamelift', 'baserom/', 'overlay', [], { 0x80AF0170 : "ovl_Obj_Lupygamelift" }], - ['ovl_En_Test7', 'baserom/', 'overlay', [], { 0x80AF0820 : "ovl_En_Test7" }], - ['ovl_Obj_Lightblock', 'baserom/', 'overlay', [], { 0x80AF3910 : "ovl_Obj_Lightblock" }], - ['ovl_Mir_Ray2', 'baserom/', 'overlay', [], { 0x80AF3F70 : "ovl_Mir_Ray2" }], - ['ovl_En_Wdhand', 'baserom/', 'overlay', [], { 0x80AF43F0 : "ovl_En_Wdhand" }], - ['ovl_En_Gamelupy', 'baserom/', 'overlay', [], { 0x80AF6760 : "ovl_En_Gamelupy" }], - ['ovl_Bg_Danpei_Movebg', 'baserom/', 'overlay', [], { 0x80AF6DE0 : "ovl_Bg_Danpei_Movebg" }], - ['ovl_En_Snowwd', 'baserom/', 'overlay', [], { 0x80AF7640 : "ovl_En_Snowwd" }], - ['ovl_En_Pm', 'baserom/', 'overlay', [], { 0x80AF7B40 : "ovl_En_Pm" }], - ['ovl_En_Gakufu', 'baserom/', 'overlay', [], { 0x80AFC960 : "ovl_En_Gakufu" }], - ['ovl_Elf_Msg4', 'baserom/', 'overlay', [], { 0x80AFD380 : "ovl_Elf_Msg4" }], - ['ovl_Elf_Msg5', 'baserom/', 'overlay', [], { 0x80AFD990 : "ovl_Elf_Msg5" }], - ['ovl_En_Col_Man', 'baserom/', 'overlay', [], { 0x80AFDC40 : "ovl_En_Col_Man" }], - ['ovl_En_Talk_Gibud', 'baserom/', 'overlay', [], { 0x80AFE8A0 : "ovl_En_Talk_Gibud" }], - ['ovl_En_Giant', 'baserom/', 'overlay', [], { 0x80B01990 : "ovl_En_Giant" }], - ['ovl_Obj_Snowball', 'baserom/', 'overlay', [], { 0x80B02CD0 : "ovl_Obj_Snowball" }], - ['ovl_Boss_Hakugin', 'baserom/', 'overlay', [], { 0x80B05290 : "ovl_Boss_Hakugin" }], - ['ovl_En_Gb2', 'baserom/', 'overlay', [], { 0x80B0F5E0 : "ovl_En_Gb2" }], - ['ovl_En_Onpuman', 'baserom/', 'overlay', [], { 0x80B11E60 : "ovl_En_Onpuman" }], - ['ovl_Bg_Tobira01', 'baserom/', 'overlay', [], { 0x80B12430 : "ovl_Bg_Tobira01" }], - ['ovl_En_Tag_Obj', 'baserom/', 'overlay', [], { 0x80B12870 : "ovl_En_Tag_Obj" }], - ['ovl_Obj_Dhouse', 'baserom/', 'overlay', [], { 0x80B12980 : "ovl_Obj_Dhouse" }], - ['ovl_Obj_Hakaisi', 'baserom/', 'overlay', [], { 0x80B14180 : "ovl_Obj_Hakaisi" }], - ['ovl_Bg_Hakugin_Switch', 'baserom/', 'overlay', [], { 0x80B15790 : "ovl_Bg_Hakugin_Switch" }], - ['ovl_En_Snowman', 'baserom/', 'overlay', [], { 0x80B16B00 : "ovl_En_Snowman" }], - ['ovl_TG_Sw', 'baserom/', 'overlay', [], { 0x80B19F60 : "ovl_TG_Sw" }], - ['ovl_En_Po_Sisters', 'baserom/', 'overlay', [], { 0x80B1A3B0 : "ovl_En_Po_Sisters" }], - ['ovl_En_Pp', 'baserom/', 'overlay', [], { 0x80B1DEB0 : "ovl_En_Pp" }], - ['ovl_En_Hakurock', 'baserom/', 'overlay', [], { 0x80B21B00 : "ovl_En_Hakurock" }], - ['ovl_En_Hanabi', 'baserom/', 'overlay', [], { 0x80B22C00 : "ovl_En_Hanabi" }], - ['ovl_Obj_Dowsing', 'baserom/', 'overlay', [], { 0x80B23D50 : "ovl_Obj_Dowsing" }], - ['ovl_Obj_Wind', 'baserom/', 'overlay', [], { 0x80B23ED0 : "ovl_Obj_Wind" }], - ['ovl_En_Racedog', 'baserom/', 'overlay', [], { 0x80B24630 : "ovl_En_Racedog" }], - ['ovl_En_Kendo_Js', 'baserom/', 'overlay', [], { 0x80B262A0 : "ovl_En_Kendo_Js" }], - ['ovl_Bg_Botihasira', 'baserom/', 'overlay', [], { 0x80B28080 : "ovl_Bg_Botihasira" }], - ['ovl_En_Fish2', 'baserom/', 'overlay', [], { 0x80B28370 : "ovl_En_Fish2" }], - ['ovl_En_Pst', 'baserom/', 'overlay', [], { 0x80B2B830 : "ovl_En_Pst" }], - ['ovl_En_Poh', 'baserom/', 'overlay', [], { 0x80B2C6F0 : "ovl_En_Poh" }], - ['ovl_Obj_Spidertent', 'baserom/', 'overlay', [], { 0x80B2FB10 : "ovl_Obj_Spidertent" }], - ['ovl_En_Zoraegg', 'baserom/', 'overlay', [], { 0x80B31590 : "ovl_En_Zoraegg" }], - ['ovl_En_Kbt', 'baserom/', 'overlay', [], { 0x80B33D30 : "ovl_En_Kbt" }], - ['ovl_En_Gg', 'baserom/', 'overlay', [], { 0x80B34F70 : "ovl_En_Gg" }], - ['ovl_En_Maruta', 'baserom/', 'overlay', [], { 0x80B37080 : "ovl_En_Maruta" }], - ['ovl_Obj_Snowball2', 'baserom/', 'overlay', [], { 0x80B38E20 : "ovl_Obj_Snowball2" }], - ['ovl_En_Gg2', 'baserom/', 'overlay', [], { 0x80B3AC50 : "ovl_En_Gg2" }], - ['ovl_Obj_Ghaka', 'baserom/', 'overlay', [], { 0x80B3C260 : "ovl_Obj_Ghaka" }], - ['ovl_En_Dnp', 'baserom/', 'overlay', [], { 0x80B3CA20 : "ovl_En_Dnp" }], - ['ovl_En_Dai', 'baserom/', 'overlay', [], { 0x80B3DFF0 : "ovl_En_Dai" }], - ['ovl_Bg_Goron_Oyu', 'baserom/', 'overlay', [], { 0x80B40080 : "ovl_Bg_Goron_Oyu" }], - ['ovl_En_Kgy', 'baserom/', 'overlay', [], { 0x80B40800 : "ovl_En_Kgy" }], - ['ovl_En_Invadepoh', 'baserom/', 'overlay', [], { 0x80B439B0 : "ovl_En_Invadepoh" }], - ['ovl_En_Gk', 'baserom/', 'overlay', [], { 0x80B50410 : "ovl_En_Gk" }], - ['ovl_En_An', 'baserom/', 'overlay', [], { 0x80B53840 : "ovl_En_An" }], - ['ovl_En_Bee', 'baserom/', 'overlay', [], { 0x80B5A720 : "ovl_En_Bee" }], - ['ovl_En_Ot', 'baserom/', 'overlay', [], { 0x80B5B2E0 : "ovl_En_Ot" }], - ['ovl_En_Dragon', 'baserom/', 'overlay', [], { 0x80B5E890 : "ovl_En_Dragon" }], - ['ovl_Obj_Dora', 'baserom/', 'overlay', [], { 0x80B60AD0 : "ovl_Obj_Dora" }], - ['ovl_En_Bigpo', 'baserom/', 'overlay', [], { 0x80B615E0 : "ovl_En_Bigpo" }], - ['ovl_Obj_Kendo_Kanban', 'baserom/', 'overlay', [], { 0x80B654C0 : "ovl_Obj_Kendo_Kanban" }], - ['ovl_Obj_Hariko', 'baserom/', 'overlay', [], { 0x80B66A20 : "ovl_Obj_Hariko" }], - ['ovl_En_Sth', 'baserom/', 'overlay', [], { 0x80B66D30 : "ovl_En_Sth" }], - ['ovl_Bg_Sinkai_Kabe', 'baserom/', 'overlay', [], { 0x80B6D660 : "ovl_Bg_Sinkai_Kabe" }], - ['ovl_Bg_Haka_Curtain', 'baserom/', 'overlay', [], { 0x80B6DBE0 : "ovl_Bg_Haka_Curtain" }], - ['ovl_Bg_Kin2_Bombwall', 'baserom/', 'overlay', [], { 0x80B6E020 : "ovl_Bg_Kin2_Bombwall" }], - ['ovl_Bg_Kin2_Fence', 'baserom/', 'overlay', [], { 0x80B6E820 : "ovl_Bg_Kin2_Fence" }], - ['ovl_Bg_Kin2_Picture', 'baserom/', 'overlay', [], { 0x80B6EFA0 : "ovl_Bg_Kin2_Picture" }], - ['ovl_Bg_Kin2_Shelf', 'baserom/', 'overlay', [], { 0x80B6FB30 : "ovl_Bg_Kin2_Shelf" }], - ['ovl_En_Rail_Skb', 'baserom/', 'overlay', [], { 0x80B708C0 : "ovl_En_Rail_Skb" }], - ['ovl_En_Jg', 'baserom/', 'overlay', [], { 0x80B73A90 : "ovl_En_Jg" }], - ['ovl_En_Tru_Mt', 'baserom/', 'overlay', [], { 0x80B76030 : "ovl_En_Tru_Mt" }], - ['ovl_Obj_Um', 'baserom/', 'overlay', [], { 0x80B77770 : "ovl_Obj_Um" }], - ['ovl_En_Neo_Reeba', 'baserom/', 'overlay', [], { 0x80B7C890 : "ovl_En_Neo_Reeba" }], - ['ovl_Bg_Mbar_Chair', 'baserom/', 'overlay', [], { 0x80B7E930 : "ovl_Bg_Mbar_Chair" }], - ['ovl_Bg_Ikana_Block', 'baserom/', 'overlay', [], { 0x80B7EA60 : "ovl_Bg_Ikana_Block" }], - ['ovl_Bg_Ikana_Mirror', 'baserom/', 'overlay', [], { 0x80B7F730 : "ovl_Bg_Ikana_Mirror" }], - ['ovl_Bg_Ikana_Rotaryroom', 'baserom/', 'overlay', [], { 0x80B802E0 : "ovl_Bg_Ikana_Rotaryroom" }], - ['ovl_Bg_Dblue_Balance', 'baserom/', 'overlay', [], { 0x80B823B0 : "ovl_Bg_Dblue_Balance" }], - ['ovl_Bg_Dblue_Waterfall', 'baserom/', 'overlay', [], { 0x80B83C80 : "ovl_Bg_Dblue_Waterfall" }], - ['ovl_En_Kaizoku', 'baserom/', 'overlay', [], { 0x80B85590 : "ovl_En_Kaizoku" }], - ['ovl_En_Ge2', 'baserom/', 'overlay', [], { 0x80B8B2D0 : "ovl_En_Ge2" }], - ['ovl_En_Ma_Yts', 'baserom/', 'overlay', [], { 0x80B8D030 : "ovl_En_Ma_Yts" }], - ['ovl_En_Ma_Yto', 'baserom/', 'overlay', [], { 0x80B8E520 : "ovl_En_Ma_Yto" }], - ['ovl_Obj_Tokei_Turret', 'baserom/', 'overlay', [], { 0x80B91CC0 : "ovl_Obj_Tokei_Turret" }], - ['ovl_Bg_Dblue_Elevator', 'baserom/', 'overlay', [], { 0x80B91F20 : "ovl_Bg_Dblue_Elevator" }], - ['ovl_Obj_Warpstone', 'baserom/', 'overlay', [], { 0x80B92B10 : "ovl_Obj_Warpstone" }], - ['ovl_En_Zog', 'baserom/', 'overlay', [], { 0x80B93310 : "ovl_En_Zog" }], - ['ovl_Obj_Rotlift', 'baserom/', 'overlay', [], { 0x80B95E20 : "ovl_Obj_Rotlift" }], - ['ovl_Obj_Jg_Gakki', 'baserom/', 'overlay', [], { 0x80B961E0 : "ovl_Obj_Jg_Gakki" }], - ['ovl_Bg_Inibs_Movebg', 'baserom/', 'overlay', [], { 0x80B96410 : "ovl_Bg_Inibs_Movebg" }], - ['ovl_En_Zot', 'baserom/', 'overlay', [], { 0x80B965D0 : "ovl_En_Zot" }], - ['ovl_Obj_Tree', 'baserom/', 'overlay', [], { 0x80B9A0B0 : "ovl_Obj_Tree" }], - ['ovl_Obj_Y2lift', 'baserom/', 'overlay', [], { 0x80B9A650 : "ovl_Obj_Y2lift" }], - ['ovl_Obj_Y2shutter', 'baserom/', 'overlay', [], { 0x80B9A980 : "ovl_Obj_Y2shutter" }], - ['ovl_Obj_Boat', 'baserom/', 'overlay', [], { 0x80B9AF50 : "ovl_Obj_Boat" }], - ['ovl_Obj_Taru', 'baserom/', 'overlay', [], { 0x80B9B6E0 : "ovl_Obj_Taru" }], - ['ovl_Obj_Hunsui', 'baserom/', 'overlay', [], { 0x80B9C450 : "ovl_Obj_Hunsui" }], - ['ovl_En_Jc_Mato', 'baserom/', 'overlay', [], { 0x80B9DEE0 : "ovl_En_Jc_Mato" }], - ['ovl_Mir_Ray3', 'baserom/', 'overlay', [], { 0x80B9E2C0 : "ovl_Mir_Ray3" }], - ['ovl_En_Zob', 'baserom/', 'overlay', [], { 0x80B9F570 : "ovl_En_Zob" }], - ['ovl_Elf_Msg6', 'baserom/', 'overlay', [], { 0x80BA15A0 : "ovl_Elf_Msg6" }], - ['ovl_Obj_Nozoki', 'baserom/', 'overlay', [], { 0x80BA2420 : "ovl_Obj_Nozoki" }], - ['ovl_En_Toto', 'baserom/', 'overlay', [], { 0x80BA36C0 : "ovl_En_Toto" }], - ['ovl_En_Railgibud', 'baserom/', 'overlay', [], { 0x80BA5400 : "ovl_En_Railgibud" }], - ['ovl_En_Baba', 'baserom/', 'overlay', [], { 0x80BA8820 : "ovl_En_Baba" }], - ['ovl_En_Suttari', 'baserom/', 'overlay', [], { 0x80BAA6D0 : "ovl_En_Suttari" }], - ['ovl_En_Zod', 'baserom/', 'overlay', [], { 0x80BAEF70 : "ovl_En_Zod" }], - ['ovl_En_Kujiya', 'baserom/', 'overlay', [], { 0x80BB08E0 : "ovl_En_Kujiya" }], - ['ovl_En_Geg', 'baserom/', 'overlay', [], { 0x80BB16D0 : "ovl_En_Geg" }], - ['ovl_Obj_Kinoko', 'baserom/', 'overlay', [], { 0x80BB4700 : "ovl_Obj_Kinoko" }], - ['ovl_Obj_Yasi', 'baserom/', 'overlay', [], { 0x80BB4AF0 : "ovl_Obj_Yasi" }], - ['ovl_En_Tanron1', 'baserom/', 'overlay', [], { 0x80BB4E00 : "ovl_En_Tanron1" }], - ['ovl_En_Tanron2', 'baserom/', 'overlay', [], { 0x80BB67D0 : "ovl_En_Tanron2" }], - ['ovl_En_Tanron3', 'baserom/', 'overlay', [], { 0x80BB85A0 : "ovl_En_Tanron3" }], - ['ovl_Obj_Chan', 'baserom/', 'overlay', [], { 0x80BB98E0 : "ovl_Obj_Chan" }], - ['ovl_En_Zos', 'baserom/', 'overlay', [], { 0x80BBACA0 : "ovl_En_Zos" }], - ['ovl_En_S_Goro', 'baserom/', 'overlay', [], { 0x80BBCA80 : "ovl_En_S_Goro" }], - ['ovl_En_Nb', 'baserom/', 'overlay', [], { 0x80BBFDB0 : "ovl_En_Nb" }], - ['ovl_En_Ja', 'baserom/', 'overlay', [], { 0x80BC1900 : "ovl_En_Ja" }], - ['ovl_Bg_F40_Block', 'baserom/', 'overlay', [], { 0x80BC3980 : "ovl_Bg_F40_Block" }], - ['ovl_Bg_F40_Switch', 'baserom/', 'overlay', [], { 0x80BC47B0 : "ovl_Bg_F40_Switch" }], - ['ovl_En_Po_Composer', 'baserom/', 'overlay', [], { 0x80BC4F30 : "ovl_En_Po_Composer" }], - ['ovl_En_Guruguru', 'baserom/', 'overlay', [], { 0x80BC6BF0 : "ovl_En_Guruguru" }], - ['ovl_Oceff_Wipe5', 'baserom/', 'overlay', [], { 0x80BC7AD0 : "ovl_Oceff_Wipe5" }], - ['ovl_En_Stone_heishi', 'baserom/', 'overlay', [], { 0x80BC9270 : "ovl_En_Stone_heishi" }], - ['ovl_Oceff_Wipe6', 'baserom/', 'overlay', [], { 0x80BCA5A0 : "ovl_Oceff_Wipe6" }], - ['ovl_En_Scopenuts', 'baserom/', 'overlay', [], { 0x80BCABF0 : "ovl_En_Scopenuts" }], - ['ovl_En_Scopecrow', 'baserom/', 'overlay', [], { 0x80BCD000 : "ovl_En_Scopecrow" }], - ['ovl_Oceff_Wipe7', 'baserom/', 'overlay', [], { 0x80BCDCB0 : "ovl_Oceff_Wipe7" }], - ['ovl_Eff_Kamejima_Wave', 'baserom/', 'overlay', [], { 0x80BCEB20 : "ovl_Eff_Kamejima_Wave" }], - ['ovl_En_Hg', 'baserom/', 'overlay', [], { 0x80BCF1D0 : "ovl_En_Hg" }], - ['ovl_En_Hgo', 'baserom/', 'overlay', [], { 0x80BD02B0 : "ovl_En_Hgo" }], - ['ovl_En_Zov', 'baserom/', 'overlay', [], { 0x80BD11E0 : "ovl_En_Zov" }], - ['ovl_En_Ah', 'baserom/', 'overlay', [], { 0x80BD2A30 : "ovl_En_Ah" }], - ['ovl_Obj_Hgdoor', 'baserom/', 'overlay', [], { 0x80BD4090 : "ovl_Obj_Hgdoor" }], - ['ovl_Bg_Ikana_Bombwall', 'baserom/', 'overlay', [], { 0x80BD4720 : "ovl_Bg_Ikana_Bombwall" }], - ['ovl_Bg_Ikana_Ray', 'baserom/', 'overlay', [], { 0x80BD53C0 : "ovl_Bg_Ikana_Ray" }], - ['ovl_Bg_Ikana_Shutter', 'baserom/', 'overlay', [], { 0x80BD5690 : "ovl_Bg_Ikana_Shutter" }], - ['ovl_Bg_Haka_Bombwall', 'baserom/', 'overlay', [], { 0x80BD5E00 : "ovl_Bg_Haka_Bombwall" }], - ['ovl_Bg_Haka_Tomb', 'baserom/', 'overlay', [], { 0x80BD6580 : "ovl_Bg_Haka_Tomb" }], - ['ovl_En_Sc_Ruppe', 'baserom/', 'overlay', [], { 0x80BD6910 : "ovl_En_Sc_Ruppe" }], - ['ovl_Bg_Iknv_Doukutu', 'baserom/', 'overlay', [], { 0x80BD6F10 : "ovl_Bg_Iknv_Doukutu" }], - ['ovl_Bg_Iknv_Obj', 'baserom/', 'overlay', [], { 0x80BD7AB0 : "ovl_Bg_Iknv_Obj" }], - ['ovl_En_Pamera', 'baserom/', 'overlay', [], { 0x80BD82B0 : "ovl_En_Pamera" }], - ['ovl_Obj_HsStump', 'baserom/', 'overlay', [], { 0x80BDAA30 : "ovl_Obj_HsStump" }], - ['ovl_En_Hidden_Nuts', 'baserom/', 'overlay', [], { 0x80BDB040 : "ovl_En_Hidden_Nuts" }], - ['ovl_En_Zow', 'baserom/', 'overlay', [], { 0x80BDC270 : "ovl_En_Zow" }], - ['ovl_En_Talk', 'baserom/', 'overlay', [], { 0x80BDDFE0 : "ovl_En_Talk" }], - ['ovl_En_Al', 'baserom/', 'overlay', [], { 0x80BDE1A0 : "ovl_En_Al" }], - ['ovl_En_Tab', 'baserom/', 'overlay', [], { 0x80BE04E0 : "ovl_En_Tab" }], - ['ovl_En_Nimotsu', 'baserom/', 'overlay', [], { 0x80BE1C80 : "ovl_En_Nimotsu" }], - ['ovl_En_Hit_Tag', 'baserom/', 'overlay', [], { 0x80BE2030 : "ovl_En_Hit_Tag" }], - ['ovl_En_Ruppecrow', 'baserom/', 'overlay', [], { 0x80BE2260 : "ovl_En_Ruppecrow" }], - ['ovl_En_Tanron4', 'baserom/', 'overlay', [], { 0x80BE3B80 : "ovl_En_Tanron4" }], - ['ovl_En_Tanron5', 'baserom/', 'overlay', [], { 0x80BE4930 : "ovl_En_Tanron5" }], - ['ovl_En_Tanron6', 'baserom/', 'overlay', [], { 0x80BE6040 : "ovl_En_Tanron6" }], - ['ovl_En_Daiku2', 'baserom/', 'overlay', [], { 0x80BE61D0 : "ovl_En_Daiku2" }], - ['ovl_En_Muto', 'baserom/', 'overlay', [], { 0x80BE7B00 : "ovl_En_Muto" }], - ['ovl_En_Baisen', 'baserom/', 'overlay', [], { 0x80BE84F0 : "ovl_En_Baisen" }], - ['ovl_En_Heishi', 'baserom/', 'overlay', [], { 0x80BE8F20 : "ovl_En_Heishi" }], - ['ovl_En_Demo_heishi', 'baserom/', 'overlay', [], { 0x80BE9510 : "ovl_En_Demo_heishi" }], - ['ovl_En_Dt', 'baserom/', 'overlay', [], { 0x80BE9B20 : "ovl_En_Dt" }], - ['ovl_En_Cha', 'baserom/', 'overlay', [], { 0x80BEB520 : "ovl_En_Cha" }], - ['ovl_Obj_Dinner', 'baserom/', 'overlay', [], { 0x80BEB940 : "ovl_Obj_Dinner" }], - ['ovl_Eff_Lastday', 'baserom/', 'overlay', [], { 0x80BEBAC0 : "ovl_Eff_Lastday" }], - ['ovl_Bg_Ikana_Dharma', 'baserom/', 'overlay', [], { 0x80BEC240 : "ovl_Bg_Ikana_Dharma" }], - ['ovl_En_Akindonuts', 'baserom/', 'overlay', [], { 0x80BECBE0 : "ovl_En_Akindonuts" }], - ['ovl_Eff_Stk', 'baserom/', 'overlay', [], { 0x80BF0D90 : "ovl_Eff_Stk" }], - ['ovl_En_Ig', 'baserom/', 'overlay', [], { 0x80BF1150 : "ovl_En_Ig" }], - ['ovl_En_Rg', 'baserom/', 'overlay', [], { 0x80BF3920 : "ovl_En_Rg" }], - ['ovl_En_Osk', 'baserom/', 'overlay', [], { 0x80BF5C20 : "ovl_En_Osk" }], - ['ovl_En_Sth2', 'baserom/', 'overlay', [], { 0x80BF74E0 : "ovl_En_Sth2" }], - ['ovl_En_Yb', 'baserom/', 'overlay', [], { 0x80BFA100 : "ovl_En_Yb" }], - ['ovl_En_Rz', 'baserom/', 'overlay', [], { 0x80BFB480 : "ovl_En_Rz" }], - ['ovl_En_Scopecoin', 'baserom/', 'overlay', [], { 0x80BFCFA0 : "ovl_En_Scopecoin" }], - ['ovl_En_Bjt', 'baserom/', 'overlay', [], { 0x80BFD2E0 : "ovl_En_Bjt" }], - ['ovl_En_Bomjima', 'baserom/', 'overlay', [], { 0x80BFE170 : "ovl_En_Bomjima" }], - ['ovl_En_Bomjimb', 'baserom/', 'overlay', [], { 0x80C00EA0 : "ovl_En_Bomjimb" }], - ['ovl_En_Bombers', 'baserom/', 'overlay', [], { 0x80C03530 : "ovl_En_Bombers" }], - ['ovl_En_Bombers2', 'baserom/', 'overlay', [], { 0x80C04930 : "ovl_En_Bombers2" }], - ['ovl_En_Bombal', 'baserom/', 'overlay', [], { 0x80C05A70 : "ovl_En_Bombal" }], - ['ovl_Obj_Moon_Stone', 'baserom/', 'overlay', [], { 0x80C06510 : "ovl_Obj_Moon_Stone" }], - ['ovl_Obj_Mu_Pict', 'baserom/', 'overlay', [], { 0x80C06AA0 : "ovl_Obj_Mu_Pict" }], - ['ovl_Bg_Ikninside', 'baserom/', 'overlay', [], { 0x80C07110 : "ovl_Bg_Ikninside" }], - ['ovl_Eff_Zoraband', 'baserom/', 'overlay', [], { 0x80C07740 : "ovl_Eff_Zoraband" }], - ['ovl_Obj_Kepn_Koya', 'baserom/', 'overlay', [], { 0x80C07B20 : "ovl_Obj_Kepn_Koya" }], - ['ovl_Obj_Usiyane', 'baserom/', 'overlay', [], { 0x80C07C80 : "ovl_Obj_Usiyane" }], - ['ovl_En_Nnh', 'baserom/', 'overlay', [], { 0x80C08760 : "ovl_En_Nnh" }], - ['ovl_Obj_Kzsaku', 'baserom/', 'overlay', [], { 0x80C08A80 : "ovl_Obj_Kzsaku" }], - ['ovl_Obj_Milk_Bin', 'baserom/', 'overlay', [], { 0x80C08E40 : "ovl_Obj_Milk_Bin" }], - ['ovl_En_Kitan', 'baserom/', 'overlay', [], { 0x80C090D0 : "ovl_En_Kitan" }], - ['ovl_Bg_Astr_Bombwall', 'baserom/', 'overlay', [], { 0x80C09ED0 : "ovl_Bg_Astr_Bombwall" }], - ['ovl_Bg_Iknin_Susceil', 'baserom/', 'overlay', [], { 0x80C0A740 : "ovl_Bg_Iknin_Susceil" }], - ['ovl_En_Bsb', 'baserom/', 'overlay', [], { 0x80C0B290 : "ovl_En_Bsb" }], - ['ovl_En_Recepgirl', 'baserom/', 'overlay', [], { 0x80C0FFD0 : "ovl_En_Recepgirl" }], - ['ovl_En_Thiefbird', 'baserom/', 'overlay', [], { 0x80C10770 : "ovl_En_Thiefbird" }], - ['ovl_En_Jgame_Tsn', 'baserom/', 'overlay', [], { 0x80C13930 : "ovl_En_Jgame_Tsn" }], - ['ovl_Obj_Jgame_Light', 'baserom/', 'overlay', [], { 0x80C152F0 : "ovl_Obj_Jgame_Light" }], - ['ovl_Obj_Yado', 'baserom/', 'overlay', [], { 0x80C161E0 : "ovl_Obj_Yado" }], - ['ovl_Demo_Syoten', 'baserom/', 'overlay', [], { 0x80C16480 : "ovl_Demo_Syoten" }], - ['ovl_Demo_Moonend', 'baserom/', 'overlay', [], { 0x80C17A10 : "ovl_Demo_Moonend" }], - ['ovl_Bg_Lbfshot', 'baserom/', 'overlay', [], { 0x80C18120 : "ovl_Bg_Lbfshot" }], - ['ovl_Bg_Last_Bwall', 'baserom/', 'overlay', [], { 0x80C18240 : "ovl_Bg_Last_Bwall" }], - ['ovl_En_And', 'baserom/', 'overlay', [], { 0x80C18B90 : "ovl_En_And" }], - ['ovl_En_Invadepoh_Demo', 'baserom/', 'overlay', [], { 0x80C192A0 : "ovl_En_Invadepoh_Demo" }], - ['ovl_Obj_Danpeilift', 'baserom/', 'overlay', [], { 0x80C1ADC0 : "ovl_Obj_Danpeilift" }], - ['ovl_En_Fall2', 'baserom/', 'overlay', [], { 0x80C1B640 : "ovl_En_Fall2" }], - ['ovl_Dm_Al', 'baserom/', 'overlay', [], { 0x80C1BD90 : "ovl_Dm_Al" }], - ['ovl_Dm_An', 'baserom/', 'overlay', [], { 0x80C1C410 : "ovl_Dm_An" }], - ['ovl_Dm_Ah', 'baserom/', 'overlay', [], { 0x80C1D410 : "ovl_Dm_Ah" }], - ['ovl_Dm_Nb', 'baserom/', 'overlay', [], { 0x80C1DED0 : "ovl_Dm_Nb" }], - ['ovl_En_Drs', 'baserom/', 'overlay', [], { 0x80C1E290 : "ovl_En_Drs" }], - ['ovl_En_Ending_Hero', 'baserom/', 'overlay', [], { 0x80C1E690 : "ovl_En_Ending_Hero" }], - ['ovl_Dm_Bal', 'baserom/', 'overlay', [], { 0x80C1E9E0 : "ovl_Dm_Bal" }], - ['ovl_En_Paper', 'baserom/', 'overlay', [], { 0x80C1F3D0 : "ovl_En_Paper" }], - ['ovl_En_Hint_Skb', 'baserom/', 'overlay', [], { 0x80C1FCF0 : "ovl_En_Hint_Skb" }], - ['ovl_Dm_Tag', 'baserom/', 'overlay', [], { 0x80C22350 : "ovl_Dm_Tag" }], - ['ovl_En_Bh', 'baserom/', 'overlay', [], { 0x80C22D40 : "ovl_En_Bh" }], - ['ovl_En_Ending_Hero2', 'baserom/', 'overlay', [], { 0x80C23230 : "ovl_En_Ending_Hero2" }], - ['ovl_En_Ending_Hero3', 'baserom/', 'overlay', [], { 0x80C23460 : "ovl_En_Ending_Hero3" }], - ['ovl_En_Ending_Hero4', 'baserom/', 'overlay', [], { 0x80C23690 : "ovl_En_Ending_Hero4" }], - ['ovl_En_Ending_Hero5', 'baserom/', 'overlay', [], { 0x80C238C0 : "ovl_En_Ending_Hero5" }], - ['ovl_En_Ending_Hero6', 'baserom/', 'overlay', [], { 0x80C23C90 : "ovl_En_Ending_Hero6" }], - ['ovl_Dm_Gm', 'baserom/', 'overlay', [], { 0x80C24360 : "ovl_Dm_Gm" }], - ['ovl_Obj_Swprize', 'baserom/', 'overlay', [], { 0x80C25360 : "ovl_Obj_Swprize" }], - ['ovl_En_Invisible_Ruppe', 'baserom/', 'overlay', [], { 0x80C258A0 : "ovl_En_Invisible_Ruppe" }], - ['ovl_Obj_Ending', 'baserom/', 'overlay', [], { 0x80C25BC0 : "ovl_Obj_Ending" }], - ['ovl_En_Rsn', 'baserom/', 'overlay', [], { 0x80C25D40 : "ovl_En_Rsn" }], + ['ovl_title', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80800000 : "ovl_title" }], + ['ovl_select', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80800910 : "ovl_select" }], + ['ovl_opening', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80803DF0 : "ovl_opening" }], + ['ovl_file_choose', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80804010 : "ovl_file_choose" }], + ['ovl_daytelop', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80814EB0 : "ovl_daytelop" }], + ['ovl_kaleido_scope', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808160A0 : "ovl_kaleido_scope" }], + ['ovl_player_actor', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8082DA90 : "ovl_player_actor" }], + ['ovl_En_Test', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80862B70 : "ovl_En_Test" }], + ['ovl_En_GirlA', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80863870 : "ovl_En_GirlA" }], + ['ovl_En_Part', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80865370 : "ovl_En_Part" }], + ['ovl_En_Light', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80865990 : "ovl_En_Light" }], + ['ovl_En_Door', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80866800 : "ovl_En_Door" }], + ['ovl_En_Box', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80867BD0 : "ovl_En_Box" }], + ['ovl_En_Pametfrog', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80869D90 : "ovl_En_Pametfrog" }], + ['ovl_En_Okuta', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8086DE20 : "ovl_En_Okuta" }], + ['ovl_En_Bom', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80870DB0 : "ovl_En_Bom" }], + ['ovl_En_Wallmas', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80874810 : "ovl_En_Wallmas" }], + ['ovl_En_Dodongo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80876670 : "ovl_En_Dodongo" }], + ['ovl_En_Firefly', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808796F0 : "ovl_En_Firefly" }], + ['ovl_En_Horse', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8087B730 : "ovl_En_Horse" }], + ['ovl_En_Arrow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8088A240 : "ovl_En_Arrow" }], + ['ovl_En_Elf', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8088C510 : "ovl_En_Elf" }], + ['ovl_En_Niw', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80891060 : "ovl_En_Niw" }], + ['ovl_En_Tite', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808937F0 : "ovl_En_Tite" }], + ['ovl_En_Peehat', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80896F30 : "ovl_En_Peehat" }], + ['ovl_En_Holl', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80899960 : "ovl_En_Holl" }], + ['ovl_En_Dinofos', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8089A6E0 : "ovl_En_Dinofos" }], + ['ovl_En_Hata', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8089E8E0 : "ovl_En_Hata" }], + ['ovl_En_Zl1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8089ED90 : "ovl_En_Zl1" }], + ['ovl_En_Viewer', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8089EE20 : "ovl_En_Viewer" }], + ['ovl_En_Bubble', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8089F4E0 : "ovl_En_Bubble" }], + ['ovl_Door_Shutter', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A08F0 : "ovl_Door_Shutter" }], + ['ovl_En_Boom', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A24D0 : "ovl_En_Boom" }], + ['ovl_En_Torch2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A31B0 : "ovl_En_Torch2" }], + ['ovl_En_Minifrog', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A3670 : "ovl_En_Minifrog" }], + ['ovl_En_St', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A5050 : "ovl_En_St" }], + ['ovl_Obj_Wturn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A7930 : "ovl_Obj_Wturn" }], + ['ovl_En_River_Sound', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A7E30 : "ovl_En_River_Sound" }], + ['ovl_En_Ossan', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808A80A0 : "ovl_En_Ossan" }], + ['ovl_En_Famos', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808AC920 : "ovl_En_Famos" }], + ['ovl_En_Bombf', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808AE8C0 : "ovl_En_Bombf" }], + ['ovl_En_Am', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808AFCD0 : "ovl_En_Am" }], + ['ovl_En_Dekubaba', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808B1330 : "ovl_En_Dekubaba" }], + ['ovl_En_M_Fire1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808B5230 : "ovl_En_M_Fire1" }], + ['ovl_En_M_Thunder', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808B53C0 : "ovl_En_M_Thunder" }], + ['ovl_Bg_Breakwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808B7360 : "ovl_Bg_Breakwall" }], + ['ovl_Door_Warp1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808B8490 : "ovl_Door_Warp1" }], + ['ovl_Obj_Syokudai', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808BC010 : "ovl_Obj_Syokudai" }], + ['ovl_Item_B_Heart', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808BCDF0 : "ovl_Item_B_Heart" }], + ['ovl_En_Dekunuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808BD1E0 : "ovl_En_Dekunuts" }], + ['ovl_En_Bbfall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808BF220 : "ovl_En_Bbfall" }], + ['ovl_Arms_Hook', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808C1030 : "ovl_Arms_Hook" }], + ['ovl_En_Bb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808C1D40 : "ovl_En_Bb" }], + ['ovl_Bg_Keikoku_Spr', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808C3A50 : "ovl_Bg_Keikoku_Spr" }], + ['ovl_En_Wood02', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808C3C00 : "ovl_En_Wood02" }], + ['ovl_En_Death', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808C4F80 : "ovl_En_Death" }], + ['ovl_En_Minideath', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808CA0B0 : "ovl_En_Minideath" }], + ['ovl_En_Vm', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808CC260 : "ovl_En_Vm" }], + ['ovl_Demo_Effect', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808CD740 : "ovl_Demo_Effect" }], + ['ovl_Demo_Kankyo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808CE450 : "ovl_Demo_Kankyo" }], + ['ovl_En_Floormas', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808D0680 : "ovl_En_Floormas" }], + ['ovl_En_Rd', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808D3E20 : "ovl_En_Rd" }], + ['ovl_Bg_F40_Flift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808D7550 : "ovl_Bg_F40_Flift" }], + ['ovl_Obj_Mure', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808D78D0 : "ovl_Obj_Mure" }], + ['ovl_En_Sw', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808D8940 : "ovl_En_Sw" }], + ['ovl_Object_Kankyo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808DBE80 : "ovl_Object_Kankyo" }], + ['ovl_En_Horse_Link_Child', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808DE5C0 : "ovl_En_Horse_Link_Child" }], + ['ovl_Door_Ana', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E01A0 : "ovl_Door_Ana" }], + ['ovl_En_Encount1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E0830 : "ovl_En_Encount1" }], + ['ovl_Demo_Tre_Lgt', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E0E40 : "ovl_Demo_Tre_Lgt" }], + ['ovl_En_Encount2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E1560 : "ovl_En_Encount2" }], + ['ovl_En_Fire_Rock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E1FE0 : "ovl_En_Fire_Rock" }], + ['ovl_Bg_Ctower_Rot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E2070 : "ovl_Bg_Ctower_Rot" }], + ['ovl_Mir_Ray', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E2600 : "ovl_Mir_Ray" }], + ['ovl_En_Sb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E3EF0 : "ovl_En_Sb" }], + ['ovl_En_Bigslime', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808E4FC0 : "ovl_En_Bigslime" }], + ['ovl_En_Karebaba', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808F1200 : "ovl_En_Karebaba" }], + ['ovl_En_In', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808F30B0 : "ovl_En_In" }], + ['ovl_En_Bom_Chu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808F74B0 : "ovl_En_Bom_Chu" }], + ['ovl_En_Horse_Game_Check', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808F8AA0 : "ovl_En_Horse_Game_Check" }], + ['ovl_En_Rr', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808F9E00 : "ovl_En_Rr" }], + ['ovl_En_Fr', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808FC550 : "ovl_En_Fr" }], + ['ovl_En_Fishing', 'extracted/n64-us/baserom/', 'overlay', [], { 0x808FC6C0 : "ovl_En_Fishing" }], + ['ovl_Obj_Oshihiki', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80917290 : "ovl_Obj_Oshihiki" }], + ['ovl_Eff_Dust', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80918B40 : "ovl_Eff_Dust" }], + ['ovl_Bg_Umajump', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80919F30 : "ovl_Bg_Umajump" }], + ['ovl_En_Insect', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8091A8A0 : "ovl_En_Insect" }], + ['ovl_En_Butte', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8091C0A0 : "ovl_En_Butte" }], + ['ovl_En_Fish', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8091D630 : "ovl_En_Fish" }], + ['ovl_Item_Etcetera', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8091FEF0 : "ovl_Item_Etcetera" }], + ['ovl_Arrow_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80920340 : "ovl_Arrow_Fire" }], + ['ovl_Arrow_Ice', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80922430 : "ovl_Arrow_Ice" }], + ['ovl_Arrow_Light', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80924300 : "ovl_Arrow_Light" }], + ['ovl_Obj_Kibako', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809261B0 : "ovl_Obj_Kibako" }], + ['ovl_Obj_Tsubo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809275C0 : "ovl_Obj_Tsubo" }], + ['ovl_En_Ik', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80929910 : "ovl_En_Ik" }], + ['ovl_Demo_Shd', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8092C530 : "ovl_Demo_Shd" }], + ['ovl_En_Dns', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8092C5C0 : "ovl_En_Dns" }], + ['ovl_Elf_Msg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8092DF90 : "ovl_Elf_Msg" }], + ['ovl_En_Honotrap', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8092E510 : "ovl_En_Honotrap" }], + ['ovl_En_Tubo_Trap', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809307E0 : "ovl_En_Tubo_Trap" }], + ['ovl_Obj_Ice_Poly', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80931560 : "ovl_Obj_Ice_Poly" }], + ['ovl_En_Fz', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80932490 : "ovl_En_Fz" }], + ['ovl_En_Kusa', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809349E0 : "ovl_En_Kusa" }], + ['ovl_Obj_Bean', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80936CF0 : "ovl_Obj_Bean" }], + ['ovl_Obj_Bombiwa', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809393B0 : "ovl_Obj_Bombiwa" }], + ['ovl_Obj_Switch', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8093ABD0 : "ovl_Obj_Switch" }], + ['ovl_Obj_Lift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8093D3C0 : "ovl_Obj_Lift" }], + ['ovl_Obj_Hsblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8093DEA0 : "ovl_Obj_Hsblock" }], + ['ovl_En_Okarina_Tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8093E420 : "ovl_En_Okarina_Tag" }], + ['ovl_En_Goroiwa', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8093E8A0 : "ovl_En_Goroiwa" }], + ['ovl_En_Daiku', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809434B0 : "ovl_En_Daiku" }], + ['ovl_En_Nwc', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809441E0 : "ovl_En_Nwc" }], + ['ovl_Item_Inbox', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809454F0 : "ovl_Item_Inbox" }], + ['ovl_En_Ge1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80945650 : "ovl_En_Ge1" }], + ['ovl_Obj_Blockstop', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809466A0 : "ovl_Obj_Blockstop" }], + ['ovl_En_Sda', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809468D0 : "ovl_En_Sda" }], + ['ovl_En_Clear_Tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80947F60 : "ovl_En_Clear_Tag" }], + ['ovl_En_Gm', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8094DEE0 : "ovl_En_Gm" }], + ['ovl_En_Ms', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80952620 : "ovl_En_Ms" }], + ['ovl_En_Hs', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80952C50 : "ovl_En_Hs" }], + ['ovl_Bg_Ingate', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80953A90 : "ovl_Bg_Ingate" }], + ['ovl_En_Kanban', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80954960 : "ovl_En_Kanban" }], + ['ovl_En_Attack_Niw', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809580C0 : "ovl_En_Attack_Niw" }], + ['ovl_En_Mk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809592E0 : "ovl_En_Mk" }], + ['ovl_En_Owl', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8095A510 : "ovl_En_Owl" }], + ['ovl_En_Ishi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8095D6E0 : "ovl_En_Ishi" }], + ['ovl_Obj_Hana', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8095FB10 : "ovl_Obj_Hana" }], + ['ovl_Obj_Lightswitch', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8095FBF0 : "ovl_Obj_Lightswitch" }], + ['ovl_Obj_Mure2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80960CF0 : "ovl_Obj_Mure2" }], + ['ovl_En_Fu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809616E0 : "ovl_En_Fu" }], + ['ovl_En_Stream', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80965650 : "ovl_En_Stream" }], + ['ovl_En_Mm', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80965BB0 : "ovl_En_Mm" }], + ['ovl_En_Weather_Tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80966410 : "ovl_En_Weather_Tag" }], + ['ovl_En_Ani', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809679D0 : "ovl_En_Ani" }], + ['ovl_En_Js', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809687B0 : "ovl_En_Js" }], + ['ovl_En_Okarina_Effect', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8096B0A0 : "ovl_En_Okarina_Effect" }], + ['ovl_En_Mag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8096B310 : "ovl_En_Mag" }], + ['ovl_Elf_Msg2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8096EC40 : "ovl_Elf_Msg2" }], + ['ovl_Bg_F40_Swlift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8096F160 : "ovl_Bg_F40_Swlift" }], + ['ovl_En_Kakasi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8096F5E0 : "ovl_En_Kakasi" }], + ['ovl_Obj_Makeoshihiki', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80972350 : "ovl_Obj_Makeoshihiki" }], + ['ovl_Oceff_Spot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80972680 : "ovl_Oceff_Spot" }], + ['ovl_En_Torch', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80973550 : "ovl_En_Torch" }], + ['ovl_Shot_Sun', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80973640 : "ovl_Shot_Sun" }], + ['ovl_Obj_Roomtimer', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80973C50 : "ovl_Obj_Roomtimer" }], + ['ovl_En_Ssh', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80973EF0 : "ovl_En_Ssh" }], + ['ovl_Oceff_Wipe', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809764B0 : "ovl_Oceff_Wipe" }], + ['ovl_Effect_Ss_Dust', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80977210 : "ovl_Effect_Ss_Dust" }], + ['ovl_Effect_Ss_Kirakira', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80977A00 : "ovl_Effect_Ss_Kirakira" }], + ['ovl_Effect_Ss_Bomb2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80978070 : "ovl_Effect_Ss_Bomb2" }], + ['ovl_Effect_Ss_Blast', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809788D0 : "ovl_Effect_Ss_Blast" }], + ['ovl_Effect_Ss_G_Spk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80978C30 : "ovl_Effect_Ss_G_Spk" }], + ['ovl_Effect_Ss_D_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809791B0 : "ovl_Effect_Ss_D_Fire" }], + ['ovl_Effect_Ss_Bubble', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809795C0 : "ovl_Effect_Ss_Bubble" }], + ['ovl_Effect_Ss_G_Ripple', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80979B30 : "ovl_Effect_Ss_G_Ripple" }], + ['ovl_Effect_Ss_G_Splash', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097A050 : "ovl_Effect_Ss_G_Splash" }], + ['ovl_Effect_Ss_G_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097A470 : "ovl_Effect_Ss_G_Fire" }], + ['ovl_Effect_Ss_Lightning', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097A680 : "ovl_Effect_Ss_Lightning" }], + ['ovl_Effect_Ss_Dt_Bubble', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097AD60 : "ovl_Effect_Ss_Dt_Bubble" }], + ['ovl_Effect_Ss_Hahen', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097B270 : "ovl_Effect_Ss_Hahen" }], + ['ovl_Effect_Ss_Stick', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097B810 : "ovl_Effect_Ss_Stick" }], + ['ovl_Effect_Ss_Sibuki', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097BAD0 : "ovl_Effect_Ss_Sibuki" }], + ['ovl_Effect_Ss_Stone1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097C130 : "ovl_Effect_Ss_Stone1" }], + ['ovl_Effect_Ss_Hitmark', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097C490 : "ovl_Effect_Ss_Hitmark" }], + ['ovl_Effect_Ss_Fhg_Flash', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097C990 : "ovl_Effect_Ss_Fhg_Flash" }], + ['ovl_Effect_Ss_K_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097D410 : "ovl_Effect_Ss_K_Fire" }], + ['ovl_Effect_Ss_Solder_Srch_Ball', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097D850 : "ovl_Effect_Ss_Solder_Srch_Ball" }], + ['ovl_Effect_Ss_Kakera', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097DCA0 : "ovl_Effect_Ss_Kakera" }], + ['ovl_Effect_Ss_Ice_Piece', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097ECD0 : "ovl_Effect_Ss_Ice_Piece" }], + ['ovl_Effect_Ss_En_Ice', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097F0D0 : "ovl_Effect_Ss_En_Ice" }], + ['ovl_Effect_Ss_Fire_Tail', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097F880 : "ovl_Effect_Ss_Fire_Tail" }], + ['ovl_Effect_Ss_En_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8097FF60 : "ovl_Effect_Ss_En_Fire" }], + ['ovl_Effect_Ss_Extra', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809805D0 : "ovl_Effect_Ss_Extra" }], + ['ovl_Effect_Ss_Dead_Db', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80980940 : "ovl_Effect_Ss_Dead_Db" }], + ['ovl_Effect_Ss_Dead_Dd', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80980D50 : "ovl_Effect_Ss_Dead_Dd" }], + ['ovl_Effect_Ss_Dead_Ds', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809812E0 : "ovl_Effect_Ss_Dead_Ds" }], + ['ovl_Oceff_Storm', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80981760 : "ovl_Oceff_Storm" }], + ['ovl_Obj_Demo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80983520 : "ovl_Obj_Demo" }], + ['ovl_En_Minislime', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809838F0 : "ovl_En_Minislime" }], + ['ovl_En_Nutsball', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80985C40 : "ovl_En_Nutsball" }], + ['ovl_Oceff_Wipe2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80986270 : "ovl_Oceff_Wipe2" }], + ['ovl_Oceff_Wipe3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809879E0 : "ovl_Oceff_Wipe3" }], + ['ovl_En_Dg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80989140 : "ovl_En_Dg" }], + ['ovl_En_Si', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8098CA20 : "ovl_En_Si" }], + ['ovl_Obj_Comb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8098CE40 : "ovl_Obj_Comb" }], + ['ovl_Obj_Kibako2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8098E5C0 : "ovl_Obj_Kibako2" }], + ['ovl_En_Hs2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8098EF60 : "ovl_En_Hs2" }], + ['ovl_Obj_Mure3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8098F040 : "ovl_Obj_Mure3" }], + ['ovl_En_Tg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8098F800 : "ovl_En_Tg" }], + ['ovl_En_Wf', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80990310 : "ovl_En_Wf" }], + ['ovl_En_Skb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809947B0 : "ovl_En_Skb" }], + ['ovl_En_Gs', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80997A90 : "ovl_En_Gs" }], + ['ovl_Obj_Sound', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099A920 : "ovl_Obj_Sound" }], + ['ovl_En_Crow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099AB30 : "ovl_En_Crow" }], + ['ovl_En_Cow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099C290 : "ovl_En_Cow" }], + ['ovl_Oceff_Wipe4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099D780 : "ovl_Oceff_Wipe4" }], + ['ovl_En_Zo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099E790 : "ovl_En_Zo" }], + ['ovl_Effect_Ss_Ice_Smoke', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099F730 : "ovl_Effect_Ss_Ice_Smoke" }], + ['ovl_Obj_Makekinsuta', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099FA40 : "ovl_Obj_Makekinsuta" }], + ['ovl_En_Ge3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x8099FEB0 : "ovl_En_Ge3" }], + ['ovl_Obj_Hamishi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A0F20 : "ovl_Obj_Hamishi" }], + ['ovl_En_Zl4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A1BB0 : "ovl_En_Zl4" }], + ['ovl_En_Mm2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A2030 : "ovl_En_Mm2" }], + ['ovl_Door_Spiral', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A2B60 : "ovl_Door_Spiral" }], + ['ovl_Obj_Pzlblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A33E0 : "ovl_Obj_Pzlblock" }], + ['ovl_Obj_Toge', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A41C0 : "ovl_Obj_Toge" }], + ['ovl_Obj_Armos', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A4E00 : "ovl_Obj_Armos" }], + ['ovl_Obj_Boyo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A5D10 : "ovl_Obj_Boyo" }], + ['ovl_En_Grasshopper', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A6280 : "ovl_En_Grasshopper" }], + ['ovl_Obj_Grass', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809A9110 : "ovl_Obj_Grass" }], + ['ovl_Obj_Grass_Carry', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809AAE60 : "ovl_Obj_Grass_Carry" }], + ['ovl_Obj_Grass_Unit', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809ABDE0 : "ovl_Obj_Grass_Unit" }], + ['ovl_Bg_Fire_Wall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809AC4B0 : "ovl_Bg_Fire_Wall" }], + ['ovl_En_Bu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809ACD90 : "ovl_En_Bu" }], + ['ovl_En_Encount3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809ACF40 : "ovl_En_Encount3" }], + ['ovl_En_Jso', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809AD8E0 : "ovl_En_Jso" }], + ['ovl_Obj_Chikuwa', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809B1550 : "ovl_Obj_Chikuwa" }], + ['ovl_En_Knight', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809B20F0 : "ovl_En_Knight" }], + ['ovl_En_Warp_tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C0760 : "ovl_En_Warp_tag" }], + ['ovl_En_Aob_01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C10B0 : "ovl_En_Aob_01" }], + ['ovl_En_Boj_01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C3D80 : "ovl_En_Boj_01" }], + ['ovl_En_Boj_02', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C3E10 : "ovl_En_Boj_02" }], + ['ovl_En_Boj_03', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C3EA0 : "ovl_En_Boj_03" }], + ['ovl_En_Encount4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C3F30 : "ovl_En_Encount4" }], + ['ovl_En_Bom_Bowl_Man', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C4790 : "ovl_En_Bom_Bowl_Man" }], + ['ovl_En_Syateki_Man', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C64C0 : "ovl_En_Syateki_Man" }], + ['ovl_Bg_Icicle', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809C9A60 : "ovl_Bg_Icicle" }], + ['ovl_En_Syateki_Crow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CA3F0 : "ovl_En_Syateki_Crow" }], + ['ovl_En_Boj_04', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CB200 : "ovl_En_Boj_04" }], + ['ovl_En_Cne_01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CB290 : "ovl_En_Cne_01" }], + ['ovl_En_Bba_01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CC060 : "ovl_En_Bba_01" }], + ['ovl_En_Bji_01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CCDE0 : "ovl_En_Bji_01" }], + ['ovl_Bg_Spdweb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CDEC0 : "ovl_Bg_Spdweb" }], + ['ovl_En_Mt_tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809CF350 : "ovl_En_Mt_tag" }], + ['ovl_Boss_01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809D0530 : "ovl_Boss_01" }], + ['ovl_Boss_02', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809DA1D0 : "ovl_Boss_02" }], + ['ovl_Boss_03', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809E2760 : "ovl_Boss_03" }], + ['ovl_Boss_04', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809EC040 : "ovl_Boss_04" }], + ['ovl_Boss_05', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809EE4E0 : "ovl_Boss_05" }], + ['ovl_Boss_06', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809F2120 : "ovl_Boss_06" }], + ['ovl_Boss_07', 'extracted/n64-us/baserom/', 'overlay', [], { 0x809F4980 : "ovl_Boss_07" }], + ['ovl_Bg_Dy_Yoseizo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A0A8A0 : "ovl_Bg_Dy_Yoseizo" }], + ['ovl_En_Boj_05', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A0C780 : "ovl_En_Boj_05" }], + ['ovl_En_Sob1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A0C810 : "ovl_En_Sob1" }], + ['ovl_En_Go', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A10FD0 : "ovl_En_Go" }], + ['ovl_En_Raf', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A16D40 : "ovl_En_Raf" }], + ['ovl_Obj_Funen', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A19740 : "ovl_Obj_Funen" }], + ['ovl_Obj_Raillift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A19910 : "ovl_Obj_Raillift" }], + ['ovl_Bg_Numa_Hana', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A1A500 : "ovl_Bg_Numa_Hana" }], + ['ovl_Obj_Flowerpot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A1B3D0 : "ovl_Obj_Flowerpot" }], + ['ovl_Obj_Spinyroll', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A1DA50 : "ovl_Obj_Spinyroll" }], + ['ovl_Dm_Hina', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A1F410 : "ovl_Dm_Hina" }], + ['ovl_En_Syateki_Wf', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A1FE50 : "ovl_En_Syateki_Wf" }], + ['ovl_Obj_Skateblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A21150 : "ovl_Obj_Skateblock" }], + ['ovl_Effect_En_Ice_Block', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A22D40 : "ovl_Effect_En_Ice_Block" }], + ['ovl_Obj_Iceblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A23090 : "ovl_Obj_Iceblock" }], + ['ovl_En_Bigpamet', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A27520 : "ovl_En_Bigpamet" }], + ['ovl_Bg_Dblue_Movebg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A29A80 : "ovl_Bg_Dblue_Movebg" }], + ['ovl_En_Syateki_Dekunuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A2BC00 : "ovl_En_Syateki_Dekunuts" }], + ['ovl_Elf_Msg3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A2CD10 : "ovl_Elf_Msg3" }], + ['ovl_En_Fg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A2D280 : "ovl_En_Fg" }], + ['ovl_Dm_Ravine', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A2E7A0 : "ovl_Dm_Ravine" }], + ['ovl_Dm_Sa', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A2E960 : "ovl_Dm_Sa" }], + ['ovl_En_Slime', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A2EDA0 : "ovl_En_Slime" }], + ['ovl_En_Pr', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A32210 : "ovl_En_Pr" }], + ['ovl_Obj_Toudai', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A33B00 : "ovl_Obj_Toudai" }], + ['ovl_Obj_Entotu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A34700 : "ovl_Obj_Entotu" }], + ['ovl_Obj_Bell', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A35510 : "ovl_Obj_Bell" }], + ['ovl_En_Syateki_Okuta', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A35FF0 : "ovl_En_Syateki_Okuta" }], + ['ovl_Obj_Shutter', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A37ED0 : "ovl_Obj_Shutter" }], + ['ovl_Dm_Zl', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A38190 : "ovl_Dm_Zl" }], + ['ovl_En_Ru', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A389A0 : "ovl_En_Ru" }], + ['ovl_En_Elfgrp', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A396B0 : "ovl_En_Elfgrp" }], + ['ovl_Dm_Tsg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A3AC60 : "ovl_Dm_Tsg" }], + ['ovl_En_Baguo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A3B080 : "ovl_En_Baguo" }], + ['ovl_Obj_Vspinyroll', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A3C4E0 : "ovl_Obj_Vspinyroll" }], + ['ovl_Obj_Smork', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A3D680 : "ovl_Obj_Smork" }], + ['ovl_En_Test2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A3E390 : "ovl_En_Test2" }], + ['ovl_En_Test3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A3E7E0 : "ovl_En_Test3" }], + ['ovl_En_Test4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A41D70 : "ovl_En_Test4" }], + ['ovl_En_Bat', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A434E0 : "ovl_En_Bat" }], + ['ovl_En_Sekihi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A44C80 : "ovl_En_Sekihi" }], + ['ovl_En_Wiz', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A45360 : "ovl_En_Wiz" }], + ['ovl_En_Wiz_Brock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A48FE0 : "ovl_En_Wiz_Brock" }], + ['ovl_En_Wiz_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A496A0 : "ovl_En_Wiz_Fire" }], + ['ovl_Eff_Change', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4C490 : "ovl_Eff_Change" }], + ['ovl_Dm_Statue', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4C9B0 : "ovl_Dm_Statue" }], + ['ovl_Obj_Fireshield', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4CA90 : "ovl_Obj_Fireshield" }], + ['ovl_Bg_Ladder', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4D9F0 : "ovl_Bg_Ladder" }], + ['ovl_En_Mkk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4DED0 : "ovl_En_Mkk" }], + ['ovl_Demo_Getitem', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4FA40 : "ovl_Demo_Getitem" }], + ['ovl_En_Dnb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A4FDD0 : "ovl_En_Dnb" }], + ['ovl_En_Dnh', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A50D40 : "ovl_En_Dnh" }], + ['ovl_En_Dnk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A514F0 : "ovl_En_Dnk" }], + ['ovl_En_Dnq', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A52530 : "ovl_En_Dnq" }], + ['ovl_Bg_Keikoku_Saku', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A537D0 : "ovl_Bg_Keikoku_Saku" }], + ['ovl_Obj_Hugebombiwa', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A53BE0 : "ovl_Obj_Hugebombiwa" }], + ['ovl_En_Firefly2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A560C0 : "ovl_En_Firefly2" }], + ['ovl_En_Rat', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A56150 : "ovl_En_Rat" }], + ['ovl_En_Water_Effect', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A587A0 : "ovl_En_Water_Effect" }], + ['ovl_En_Kusa2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A5B160 : "ovl_En_Kusa2" }], + ['ovl_Bg_Spout_Fire', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A60B20 : "ovl_Bg_Spout_Fire" }], + ['ovl_En_Dy_Extra', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A612B0 : "ovl_En_Dy_Extra" }], + ['ovl_En_Bal', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A61810 : "ovl_En_Bal" }], + ['ovl_En_Ginko_Man', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A644A0 : "ovl_En_Ginko_Man" }], + ['ovl_En_Warp_Uzu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A66180 : "ovl_En_Warp_Uzu" }], + ['ovl_Obj_Driftice', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A66570 : "ovl_Obj_Driftice" }], + ['ovl_En_Look_Nuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A678B0 : "ovl_En_Look_Nuts" }], + ['ovl_En_Mushi2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A687A0 : "ovl_En_Mushi2" }], + ['ovl_En_Fall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A6BF90 : "ovl_En_Fall" }], + ['ovl_En_Mm3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A6F0A0 : "ovl_En_Mm3" }], + ['ovl_Bg_Crace_Movebg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A706F0 : "ovl_Bg_Crace_Movebg" }], + ['ovl_En_Dno', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A711D0 : "ovl_En_Dno" }], + ['ovl_En_Pr2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A73FA0 : "ovl_En_Pr2" }], + ['ovl_En_Prz', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A75DC0 : "ovl_En_Prz" }], + ['ovl_En_Jso2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A773C0 : "ovl_En_Jso2" }], + ['ovl_Obj_Etcetera', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A7BC70 : "ovl_Obj_Etcetera" }], + ['ovl_En_Egol', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A7C990 : "ovl_En_Egol" }], + ['ovl_Obj_Mine', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A811D0 : "ovl_Obj_Mine" }], + ['ovl_Obj_Purify', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A84CD0 : "ovl_Obj_Purify" }], + ['ovl_En_Tru', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A85620 : "ovl_En_Tru" }], + ['ovl_En_Trt', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A8B770 : "ovl_En_Trt" }], + ['ovl_En_Test5', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A903B0 : "ovl_En_Test5" }], + ['ovl_En_Test6', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A90730 : "ovl_En_Test6" }], + ['ovl_En_Az', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A94A30 : "ovl_En_Az" }], + ['ovl_En_Estone', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A99EA0 : "ovl_En_Estone" }], + ['ovl_Bg_Hakugin_Post', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A9ACD0 : "ovl_Bg_Hakugin_Post" }], + ['ovl_Dm_Opstage', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A9F950 : "ovl_Dm_Opstage" }], + ['ovl_Dm_Stk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80A9FDB0 : "ovl_Dm_Stk" }], + ['ovl_Dm_Char00', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AA5580 : "ovl_Dm_Char00" }], + ['ovl_Dm_Char01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AA81E0 : "ovl_Dm_Char01" }], + ['ovl_Dm_Char02', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AAAE30 : "ovl_Dm_Char02" }], + ['ovl_Dm_Char03', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AAB4A0 : "ovl_Dm_Char03" }], + ['ovl_Dm_Char04', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AABC40 : "ovl_Dm_Char04" }], + ['ovl_Dm_Char05', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AAC5A0 : "ovl_Dm_Char05" }], + ['ovl_Dm_Char06', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AAE680 : "ovl_Dm_Char06" }], + ['ovl_Dm_Char07', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AAE9C0 : "ovl_Dm_Char07" }], + ['ovl_Dm_Char08', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AAF050 : "ovl_Dm_Char08" }], + ['ovl_Dm_Char09', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AB1E10 : "ovl_Dm_Char09" }], + ['ovl_Obj_Tokeidai', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AB2790 : "ovl_Obj_Tokeidai" }], + ['ovl_En_Mnk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AB4D10 : "ovl_En_Mnk" }], + ['ovl_En_Egblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ABA7A0 : "ovl_En_Egblock" }], + ['ovl_En_Guard_Nuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ABB0E0 : "ovl_En_Guard_Nuts" }], + ['ovl_Bg_Hakugin_Bombwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ABBFC0 : "ovl_Bg_Hakugin_Bombwall" }], + ['ovl_Obj_Tokei_Tobira', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ABD1D0 : "ovl_Obj_Tokei_Tobira" }], + ['ovl_Bg_Hakugin_Elvpole', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ABD830 : "ovl_Bg_Hakugin_Elvpole" }], + ['ovl_En_Ma4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ABDCA0 : "ovl_En_Ma4" }], + ['ovl_En_Twig', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC0830 : "ovl_En_Twig" }], + ['ovl_En_Po_Fusen', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC1270 : "ovl_En_Po_Fusen" }], + ['ovl_En_Door_Etc', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC1ED0 : "ovl_En_Door_Etc" }], + ['ovl_En_Bigokuta', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC26F0 : "ovl_En_Bigokuta" }], + ['ovl_Bg_Icefloe', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC48F0 : "ovl_Bg_Icefloe" }], + ['ovl_fbdemo_triforce', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC5070 : "ovl_fbdemo_triforce" }], + ['ovl_fbdemo_wipe1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC57B0 : "ovl_fbdemo_wipe1" }], + ['ovl_fbdemo_wipe3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC6740 : "ovl_fbdemo_wipe3" }], + ['ovl_fbdemo_wipe4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC8430 : "ovl_fbdemo_wipe4" }], + ['ovl_fbdemo_wipe5', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC86F0 : "ovl_fbdemo_wipe5" }], + ['ovl_Effect_Ss_Sbn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC8B50 : "ovl_Effect_Ss_Sbn" }], + ['ovl_Obj_Ocarinalift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC94C0 : "ovl_Obj_Ocarinalift" }], + ['ovl_En_Time_Tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AC9EA0 : "ovl_En_Time_Tag" }], + ['ovl_Bg_Open_Shutter', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACAB10 : "ovl_Bg_Open_Shutter" }], + ['ovl_Bg_Open_Spot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACB1E0 : "ovl_Bg_Open_Spot" }], + ['ovl_Bg_Fu_Kaiten', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACB400 : "ovl_Bg_Fu_Kaiten" }], + ['ovl_Obj_Aqua', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACB6A0 : "ovl_Obj_Aqua" }], + ['ovl_En_Elforg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACC470 : "ovl_En_Elforg" }], + ['ovl_En_Elfbub', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACDCD0 : "ovl_En_Elfbub" }], + ['ovl_En_Fu_Mato', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACE330 : "ovl_En_Fu_Mato" }], + ['ovl_En_Fu_Kago', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ACF780 : "ovl_En_Fu_Kago" }], + ['ovl_En_Osn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD0830 : "ovl_En_Osn" }], + ['ovl_Bg_Ctower_Gear', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD2B70 : "ovl_Bg_Ctower_Gear" }], + ['ovl_En_Trt2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD3380 : "ovl_En_Trt2" }], + ['ovl_Obj_Tokei_Step', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD5BB0 : "ovl_Obj_Tokei_Step" }], + ['ovl_Bg_Lotus', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD6760 : "ovl_Bg_Lotus" }], + ['ovl_En_Kame', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD6DD0 : "ovl_En_Kame" }], + ['ovl_Obj_Takaraya_Wall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AD9240 : "ovl_Obj_Takaraya_Wall" }], + ['ovl_Bg_Fu_Mizu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ADAAF0 : "ovl_Bg_Fu_Mizu" }], + ['ovl_En_Sellnuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ADADD0 : "ovl_En_Sellnuts" }], + ['ovl_Bg_Dkjail_Ivy', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ADE230 : "ovl_Bg_Dkjail_Ivy" }], + ['ovl_Obj_Visiblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ADEA70 : "ovl_Obj_Visiblock" }], + ['ovl_En_Takaraya', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ADEB90 : "ovl_En_Takaraya" }], + ['ovl_En_Tsn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80ADFCA0 : "ovl_En_Tsn" }], + ['ovl_En_Ds2n', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AE1650 : "ovl_En_Ds2n" }], + ['ovl_En_Fsn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AE1B70 : "ovl_En_Fsn" }], + ['ovl_En_Shn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AE6130 : "ovl_En_Shn" }], + ['ovl_En_Stop_heishi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AE73A0 : "ovl_En_Stop_heishi" }], + ['ovl_Obj_Bigicicle', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AE8B70 : "ovl_Obj_Bigicicle" }], + ['ovl_En_Lift_Nuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AE9A20 : "ovl_En_Lift_Nuts" }], + ['ovl_En_Tk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AEC460 : "ovl_En_Tk" }], + ['ovl_Bg_Market_Step', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF0060 : "ovl_Bg_Market_Step" }], + ['ovl_Obj_Lupygamelift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF0170 : "ovl_Obj_Lupygamelift" }], + ['ovl_En_Test7', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF0820 : "ovl_En_Test7" }], + ['ovl_Obj_Lightblock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF3910 : "ovl_Obj_Lightblock" }], + ['ovl_Mir_Ray2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF3F70 : "ovl_Mir_Ray2" }], + ['ovl_En_Wdhand', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF43F0 : "ovl_En_Wdhand" }], + ['ovl_En_Gamelupy', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF6760 : "ovl_En_Gamelupy" }], + ['ovl_Bg_Danpei_Movebg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF6DE0 : "ovl_Bg_Danpei_Movebg" }], + ['ovl_En_Snowwd', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF7640 : "ovl_En_Snowwd" }], + ['ovl_En_Pm', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AF7B40 : "ovl_En_Pm" }], + ['ovl_En_Gakufu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AFC960 : "ovl_En_Gakufu" }], + ['ovl_Elf_Msg4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AFD380 : "ovl_Elf_Msg4" }], + ['ovl_Elf_Msg5', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AFD990 : "ovl_Elf_Msg5" }], + ['ovl_En_Col_Man', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AFDC40 : "ovl_En_Col_Man" }], + ['ovl_En_Talk_Gibud', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80AFE8A0 : "ovl_En_Talk_Gibud" }], + ['ovl_En_Giant', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B01990 : "ovl_En_Giant" }], + ['ovl_Obj_Snowball', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B02CD0 : "ovl_Obj_Snowball" }], + ['ovl_Boss_Hakugin', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B05290 : "ovl_Boss_Hakugin" }], + ['ovl_En_Gb2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B0F5E0 : "ovl_En_Gb2" }], + ['ovl_En_Onpuman', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B11E60 : "ovl_En_Onpuman" }], + ['ovl_Bg_Tobira01', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B12430 : "ovl_Bg_Tobira01" }], + ['ovl_En_Tag_Obj', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B12870 : "ovl_En_Tag_Obj" }], + ['ovl_Obj_Dhouse', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B12980 : "ovl_Obj_Dhouse" }], + ['ovl_Obj_Hakaisi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B14180 : "ovl_Obj_Hakaisi" }], + ['ovl_Bg_Hakugin_Switch', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B15790 : "ovl_Bg_Hakugin_Switch" }], + ['ovl_En_Snowman', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B16B00 : "ovl_En_Snowman" }], + ['ovl_TG_Sw', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B19F60 : "ovl_TG_Sw" }], + ['ovl_En_Po_Sisters', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B1A3B0 : "ovl_En_Po_Sisters" }], + ['ovl_En_Pp', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B1DEB0 : "ovl_En_Pp" }], + ['ovl_En_Hakurock', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B21B00 : "ovl_En_Hakurock" }], + ['ovl_En_Hanabi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B22C00 : "ovl_En_Hanabi" }], + ['ovl_Obj_Dowsing', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B23D50 : "ovl_Obj_Dowsing" }], + ['ovl_Obj_Wind', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B23ED0 : "ovl_Obj_Wind" }], + ['ovl_En_Racedog', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B24630 : "ovl_En_Racedog" }], + ['ovl_En_Kendo_Js', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B262A0 : "ovl_En_Kendo_Js" }], + ['ovl_Bg_Botihasira', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B28080 : "ovl_Bg_Botihasira" }], + ['ovl_En_Fish2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B28370 : "ovl_En_Fish2" }], + ['ovl_En_Pst', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B2B830 : "ovl_En_Pst" }], + ['ovl_En_Poh', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B2C6F0 : "ovl_En_Poh" }], + ['ovl_Obj_Spidertent', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B2FB10 : "ovl_Obj_Spidertent" }], + ['ovl_En_Zoraegg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B31590 : "ovl_En_Zoraegg" }], + ['ovl_En_Kbt', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B33D30 : "ovl_En_Kbt" }], + ['ovl_En_Gg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B34F70 : "ovl_En_Gg" }], + ['ovl_En_Maruta', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B37080 : "ovl_En_Maruta" }], + ['ovl_Obj_Snowball2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B38E20 : "ovl_Obj_Snowball2" }], + ['ovl_En_Gg2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B3AC50 : "ovl_En_Gg2" }], + ['ovl_Obj_Ghaka', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B3C260 : "ovl_Obj_Ghaka" }], + ['ovl_En_Dnp', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B3CA20 : "ovl_En_Dnp" }], + ['ovl_En_Dai', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B3DFF0 : "ovl_En_Dai" }], + ['ovl_Bg_Goron_Oyu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B40080 : "ovl_Bg_Goron_Oyu" }], + ['ovl_En_Kgy', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B40800 : "ovl_En_Kgy" }], + ['ovl_En_Invadepoh', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B439B0 : "ovl_En_Invadepoh" }], + ['ovl_En_Gk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B50410 : "ovl_En_Gk" }], + ['ovl_En_An', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B53840 : "ovl_En_An" }], + ['ovl_En_Bee', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B5A720 : "ovl_En_Bee" }], + ['ovl_En_Ot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B5B2E0 : "ovl_En_Ot" }], + ['ovl_En_Dragon', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B5E890 : "ovl_En_Dragon" }], + ['ovl_Obj_Dora', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B60AD0 : "ovl_Obj_Dora" }], + ['ovl_En_Bigpo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B615E0 : "ovl_En_Bigpo" }], + ['ovl_Obj_Kendo_Kanban', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B654C0 : "ovl_Obj_Kendo_Kanban" }], + ['ovl_Obj_Hariko', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B66A20 : "ovl_Obj_Hariko" }], + ['ovl_En_Sth', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B66D30 : "ovl_En_Sth" }], + ['ovl_Bg_Sinkai_Kabe', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B6D660 : "ovl_Bg_Sinkai_Kabe" }], + ['ovl_Bg_Haka_Curtain', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B6DBE0 : "ovl_Bg_Haka_Curtain" }], + ['ovl_Bg_Kin2_Bombwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B6E020 : "ovl_Bg_Kin2_Bombwall" }], + ['ovl_Bg_Kin2_Fence', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B6E820 : "ovl_Bg_Kin2_Fence" }], + ['ovl_Bg_Kin2_Picture', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B6EFA0 : "ovl_Bg_Kin2_Picture" }], + ['ovl_Bg_Kin2_Shelf', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B6FB30 : "ovl_Bg_Kin2_Shelf" }], + ['ovl_En_Rail_Skb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B708C0 : "ovl_En_Rail_Skb" }], + ['ovl_En_Jg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B73A90 : "ovl_En_Jg" }], + ['ovl_En_Tru_Mt', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B76030 : "ovl_En_Tru_Mt" }], + ['ovl_Obj_Um', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B77770 : "ovl_Obj_Um" }], + ['ovl_En_Neo_Reeba', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B7C890 : "ovl_En_Neo_Reeba" }], + ['ovl_Bg_Mbar_Chair', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B7E930 : "ovl_Bg_Mbar_Chair" }], + ['ovl_Bg_Ikana_Block', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B7EA60 : "ovl_Bg_Ikana_Block" }], + ['ovl_Bg_Ikana_Mirror', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B7F730 : "ovl_Bg_Ikana_Mirror" }], + ['ovl_Bg_Ikana_Rotaryroom', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B802E0 : "ovl_Bg_Ikana_Rotaryroom" }], + ['ovl_Bg_Dblue_Balance', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B823B0 : "ovl_Bg_Dblue_Balance" }], + ['ovl_Bg_Dblue_Waterfall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B83C80 : "ovl_Bg_Dblue_Waterfall" }], + ['ovl_En_Kaizoku', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B85590 : "ovl_En_Kaizoku" }], + ['ovl_En_Ge2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B8B2D0 : "ovl_En_Ge2" }], + ['ovl_En_Ma_Yts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B8D030 : "ovl_En_Ma_Yts" }], + ['ovl_En_Ma_Yto', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B8E520 : "ovl_En_Ma_Yto" }], + ['ovl_Obj_Tokei_Turret', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B91CC0 : "ovl_Obj_Tokei_Turret" }], + ['ovl_Bg_Dblue_Elevator', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B91F20 : "ovl_Bg_Dblue_Elevator" }], + ['ovl_Obj_Warpstone', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B92B10 : "ovl_Obj_Warpstone" }], + ['ovl_En_Zog', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B93310 : "ovl_En_Zog" }], + ['ovl_Obj_Rotlift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B95E20 : "ovl_Obj_Rotlift" }], + ['ovl_Obj_Jg_Gakki', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B961E0 : "ovl_Obj_Jg_Gakki" }], + ['ovl_Bg_Inibs_Movebg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B96410 : "ovl_Bg_Inibs_Movebg" }], + ['ovl_En_Zot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B965D0 : "ovl_En_Zot" }], + ['ovl_Obj_Tree', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9A0B0 : "ovl_Obj_Tree" }], + ['ovl_Obj_Y2lift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9A650 : "ovl_Obj_Y2lift" }], + ['ovl_Obj_Y2shutter', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9A980 : "ovl_Obj_Y2shutter" }], + ['ovl_Obj_Boat', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9AF50 : "ovl_Obj_Boat" }], + ['ovl_Obj_Taru', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9B6E0 : "ovl_Obj_Taru" }], + ['ovl_Obj_Hunsui', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9C450 : "ovl_Obj_Hunsui" }], + ['ovl_En_Jc_Mato', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9DEE0 : "ovl_En_Jc_Mato" }], + ['ovl_Mir_Ray3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9E2C0 : "ovl_Mir_Ray3" }], + ['ovl_En_Zob', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80B9F570 : "ovl_En_Zob" }], + ['ovl_Elf_Msg6', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BA15A0 : "ovl_Elf_Msg6" }], + ['ovl_Obj_Nozoki', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BA2420 : "ovl_Obj_Nozoki" }], + ['ovl_En_Toto', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BA36C0 : "ovl_En_Toto" }], + ['ovl_En_Railgibud', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BA5400 : "ovl_En_Railgibud" }], + ['ovl_En_Baba', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BA8820 : "ovl_En_Baba" }], + ['ovl_En_Suttari', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BAA6D0 : "ovl_En_Suttari" }], + ['ovl_En_Zod', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BAEF70 : "ovl_En_Zod" }], + ['ovl_En_Kujiya', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB08E0 : "ovl_En_Kujiya" }], + ['ovl_En_Geg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB16D0 : "ovl_En_Geg" }], + ['ovl_Obj_Kinoko', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB4700 : "ovl_Obj_Kinoko" }], + ['ovl_Obj_Yasi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB4AF0 : "ovl_Obj_Yasi" }], + ['ovl_En_Tanron1', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB4E00 : "ovl_En_Tanron1" }], + ['ovl_En_Tanron2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB67D0 : "ovl_En_Tanron2" }], + ['ovl_En_Tanron3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB85A0 : "ovl_En_Tanron3" }], + ['ovl_Obj_Chan', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BB98E0 : "ovl_Obj_Chan" }], + ['ovl_En_Zos', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BBACA0 : "ovl_En_Zos" }], + ['ovl_En_S_Goro', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BBCA80 : "ovl_En_S_Goro" }], + ['ovl_En_Nb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BBFDB0 : "ovl_En_Nb" }], + ['ovl_En_Ja', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC1900 : "ovl_En_Ja" }], + ['ovl_Bg_F40_Block', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC3980 : "ovl_Bg_F40_Block" }], + ['ovl_Bg_F40_Switch', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC47B0 : "ovl_Bg_F40_Switch" }], + ['ovl_En_Po_Composer', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC4F30 : "ovl_En_Po_Composer" }], + ['ovl_En_Guruguru', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC6BF0 : "ovl_En_Guruguru" }], + ['ovl_Oceff_Wipe5', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC7AD0 : "ovl_Oceff_Wipe5" }], + ['ovl_En_Stone_heishi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BC9270 : "ovl_En_Stone_heishi" }], + ['ovl_Oceff_Wipe6', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BCA5A0 : "ovl_Oceff_Wipe6" }], + ['ovl_En_Scopenuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BCABF0 : "ovl_En_Scopenuts" }], + ['ovl_En_Scopecrow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BCD000 : "ovl_En_Scopecrow" }], + ['ovl_Oceff_Wipe7', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BCDCB0 : "ovl_Oceff_Wipe7" }], + ['ovl_Eff_Kamejima_Wave', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BCEB20 : "ovl_Eff_Kamejima_Wave" }], + ['ovl_En_Hg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BCF1D0 : "ovl_En_Hg" }], + ['ovl_En_Hgo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD02B0 : "ovl_En_Hgo" }], + ['ovl_En_Zov', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD11E0 : "ovl_En_Zov" }], + ['ovl_En_Ah', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD2A30 : "ovl_En_Ah" }], + ['ovl_Obj_Hgdoor', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD4090 : "ovl_Obj_Hgdoor" }], + ['ovl_Bg_Ikana_Bombwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD4720 : "ovl_Bg_Ikana_Bombwall" }], + ['ovl_Bg_Ikana_Ray', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD53C0 : "ovl_Bg_Ikana_Ray" }], + ['ovl_Bg_Ikana_Shutter', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD5690 : "ovl_Bg_Ikana_Shutter" }], + ['ovl_Bg_Haka_Bombwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD5E00 : "ovl_Bg_Haka_Bombwall" }], + ['ovl_Bg_Haka_Tomb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD6580 : "ovl_Bg_Haka_Tomb" }], + ['ovl_En_Sc_Ruppe', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD6910 : "ovl_En_Sc_Ruppe" }], + ['ovl_Bg_Iknv_Doukutu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD6F10 : "ovl_Bg_Iknv_Doukutu" }], + ['ovl_Bg_Iknv_Obj', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD7AB0 : "ovl_Bg_Iknv_Obj" }], + ['ovl_En_Pamera', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BD82B0 : "ovl_En_Pamera" }], + ['ovl_Obj_HsStump', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BDAA30 : "ovl_Obj_HsStump" }], + ['ovl_En_Hidden_Nuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BDB040 : "ovl_En_Hidden_Nuts" }], + ['ovl_En_Zow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BDC270 : "ovl_En_Zow" }], + ['ovl_En_Talk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BDDFE0 : "ovl_En_Talk" }], + ['ovl_En_Al', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BDE1A0 : "ovl_En_Al" }], + ['ovl_En_Tab', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE04E0 : "ovl_En_Tab" }], + ['ovl_En_Nimotsu', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE1C80 : "ovl_En_Nimotsu" }], + ['ovl_En_Hit_Tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE2030 : "ovl_En_Hit_Tag" }], + ['ovl_En_Ruppecrow', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE2260 : "ovl_En_Ruppecrow" }], + ['ovl_En_Tanron4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE3B80 : "ovl_En_Tanron4" }], + ['ovl_En_Tanron5', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE4930 : "ovl_En_Tanron5" }], + ['ovl_En_Tanron6', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE6040 : "ovl_En_Tanron6" }], + ['ovl_En_Daiku2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE61D0 : "ovl_En_Daiku2" }], + ['ovl_En_Muto', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE7B00 : "ovl_En_Muto" }], + ['ovl_En_Baisen', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE84F0 : "ovl_En_Baisen" }], + ['ovl_En_Heishi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE8F20 : "ovl_En_Heishi" }], + ['ovl_En_Demo_heishi', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE9510 : "ovl_En_Demo_heishi" }], + ['ovl_En_Dt', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BE9B20 : "ovl_En_Dt" }], + ['ovl_En_Cha', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BEB520 : "ovl_En_Cha" }], + ['ovl_Obj_Dinner', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BEB940 : "ovl_Obj_Dinner" }], + ['ovl_Eff_Lastday', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BEBAC0 : "ovl_Eff_Lastday" }], + ['ovl_Bg_Ikana_Dharma', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BEC240 : "ovl_Bg_Ikana_Dharma" }], + ['ovl_En_Akindonuts', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BECBE0 : "ovl_En_Akindonuts" }], + ['ovl_Eff_Stk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BF0D90 : "ovl_Eff_Stk" }], + ['ovl_En_Ig', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BF1150 : "ovl_En_Ig" }], + ['ovl_En_Rg', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BF3920 : "ovl_En_Rg" }], + ['ovl_En_Osk', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BF5C20 : "ovl_En_Osk" }], + ['ovl_En_Sth2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BF74E0 : "ovl_En_Sth2" }], + ['ovl_En_Yb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BFA100 : "ovl_En_Yb" }], + ['ovl_En_Rz', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BFB480 : "ovl_En_Rz" }], + ['ovl_En_Scopecoin', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BFCFA0 : "ovl_En_Scopecoin" }], + ['ovl_En_Bjt', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BFD2E0 : "ovl_En_Bjt" }], + ['ovl_En_Bomjima', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80BFE170 : "ovl_En_Bomjima" }], + ['ovl_En_Bomjimb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C00EA0 : "ovl_En_Bomjimb" }], + ['ovl_En_Bombers', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C03530 : "ovl_En_Bombers" }], + ['ovl_En_Bombers2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C04930 : "ovl_En_Bombers2" }], + ['ovl_En_Bombal', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C05A70 : "ovl_En_Bombal" }], + ['ovl_Obj_Moon_Stone', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C06510 : "ovl_Obj_Moon_Stone" }], + ['ovl_Obj_Mu_Pict', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C06AA0 : "ovl_Obj_Mu_Pict" }], + ['ovl_Bg_Ikninside', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C07110 : "ovl_Bg_Ikninside" }], + ['ovl_Eff_Zoraband', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C07740 : "ovl_Eff_Zoraband" }], + ['ovl_Obj_Kepn_Koya', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C07B20 : "ovl_Obj_Kepn_Koya" }], + ['ovl_Obj_Usiyane', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C07C80 : "ovl_Obj_Usiyane" }], + ['ovl_En_Nnh', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C08760 : "ovl_En_Nnh" }], + ['ovl_Obj_Kzsaku', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C08A80 : "ovl_Obj_Kzsaku" }], + ['ovl_Obj_Milk_Bin', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C08E40 : "ovl_Obj_Milk_Bin" }], + ['ovl_En_Kitan', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C090D0 : "ovl_En_Kitan" }], + ['ovl_Bg_Astr_Bombwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C09ED0 : "ovl_Bg_Astr_Bombwall" }], + ['ovl_Bg_Iknin_Susceil', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C0A740 : "ovl_Bg_Iknin_Susceil" }], + ['ovl_En_Bsb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C0B290 : "ovl_En_Bsb" }], + ['ovl_En_Recepgirl', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C0FFD0 : "ovl_En_Recepgirl" }], + ['ovl_En_Thiefbird', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C10770 : "ovl_En_Thiefbird" }], + ['ovl_En_Jgame_Tsn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C13930 : "ovl_En_Jgame_Tsn" }], + ['ovl_Obj_Jgame_Light', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C152F0 : "ovl_Obj_Jgame_Light" }], + ['ovl_Obj_Yado', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C161E0 : "ovl_Obj_Yado" }], + ['ovl_Demo_Syoten', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C16480 : "ovl_Demo_Syoten" }], + ['ovl_Demo_Moonend', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C17A10 : "ovl_Demo_Moonend" }], + ['ovl_Bg_Lbfshot', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C18120 : "ovl_Bg_Lbfshot" }], + ['ovl_Bg_Last_Bwall', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C18240 : "ovl_Bg_Last_Bwall" }], + ['ovl_En_And', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C18B90 : "ovl_En_And" }], + ['ovl_En_Invadepoh_Demo', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C192A0 : "ovl_En_Invadepoh_Demo" }], + ['ovl_Obj_Danpeilift', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1ADC0 : "ovl_Obj_Danpeilift" }], + ['ovl_En_Fall2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1B640 : "ovl_En_Fall2" }], + ['ovl_Dm_Al', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1BD90 : "ovl_Dm_Al" }], + ['ovl_Dm_An', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1C410 : "ovl_Dm_An" }], + ['ovl_Dm_Ah', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1D410 : "ovl_Dm_Ah" }], + ['ovl_Dm_Nb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1DED0 : "ovl_Dm_Nb" }], + ['ovl_En_Drs', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1E290 : "ovl_En_Drs" }], + ['ovl_En_Ending_Hero', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1E690 : "ovl_En_Ending_Hero" }], + ['ovl_Dm_Bal', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1E9E0 : "ovl_Dm_Bal" }], + ['ovl_En_Paper', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1F3D0 : "ovl_En_Paper" }], + ['ovl_En_Hint_Skb', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C1FCF0 : "ovl_En_Hint_Skb" }], + ['ovl_Dm_Tag', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C22350 : "ovl_Dm_Tag" }], + ['ovl_En_Bh', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C22D40 : "ovl_En_Bh" }], + ['ovl_En_Ending_Hero2', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C23230 : "ovl_En_Ending_Hero2" }], + ['ovl_En_Ending_Hero3', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C23460 : "ovl_En_Ending_Hero3" }], + ['ovl_En_Ending_Hero4', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C23690 : "ovl_En_Ending_Hero4" }], + ['ovl_En_Ending_Hero5', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C238C0 : "ovl_En_Ending_Hero5" }], + ['ovl_En_Ending_Hero6', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C23C90 : "ovl_En_Ending_Hero6" }], + ['ovl_Dm_Gm', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C24360 : "ovl_Dm_Gm" }], + ['ovl_Obj_Swprize', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C25360 : "ovl_Obj_Swprize" }], + ['ovl_En_Invisible_Ruppe', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C258A0 : "ovl_En_Invisible_Ruppe" }], + ['ovl_Obj_Ending', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C25BC0 : "ovl_Obj_Ending" }], + ['ovl_En_Rsn', 'extracted/n64-us/baserom/', 'overlay', [], { 0x80C25D40 : "ovl_En_Rsn" }], ] diff --git a/tools/extract_baserom.py b/tools/extract_baserom.py deleted file mode 100755 index a467c5b396..0000000000 --- a/tools/extract_baserom.py +++ /dev/null @@ -1,1618 +0,0 @@ -#!/usr/bin/env python3 - -import os, struct, sys - -ROM_FILE_NAME = 'baserom_uncompressed.z64' -FILE_TABLE_OFFSET = 0x1A500 # 0x1C110 for JP1.0, 0x1C050 for JP1.1, 0x24F60 for debug - -FILE_NAMES = [ - 'makerom', - 'boot', - 'dmadata', - 'Audiobank', - 'Audioseq', - 'Audiotable', - 'kanji', - 'link_animetion', - 'icon_item_static_syms', - 'icon_item_24_static_syms', - 'icon_item_field_static', - 'icon_item_dungeon_static', - 'icon_item_gameover_static', - 'icon_item_jpn_static', - 'icon_item_vtx_static', - 'map_i_static', - 'map_grand_static', - 'item_name_static', - 'map_name_static', - 'icon_item_static_yar', - 'icon_item_24_static_yar', - 'schedule_dma_static_syms', - 'schedule_dma_static_yar', - 'schedule_static', - 'story_static', - 'do_action_static', - 'message_static', - 'message_texture_static', - 'nes_font_static', - 'message_data_static', - 'staff_message_data_static', - 'code', - 'ovl_title', - 'ovl_select', - 'ovl_opening', - 'ovl_file_choose', - 'ovl_daytelop', - 'ovl_kaleido_scope', - 'ovl_player_actor', - 'ovl_En_Test', - 'ovl_En_GirlA', - 'ovl_En_Part', - 'ovl_En_Light', - 'ovl_En_Door', - 'ovl_En_Box', - 'ovl_En_Pametfrog', - 'ovl_En_Okuta', - 'ovl_En_Bom', - 'ovl_En_Wallmas', - 'ovl_En_Dodongo', - 'ovl_En_Firefly', - 'ovl_En_Horse', - 'ovl_En_Arrow', - 'ovl_En_Elf', - 'ovl_En_Niw', - 'ovl_En_Tite', - 'ovl_En_Peehat', - 'ovl_En_Holl', - 'ovl_En_Dinofos', - 'ovl_En_Hata', - 'ovl_En_Zl1', - 'ovl_En_Viewer', - 'ovl_En_Bubble', - 'ovl_Door_Shutter', - 'ovl_En_Boom', - 'ovl_En_Torch2', - 'ovl_En_Minifrog', - 'ovl_En_St', - 'ovl_Obj_Wturn', - 'ovl_En_River_Sound', - 'ovl_En_Ossan', - 'ovl_En_Famos', - 'ovl_En_Bombf', - 'ovl_En_Am', - 'ovl_En_Dekubaba', - 'ovl_En_M_Fire1', - 'ovl_En_M_Thunder', - 'ovl_Bg_Breakwall', - 'ovl_Door_Warp1', - 'ovl_Obj_Syokudai', - 'ovl_Item_B_Heart', - 'ovl_En_Dekunuts', - 'ovl_En_Bbfall', - 'ovl_Arms_Hook', - 'ovl_En_Bb', - 'ovl_Bg_Keikoku_Spr', - 'ovl_En_Wood02', - 'ovl_En_Death', - 'ovl_En_Minideath', - 'ovl_En_Vm', - 'ovl_Demo_Effect', - 'ovl_Demo_Kankyo', - 'ovl_En_Floormas', - 'ovl_En_Rd', - 'ovl_Bg_F40_Flift', - 'ovl_Obj_Mure', - 'ovl_En_Sw', - 'ovl_Object_Kankyo', - 'ovl_En_Horse_Link_Child', - 'ovl_Door_Ana', - 'ovl_En_Encount1', - 'ovl_Demo_Tre_Lgt', - 'ovl_En_Encount2', - 'ovl_En_Fire_Rock', - 'ovl_Bg_Ctower_Rot', - 'ovl_Mir_Ray', - 'ovl_En_Sb', - 'ovl_En_Bigslime', - 'ovl_En_Karebaba', - 'ovl_En_In', - 'ovl_En_Bom_Chu', - 'ovl_En_Horse_Game_Check', - 'ovl_En_Rr', - 'ovl_En_Fr', - 'ovl_En_Fishing', - 'ovl_Obj_Oshihiki', - 'ovl_Eff_Dust', - 'ovl_Bg_Umajump', - 'ovl_En_Insect', - 'ovl_En_Butte', - 'ovl_En_Fish', - 'ovl_Item_Etcetera', - 'ovl_Arrow_Fire', - 'ovl_Arrow_Ice', - 'ovl_Arrow_Light', - 'ovl_Obj_Kibako', - 'ovl_Obj_Tsubo', - 'ovl_En_Ik', - 'ovl_Demo_Shd', - 'ovl_En_Dns', - 'ovl_Elf_Msg', - 'ovl_En_Honotrap', - 'ovl_En_Tubo_Trap', - 'ovl_Obj_Ice_Poly', - 'ovl_En_Fz', - 'ovl_En_Kusa', - 'ovl_Obj_Bean', - 'ovl_Obj_Bombiwa', - 'ovl_Obj_Switch', - 'ovl_Obj_Lift', - 'ovl_Obj_Hsblock', - 'ovl_En_Okarina_Tag', - 'ovl_En_Goroiwa', - 'ovl_En_Daiku', - 'ovl_En_Nwc', - 'ovl_Item_Inbox', - 'ovl_En_Ge1', - 'ovl_Obj_Blockstop', - 'ovl_En_Sda', - 'ovl_En_Clear_Tag', - 'ovl_En_Gm', - 'ovl_En_Ms', - 'ovl_En_Hs', - 'ovl_Bg_Ingate', - 'ovl_En_Kanban', - 'ovl_En_Attack_Niw', - 'ovl_En_Mk', - 'ovl_En_Owl', - 'ovl_En_Ishi', - 'ovl_Obj_Hana', - 'ovl_Obj_Lightswitch', - 'ovl_Obj_Mure2', - 'ovl_En_Fu', - 'ovl_En_Stream', - 'ovl_En_Mm', - 'ovl_En_Weather_Tag', - 'ovl_En_Ani', - 'ovl_En_Js', - 'ovl_En_Okarina_Effect', - 'ovl_En_Mag', - 'ovl_Elf_Msg2', - 'ovl_Bg_F40_Swlift', - 'ovl_En_Kakasi', - 'ovl_Obj_Makeoshihiki', - 'ovl_Oceff_Spot', - 'ovl_En_Torch', - 'ovl_Shot_Sun', - 'ovl_Obj_Roomtimer', - 'ovl_En_Ssh', - 'ovl_Oceff_Wipe', - 'ovl_Effect_Ss_Dust', - 'ovl_Effect_Ss_Kirakira', - 'ovl_Effect_Ss_Bomb2', - 'ovl_Effect_Ss_Blast', - 'ovl_Effect_Ss_G_Spk', - 'ovl_Effect_Ss_D_Fire', - 'ovl_Effect_Ss_Bubble', - 'ovl_Effect_Ss_G_Ripple', - 'ovl_Effect_Ss_G_Splash', - 'ovl_Effect_Ss_G_Fire', - 'ovl_Effect_Ss_Lightning', - 'ovl_Effect_Ss_Dt_Bubble', - 'ovl_Effect_Ss_Hahen', - 'ovl_Effect_Ss_Stick', - 'ovl_Effect_Ss_Sibuki', - 'ovl_Effect_Ss_Stone1', - 'ovl_Effect_Ss_Hitmark', - 'ovl_Effect_Ss_Fhg_Flash', - 'ovl_Effect_Ss_K_Fire', - 'ovl_Effect_Ss_Solder_Srch_Ball', - 'ovl_Effect_Ss_Kakera', - 'ovl_Effect_Ss_Ice_Piece', - 'ovl_Effect_Ss_En_Ice', - 'ovl_Effect_Ss_Fire_Tail', - 'ovl_Effect_Ss_En_Fire', - 'ovl_Effect_Ss_Extra', - 'ovl_Effect_Ss_Dead_Db', - 'ovl_Effect_Ss_Dead_Dd', - 'ovl_Effect_Ss_Dead_Ds', - 'ovl_Oceff_Storm', - 'ovl_Obj_Demo', - 'ovl_En_Minislime', - 'ovl_En_Nutsball', - 'ovl_Oceff_Wipe2', - 'ovl_Oceff_Wipe3', - 'ovl_En_Dg', - 'ovl_En_Si', - 'ovl_Obj_Comb', - 'ovl_Obj_Kibako2', - 'ovl_En_Hs2', - 'ovl_Obj_Mure3', - 'ovl_En_Tg', - 'ovl_En_Wf', - 'ovl_En_Skb', - 'ovl_En_Gs', - 'ovl_Obj_Sound', - 'ovl_En_Crow', - 'ovl_En_Cow', - 'ovl_Oceff_Wipe4', - 'ovl_En_Zo', - 'ovl_Effect_Ss_Ice_Smoke', - 'ovl_Obj_Makekinsuta', - 'ovl_En_Ge3', - 'ovl_Obj_Hamishi', - 'ovl_En_Zl4', - 'ovl_En_Mm2', - 'ovl_Door_Spiral', - 'ovl_Obj_Pzlblock', - 'ovl_Obj_Toge', - 'ovl_Obj_Armos', - 'ovl_Obj_Boyo', - 'ovl_En_Grasshopper', - 'ovl_Obj_Grass', - 'ovl_Obj_Grass_Carry', - 'ovl_Obj_Grass_Unit', - 'ovl_Bg_Fire_Wall', - 'ovl_En_Bu', - 'ovl_En_Encount3', - 'ovl_En_Jso', - 'ovl_Obj_Chikuwa', - 'ovl_En_Knight', - 'ovl_En_Warp_tag', - 'ovl_En_Aob_01', - 'ovl_En_Boj_01', - 'ovl_En_Boj_02', - 'ovl_En_Boj_03', - 'ovl_En_Encount4', - 'ovl_En_Bom_Bowl_Man', - 'ovl_En_Syateki_Man', - 'ovl_Bg_Icicle', - 'ovl_En_Syateki_Crow', - 'ovl_En_Boj_04', - 'ovl_En_Cne_01', - 'ovl_En_Bba_01', - 'ovl_En_Bji_01', - 'ovl_Bg_Spdweb', - 'ovl_En_Mt_tag', - 'ovl_Boss_01', - 'ovl_Boss_02', - 'ovl_Boss_03', - 'ovl_Boss_04', - 'ovl_Boss_05', - 'ovl_Boss_06', - 'ovl_Boss_07', - 'ovl_Bg_Dy_Yoseizo', - 'ovl_En_Boj_05', - 'ovl_En_Sob1', - 'ovl_En_Go', - 'ovl_En_Raf', - 'ovl_Obj_Funen', - 'ovl_Obj_Raillift', - 'ovl_Bg_Numa_Hana', - 'ovl_Obj_Flowerpot', - 'ovl_Obj_Spinyroll', - 'ovl_Dm_Hina', - 'ovl_En_Syateki_Wf', - 'ovl_Obj_Skateblock', - 'ovl_Effect_En_Ice_Block', - 'ovl_Obj_Iceblock', - 'ovl_En_Bigpamet', - 'ovl_Bg_Dblue_Movebg', - 'ovl_En_Syateki_Dekunuts', - 'ovl_Elf_Msg3', - 'ovl_En_Fg', - 'ovl_Dm_Ravine', - 'ovl_Dm_Sa', - 'ovl_En_Slime', - 'ovl_En_Pr', - 'ovl_Obj_Toudai', - 'ovl_Obj_Entotu', - 'ovl_Obj_Bell', - 'ovl_En_Syateki_Okuta', - 'ovl_Obj_Shutter', - 'ovl_Dm_Zl', - 'ovl_En_Ru', - 'ovl_En_Elfgrp', - 'ovl_Dm_Tsg', - 'ovl_En_Baguo', - 'ovl_Obj_Vspinyroll', - 'ovl_Obj_Smork', - 'ovl_En_Test2', - 'ovl_En_Test3', - 'ovl_En_Test4', - 'ovl_En_Bat', - 'ovl_En_Sekihi', - 'ovl_En_Wiz', - 'ovl_En_Wiz_Brock', - 'ovl_En_Wiz_Fire', - 'ovl_Eff_Change', - 'ovl_Dm_Statue', - 'ovl_Obj_Fireshield', - 'ovl_Bg_Ladder', - 'ovl_En_Mkk', - 'ovl_Demo_Getitem', - 'ovl_En_Dnb', - 'ovl_En_Dnh', - 'ovl_En_Dnk', - 'ovl_En_Dnq', - 'ovl_Bg_Keikoku_Saku', - 'ovl_Obj_Hugebombiwa', - 'ovl_En_Firefly2', - 'ovl_En_Rat', - 'ovl_En_Water_Effect', - 'ovl_En_Kusa2', - 'ovl_Bg_Spout_Fire', - 'ovl_En_Dy_Extra', - 'ovl_En_Bal', - 'ovl_En_Ginko_Man', - 'ovl_En_Warp_Uzu', - 'ovl_Obj_Driftice', - 'ovl_En_Look_Nuts', - 'ovl_En_Mushi2', - 'ovl_En_Fall', - 'ovl_En_Mm3', - 'ovl_Bg_Crace_Movebg', - 'ovl_En_Dno', - 'ovl_En_Pr2', - 'ovl_En_Prz', - 'ovl_En_Jso2', - 'ovl_Obj_Etcetera', - 'ovl_En_Egol', - 'ovl_Obj_Mine', - 'ovl_Obj_Purify', - 'ovl_En_Tru', - 'ovl_En_Trt', - 'ovl_En_Test5', - 'ovl_En_Test6', - 'ovl_En_Az', - 'ovl_En_Estone', - 'ovl_Bg_Hakugin_Post', - 'ovl_Dm_Opstage', - 'ovl_Dm_Stk', - 'ovl_Dm_Char00', - 'ovl_Dm_Char01', - 'ovl_Dm_Char02', - 'ovl_Dm_Char03', - 'ovl_Dm_Char04', - 'ovl_Dm_Char05', - 'ovl_Dm_Char06', - 'ovl_Dm_Char07', - 'ovl_Dm_Char08', - 'ovl_Dm_Char09', - 'ovl_Obj_Tokeidai', - 'ovl_En_Mnk', - 'ovl_En_Egblock', - 'ovl_En_Guard_Nuts', - 'ovl_Bg_Hakugin_Bombwall', - 'ovl_Obj_Tokei_Tobira', - 'ovl_Bg_Hakugin_Elvpole', - 'ovl_En_Ma4', - 'ovl_En_Twig', - 'ovl_En_Po_Fusen', - 'ovl_En_Door_Etc', - 'ovl_En_Bigokuta', - 'ovl_Bg_Icefloe', - 'ovl_fbdemo_triforce', - 'ovl_fbdemo_wipe1', - 'ovl_fbdemo_wipe3', - 'ovl_fbdemo_wipe4', - 'ovl_fbdemo_wipe5', - 'ovl_Effect_Ss_Sbn', - 'ovl_Obj_Ocarinalift', - 'ovl_En_Time_Tag', - 'ovl_Bg_Open_Shutter', - 'ovl_Bg_Open_Spot', - 'ovl_Bg_Fu_Kaiten', - 'ovl_Obj_Aqua', - 'ovl_En_Elforg', - 'ovl_En_Elfbub', - 'ovl_En_Fu_Mato', - 'ovl_En_Fu_Kago', - 'ovl_En_Osn', - 'ovl_Bg_Ctower_Gear', - 'ovl_En_Trt2', - 'ovl_Obj_Tokei_Step', - 'ovl_Bg_Lotus', - 'ovl_En_Kame', - 'ovl_Obj_Takaraya_Wall', - 'ovl_Bg_Fu_Mizu', - 'ovl_En_Sellnuts', - 'ovl_Bg_Dkjail_Ivy', - 'ovl_Obj_Visiblock', - 'ovl_En_Takaraya', - 'ovl_En_Tsn', - 'ovl_En_Ds2n', - 'ovl_En_Fsn', - 'ovl_En_Shn', - 'ovl_En_Stop_heishi', - 'ovl_Obj_Bigicicle', - 'ovl_En_Lift_Nuts', - 'ovl_En_Tk', - 'ovl_Bg_Market_Step', - 'ovl_Obj_Lupygamelift', - 'ovl_En_Test7', - 'ovl_Obj_Lightblock', - 'ovl_Mir_Ray2', - 'ovl_En_Wdhand', - 'ovl_En_Gamelupy', - 'ovl_Bg_Danpei_Movebg', - 'ovl_En_Snowwd', - 'ovl_En_Pm', - 'ovl_En_Gakufu', - 'ovl_Elf_Msg4', - 'ovl_Elf_Msg5', - 'ovl_En_Col_Man', - 'ovl_En_Talk_Gibud', - 'ovl_En_Giant', - 'ovl_Obj_Snowball', - 'ovl_Boss_Hakugin', - 'ovl_En_Gb2', - 'ovl_En_Onpuman', - 'ovl_Bg_Tobira01', - 'ovl_En_Tag_Obj', - 'ovl_Obj_Dhouse', - 'ovl_Obj_Hakaisi', - 'ovl_Bg_Hakugin_Switch', - 'ovl_En_Snowman', - 'ovl_TG_Sw', - 'ovl_En_Po_Sisters', - 'ovl_En_Pp', - 'ovl_En_Hakurock', - 'ovl_En_Hanabi', - 'ovl_Obj_Dowsing', - 'ovl_Obj_Wind', - 'ovl_En_Racedog', - 'ovl_En_Kendo_Js', - 'ovl_Bg_Botihasira', - 'ovl_En_Fish2', - 'ovl_En_Pst', - 'ovl_En_Poh', - 'ovl_Obj_Spidertent', - 'ovl_En_Zoraegg', - 'ovl_En_Kbt', - 'ovl_En_Gg', - 'ovl_En_Maruta', - 'ovl_Obj_Snowball2', - 'ovl_En_Gg2', - 'ovl_Obj_Ghaka', - 'ovl_En_Dnp', - 'ovl_En_Dai', - 'ovl_Bg_Goron_Oyu', - 'ovl_En_Kgy', - 'ovl_En_Invadepoh', - 'ovl_En_Gk', - 'ovl_En_An', - 'ovl_En_Bee', - 'ovl_En_Ot', - 'ovl_En_Dragon', - 'ovl_Obj_Dora', - 'ovl_En_Bigpo', - 'ovl_Obj_Kendo_Kanban', - 'ovl_Obj_Hariko', - 'ovl_En_Sth', - 'ovl_Bg_Sinkai_Kabe', - 'ovl_Bg_Haka_Curtain', - 'ovl_Bg_Kin2_Bombwall', - 'ovl_Bg_Kin2_Fence', - 'ovl_Bg_Kin2_Picture', - 'ovl_Bg_Kin2_Shelf', - 'ovl_En_Rail_Skb', - 'ovl_En_Jg', - 'ovl_En_Tru_Mt', - 'ovl_Obj_Um', - 'ovl_En_Neo_Reeba', - 'ovl_Bg_Mbar_Chair', - 'ovl_Bg_Ikana_Block', - 'ovl_Bg_Ikana_Mirror', - 'ovl_Bg_Ikana_Rotaryroom', - 'ovl_Bg_Dblue_Balance', - 'ovl_Bg_Dblue_Waterfall', - 'ovl_En_Kaizoku', - 'ovl_En_Ge2', - 'ovl_En_Ma_Yts', - 'ovl_En_Ma_Yto', - 'ovl_Obj_Tokei_Turret', - 'ovl_Bg_Dblue_Elevator', - 'ovl_Obj_Warpstone', - 'ovl_En_Zog', - 'ovl_Obj_Rotlift', - 'ovl_Obj_Jg_Gakki', - 'ovl_Bg_Inibs_Movebg', - 'ovl_En_Zot', - 'ovl_Obj_Tree', - 'ovl_Obj_Y2lift', - 'ovl_Obj_Y2shutter', - 'ovl_Obj_Boat', - 'ovl_Obj_Taru', - 'ovl_Obj_Hunsui', - 'ovl_En_Jc_Mato', - 'ovl_Mir_Ray3', - 'ovl_En_Zob', - 'ovl_Elf_Msg6', - 'ovl_Obj_Nozoki', - 'ovl_En_Toto', - 'ovl_En_Railgibud', - 'ovl_En_Baba', - 'ovl_En_Suttari', - 'ovl_En_Zod', - 'ovl_En_Kujiya', - 'ovl_En_Geg', - 'ovl_Obj_Kinoko', - 'ovl_Obj_Yasi', - 'ovl_En_Tanron1', - 'ovl_En_Tanron2', - 'ovl_En_Tanron3', - 'ovl_Obj_Chan', - 'ovl_En_Zos', - 'ovl_En_S_Goro', - 'ovl_En_Nb', - 'ovl_En_Ja', - 'ovl_Bg_F40_Block', - 'ovl_Bg_F40_Switch', - 'ovl_En_Po_Composer', - 'ovl_En_Guruguru', - 'ovl_Oceff_Wipe5', - 'ovl_En_Stone_heishi', - 'ovl_Oceff_Wipe6', - 'ovl_En_Scopenuts', - 'ovl_En_Scopecrow', - 'ovl_Oceff_Wipe7', - 'ovl_Eff_Kamejima_Wave', - 'ovl_En_Hg', - 'ovl_En_Hgo', - 'ovl_En_Zov', - 'ovl_En_Ah', - 'ovl_Obj_Hgdoor', - 'ovl_Bg_Ikana_Bombwall', - 'ovl_Bg_Ikana_Ray', - 'ovl_Bg_Ikana_Shutter', - 'ovl_Bg_Haka_Bombwall', - 'ovl_Bg_Haka_Tomb', - 'ovl_En_Sc_Ruppe', - 'ovl_Bg_Iknv_Doukutu', - 'ovl_Bg_Iknv_Obj', - 'ovl_En_Pamera', - 'ovl_Obj_HsStump', - 'ovl_En_Hidden_Nuts', - 'ovl_En_Zow', - 'ovl_En_Talk', - 'ovl_En_Al', - 'ovl_En_Tab', - 'ovl_En_Nimotsu', - 'ovl_En_Hit_Tag', - 'ovl_En_Ruppecrow', - 'ovl_En_Tanron4', - 'ovl_En_Tanron5', - 'ovl_En_Tanron6', - 'ovl_En_Daiku2', - 'ovl_En_Muto', - 'ovl_En_Baisen', - 'ovl_En_Heishi', - 'ovl_En_Demo_heishi', - 'ovl_En_Dt', - 'ovl_En_Cha', - 'ovl_Obj_Dinner', - 'ovl_Eff_Lastday', - 'ovl_Bg_Ikana_Dharma', - 'ovl_En_Akindonuts', - 'ovl_Eff_Stk', - 'ovl_En_Ig', - 'ovl_En_Rg', - 'ovl_En_Osk', - 'ovl_En_Sth2', - 'ovl_En_Yb', - 'ovl_En_Rz', - 'ovl_En_Scopecoin', - 'ovl_En_Bjt', - 'ovl_En_Bomjima', - 'ovl_En_Bomjimb', - 'ovl_En_Bombers', - 'ovl_En_Bombers2', - 'ovl_En_Bombal', - 'ovl_Obj_Moon_Stone', - 'ovl_Obj_Mu_Pict', - 'ovl_Bg_Ikninside', - 'ovl_Eff_Zoraband', - 'ovl_Obj_Kepn_Koya', - 'ovl_Obj_Usiyane', - 'ovl_En_Nnh', - 'ovl_Obj_Kzsaku', - 'ovl_Obj_Milk_Bin', - 'ovl_En_Kitan', - 'ovl_Bg_Astr_Bombwall', - 'ovl_Bg_Iknin_Susceil', - 'ovl_En_Bsb', - 'ovl_En_Recepgirl', - 'ovl_En_Thiefbird', - 'ovl_En_Jgame_Tsn', - 'ovl_Obj_Jgame_Light', - 'ovl_Obj_Yado', - 'ovl_Demo_Syoten', - 'ovl_Demo_Moonend', - 'ovl_Bg_Lbfshot', - 'ovl_Bg_Last_Bwall', - 'ovl_En_And', - 'ovl_En_Invadepoh_Demo', - 'ovl_Obj_Danpeilift', - 'ovl_En_Fall2', - 'ovl_Dm_Al', - 'ovl_Dm_An', - 'ovl_Dm_Ah', - 'ovl_Dm_Nb', - 'ovl_En_Drs', - 'ovl_En_Ending_Hero', - 'ovl_Dm_Bal', - 'ovl_En_Paper', - 'ovl_En_Hint_Skb', - 'ovl_Dm_Tag', - 'ovl_En_Bh', - 'ovl_En_Ending_Hero2', - 'ovl_En_Ending_Hero3', - 'ovl_En_Ending_Hero4', - 'ovl_En_Ending_Hero5', - 'ovl_En_Ending_Hero6', - 'ovl_Dm_Gm', - 'ovl_Obj_Swprize', - 'ovl_En_Invisible_Ruppe', - 'ovl_Obj_Ending', - 'ovl_En_Rsn', - 'gameplay_keep', - 'gameplay_field_keep', - 'gameplay_dangeon_keep', - 'gameplay_object_exchange_static', - 'object_link_boy', - 'object_link_child', - 'object_link_goron', - 'object_link_zora', - 'object_link_nuts', - 'object_mask_ki_tan', - 'object_mask_rabit', - 'object_mask_skj', - 'object_mask_truth', - 'object_mask_gibudo', - 'object_mask_json', - 'object_mask_kerfay', - 'object_mask_bigelf', - 'object_mask_kyojin', - 'object_mask_romerny', - 'object_mask_posthat', - 'object_mask_zacho', - 'object_mask_stone', - 'object_mask_bree', - 'object_mask_gero', - 'object_mask_yofukasi', - 'object_mask_meoto', - 'object_mask_dancer', - 'object_mask_bakuretu', - 'object_mask_bu_san', - 'object_mask_goron', - 'object_mask_zora', - 'object_mask_nuts', - 'object_mask_boy', - 'object_box', - 'object_okuta', - 'object_wallmaster', - 'object_dy_obj', - 'object_firefly', - 'object_dodongo', - 'object_niw', - 'object_tite', - 'object_ph', - 'object_dinofos', - 'object_zl1', - 'object_bubble', - 'object_test3', - 'object_famos', - 'object_st', - 'object_thiefbird', - 'object_bombf', - 'object_am', - 'object_dekubaba', - 'object_warp1', - 'object_b_heart', - 'object_dekunuts', - 'object_bb', - 'object_death', - 'object_hata', - 'object_wood02', - 'object_trap', - 'object_vm', - 'object_efc_star_field', - 'object_rd', - 'object_yukimura_obj', - # skip object_heavy_object (in JP) - 'object_horse_link_child', - 'object_syokudai', - 'object_efc_tw', - 'object_gi_key', - 'object_mir_ray', - 'object_ctower_rot', - 'object_bdoor', - 'object_sb', - 'object_gi_melody', - 'object_gi_heart', - 'object_gi_compass', - 'object_gi_bosskey', - 'object_gi_nuts', - 'object_gi_hearts', - 'object_gi_arrowcase', - 'object_gi_bombpouch', - 'object_in', - 'object_os_anime', - 'object_gi_bottle', - 'object_gi_stick', - 'object_gi_map', - 'object_oF1d_map', - 'object_ru2', - 'object_gi_magicpot', - 'object_gi_bomb_1', - 'object_ma2', - 'object_gi_purse', - 'object_rr', - 'object_gi_arrow', - 'object_gi_bomb_2', - 'object_gi_shield_2', - 'object_gi_hookshot', - 'object_gi_ocarina', - 'object_gi_milk', - 'object_ma1', - 'object_ny', - 'object_fr', - 'object_gi_bow', - 'object_gi_glasses', - 'object_gi_liquid', - 'object_ani', - 'object_gi_shield_3', - 'object_gi_bean', - 'object_gi_fish', - 'object_gi_longsword', - 'object_zo', - 'object_umajump', - 'object_mastergolon', - 'object_masterzoora', - 'object_aob', - 'object_ik', - 'object_ahg', - 'object_cne', - 'object_bji', - 'object_bba', - 'object_an1', - 'object_boj', - 'object_fz', - 'object_bob', - 'object_ge1', - 'object_yabusame_point', - 'object_d_hsblock', - 'object_d_lift', - 'object_mamenoki', - 'object_goroiwa', - 'object_toryo', - 'object_daiku', - 'object_nwc', - 'object_gm', - 'object_ms', - 'object_hs', - 'object_lightswitch', - 'object_kusa', - 'object_tsubo', - 'object_kanban', - 'object_owl', - 'object_mk', - 'object_fu', - 'object_gi_ki_tan_mask', - 'object_gi_mask18', - 'object_gi_rabit_mask', - 'object_gi_truth_mask', - 'object_stream', - 'object_mm', - 'object_js', - 'object_cs', - 'object_gi_soldout', - 'object_mag', - 'object_gi_golonmask', - 'object_gi_zoramask', - 'object_ka', - 'object_zg', - 'object_gi_m_arrow', - 'object_ds2', - 'object_fish', - 'object_gi_sutaru', - 'object_ssh', - 'object_bigslime', - 'object_bg', - 'object_bombiwa', - 'object_hintnuts', - 'object_rsn', - 'object_gla', - 'object_geldb', - 'object_dog', - 'object_kibako2', - 'object_dns', - 'object_dnk', - 'object_gi_insect', - 'object_gi_ghost', - 'object_gi_soul', - 'object_f40_obj', - 'object_gi_rupy', - 'object_po_composer', - 'object_mu', - 'object_wf', - 'object_skb', - 'object_gs', - 'object_ps', - 'object_omoya_obj', - 'object_crow', - 'object_cow', - 'object_gi_sword_1', - 'object_zl4', - 'object_grasshopper', - 'object_boyo', - 'object_fwall', - 'object_jso', - 'object_knight', - 'object_icicle', - 'object_spdweb', - 'object_boss01', - 'object_boss02', - 'object_boss03', - 'object_boss04', - 'object_boss05', - 'object_boss07', - 'object_raf', - 'object_funen', - 'object_raillift', - 'object_numa_obj', - 'object_flowerpot', - 'object_spinyroll', - 'object_ice_block', - 'object_keikoku_demo', - 'object_slime', - 'object_pr', - 'object_f52_obj', - 'object_f53_obj', - 'object_kibako', - 'object_sek', - 'object_gmo', - 'object_bat', - 'object_sekihil', - 'object_sekihig', - 'object_sekihin', - 'object_sekihiz', - 'object_wiz', - 'object_ladder', - 'object_mkk', - 'object_keikoku_obj', - 'object_sichitai_obj', - 'object_dekucity_ana_obj', - 'object_rat', - 'object_water_effect', - 'object_dblue_object', - 'object_bal', - 'object_warp_uzu', - 'object_driftice', - 'object_fall', - 'object_hanareyama_obj', - 'object_crace_object', - 'object_dno', - 'object_obj_tokeidai', - 'object_eg', - 'object_tru', - 'object_trt', - 'object_hakugin_obj', - 'object_horse_game_check', - 'object_stk', - 'object_mnk', - 'object_gi_bottle_red', - 'object_tokei_tobira', - 'object_az', - 'object_twig', - 'object_dekucity_obj', - 'object_po_fusen', - 'object_racetsubo', - 'object_ha', - 'object_bigokuta', - 'object_open_obj', - 'object_fu_kaiten', - 'object_fu_mato', - 'object_mtoride', - 'object_osn', - 'object_tokei_step', - 'object_lotus', - 'object_tl', - 'object_dkjail_obj', - 'object_visiblock', - 'object_tsn', - 'object_ds2n', - 'object_fsn', - 'object_shn', - 'object_bigicicle', - 'object_gi_bottle_15', - 'object_tk', - 'object_market_obj', - 'object_gi_reserve00', - 'object_gi_reserve01', - 'object_lightblock', - 'object_takaraya_objects', - 'object_wdhand', - 'object_sdn', - 'object_snowwd', - 'object_giant', - 'object_comb', - 'object_hana', - 'object_boss_hakugin', - 'object_meganeana_obj', - 'object_gi_nutsmask', - 'object_stk2', - 'object_spot11_obj', - 'object_danpei_object', - 'object_dhouse', - 'object_hakaisi', - 'object_po', - 'object_snowman', - 'object_po_sisters', - 'object_pp', - 'object_goronswitch', - 'object_delf', - 'object_botihasira', - 'object_gi_bigbomb', - 'object_pst', - 'object_bsmask', - 'object_spidertent', - 'object_zoraegg', - 'object_kbt', - 'object_gg', - 'object_maruta', - 'object_ghaka', - 'object_oyu', - 'object_dnq', - 'object_dai', - 'object_kgy', - 'object_fb', - 'object_taisou', - 'object_gk', - 'object_haka_obj', - 'object_dnt', - 'object_yukiyama', - 'object_icefloe', - 'object_gi_gold_dust', - 'object_gi_bottle_16', - 'object_gi_bottle_22', - 'object_bee', - 'object_ot', - 'object_utubo', - 'object_dora', - 'object_gi_loach', - 'object_gi_seahorse', - 'object_bigpo', - 'object_hariko', - 'object_dnj', - 'object_sinkai_kabe', - 'object_kin2_obj', - 'object_ishi', - 'object_hakugin_demo', - 'object_jg', - 'object_gi_sword_2', - 'object_gi_sword_3', - 'object_gi_sword_4', - 'object_um', - 'object_rb', - 'object_mbar_obj', - 'object_ikana_obj', - 'object_kz', - 'object_tokei_turret', - 'object_zog', - 'object_rotlift', - 'object_posthouse_obj', - 'object_gi_mask09', - 'object_gi_mask14', - 'object_gi_mask15', - 'object_inibs_object', - 'object_tree', - 'object_kaizoku_obj', - 'object_gi_reserve_b_00', - 'object_gi_reserve_c_00', - 'object_zob', - 'object_milkbar', - 'object_dmask', - 'object_gi_reserve_c_01', - 'object_zod', - 'object_kumo30', - 'object_obj_yasi', - 'object_tanron1', - 'object_tanron2', - 'object_tanron3', - 'object_gi_magicmushroom', - 'object_obj_chan', - 'object_gi_mask10', - 'object_zos', - 'object_an2', - 'object_an3', - 'object_f40_switch', - 'object_lodmoon', - 'object_tro', - 'object_gi_mask12', - 'object_gi_mask23', - 'object_gi_bottle_21', - 'object_gi_camera', - 'object_kamejima', - 'object_nb', - 'object_harfgibud', - 'object_zov', - 'object_ah', - 'object_hgdoor', - 'object_dor01', - 'object_dor02', - 'object_dor03', - 'object_dor04', - 'object_last_obj', - 'object_redead_obj', - 'object_ikninside_obj', - 'object_iknv_obj', - 'object_pamera', - 'object_hsstump', - 'object_zm', - 'object_al', - 'object_tab', - 'object_secom_obj', - 'object_dt', - 'object_gi_mask03', - 'object_cha', - 'object_obj_dinner', - 'object_gi_reserve_b_01', - 'object_lastday', - 'object_bai', - 'object_ikn_demo', - 'object_gi_fieldmap', - 'object_big_fwall', - 'object_hunsui', - 'object_uch', - 'object_tanron4', - 'object_tanron5', - 'object_in2', - 'object_yb', - 'object_rz', - 'object_bjt', - 'object_taru', - 'object_moonston', - 'object_gi_schedule', - 'object_gi_stonemask', - 'object_zoraband', - 'object_kepn_koya', - 'object_obj_usiyane', - 'object_gi_mask05', - 'object_gi_mask11', - 'object_gi_mask20', - 'object_nnh', - 'object_kzsaku', - 'object_obj_milk_bin', - 'object_random_obj', - 'object_kujiya', - 'object_kitan', - 'object_gi_mask06', - 'object_gi_mask16', - 'object_astr_obj', - 'object_bsb', - 'object_fall2', - 'object_sth', - 'object_gi_mssa', - 'object_smtower', - 'object_gi_mask21', - 'object_yado_obj', - 'object_syoten', - 'object_moonend', - 'object_ob', - 'object_gi_bottle_04', - 'object_and', - 'object_obj_danpeilift', - 'object_drs', - 'object_msmo', - 'object_an4', - 'object_wdor01', - 'object_wdor02', - 'object_wdor03', - 'object_wdor04', - 'object_wdor05', - 'object_stk3', - 'object_kinsta1_obj', - 'object_kinsta2_obj', - 'object_bh', - 'object_gi_mask17', - 'object_gi_mask22', - 'object_lbfshot', - 'object_fusen', - 'object_ending_obj', - 'object_gi_mask13', - 'scene_texture_01', # Map Textures - Building Interiors I - 'scene_texture_02', # Map Textures - Building Interiors II - 'scene_texture_03', # Map Textures - Lost Woods - 'scene_texture_04', # Map Textures - Mountains - 'scene_texture_05', # Map Textures - Ocean - 'scene_texture_06', # Map Textures - Swamp - 'scene_texture_07', - 'scene_texture_08', # Map Textures - Field - 'nintendo_rogo_static', - 'title_static', - 'memerrmsg', - 'locerrmsg', - 'parameter_static', - 'week_static', - 'daytelop_static', - 'ger_daytelop_static', - 'fra_daytelop_static', - 'esp_daytelop_static', - 'd2_fine_static', - 'd2_cloud_static', - 'd2_fine_pal_static', - 'elf_message_field', - 'elf_message_ydan', - 'Z2_20SICHITAI2', - 'Z2_20SICHITAI2_room_00', - 'Z2_20SICHITAI2_room_01', - 'Z2_20SICHITAI2_room_02', - 'Z2_WITCH_SHOP', - 'Z2_WITCH_SHOP_room_00', - 'Z2_LAST_BS', - 'Z2_LAST_BS_room_00', - 'Z2_HAKASHITA', - 'Z2_HAKASHITA_room_00', - 'Z2_HAKASHITA_room_01', - 'Z2_HAKASHITA_room_02', - 'Z2_HAKASHITA_room_03', - 'Z2_HAKASHITA_room_04', - 'Z2_AYASHIISHOP', - 'Z2_AYASHIISHOP_room_00', - 'Z2_AYASHIISHOP_room_01', - 'Z2_OMOYA', - 'Z2_OMOYA_room_00', - 'Z2_OMOYA_room_01', - 'Z2_OMOYA_room_02', - 'Z2_BOWLING', - 'Z2_BOWLING_room_00', - 'Z2_SONCHONOIE', - 'Z2_SONCHONOIE_room_00', - 'Z2_SONCHONOIE_room_01', - 'Z2_SONCHONOIE_room_02', - 'Z2_SONCHONOIE_room_03', - 'Z2_IKANA', - 'Z2_IKANA_room_00', - 'Z2_IKANA_room_01', - 'Z2_IKANA_room_02', - 'Z2_IKANA_room_03', - 'Z2_IKANA_room_04', - 'Z2_KAIZOKU', - 'Z2_KAIZOKU_room_00', - 'Z2_MILK_BAR', - 'Z2_MILK_BAR_room_00', - 'Z2_INISIE_N', - 'Z2_INISIE_N_room_00', - 'Z2_INISIE_N_room_01', - 'Z2_INISIE_N_room_02', - 'Z2_INISIE_N_room_03', - 'Z2_INISIE_N_room_04', - 'Z2_INISIE_N_room_05', - 'Z2_INISIE_N_room_06', - 'Z2_INISIE_N_room_07', - 'Z2_INISIE_N_room_08', - 'Z2_INISIE_N_room_09', - 'Z2_INISIE_N_room_10', - 'Z2_INISIE_N_room_11', - 'Z2_TAKARAYA', - 'Z2_TAKARAYA_room_00', - 'Z2_INISIE_R', - 'Z2_INISIE_R_room_00', - 'Z2_INISIE_R_room_01', - 'Z2_INISIE_R_room_02', - 'Z2_INISIE_R_room_03', - 'Z2_INISIE_R_room_04', - 'Z2_INISIE_R_room_05', - 'Z2_INISIE_R_room_06', - 'Z2_INISIE_R_room_07', - 'Z2_INISIE_R_room_08', - 'Z2_INISIE_R_room_09', - 'Z2_INISIE_R_room_10', - 'Z2_INISIE_R_room_11', - 'Z2_OKUJOU', - 'Z2_OKUJOU_room_00', - 'Z2_OPENINGDAN', - 'Z2_OPENINGDAN_room_00', - 'Z2_OPENINGDAN_room_01', - 'Z2_MITURIN', - 'Z2_MITURIN_room_00', - 'Z2_MITURIN_room_01', - 'Z2_MITURIN_room_02', - 'Z2_MITURIN_room_03', - 'Z2_MITURIN_room_04', - 'Z2_MITURIN_room_05', - 'Z2_MITURIN_room_06', - 'Z2_MITURIN_room_07', - 'Z2_MITURIN_room_08', - 'Z2_MITURIN_room_09', - 'Z2_MITURIN_room_10', - 'Z2_MITURIN_room_11', - 'Z2_MITURIN_room_12', - 'Z2_13HUBUKINOMITI', - 'Z2_13HUBUKINOMITI_room_00', - 'Z2_CASTLE', - 'Z2_CASTLE_room_00', - 'Z2_CASTLE_room_01', - 'Z2_CASTLE_room_02', - 'Z2_CASTLE_room_03', - 'Z2_CASTLE_room_04', - 'Z2_CASTLE_room_05', - 'Z2_CASTLE_room_06', - 'Z2_CASTLE_room_07', - 'Z2_CASTLE_room_08', - 'Z2_CASTLE_room_09', - 'Z2_DEKUTES', - 'Z2_DEKUTES_room_00', - 'Z2_MITURIN_BS', - 'Z2_MITURIN_BS_room_00', - 'Z2_SYATEKI_MIZU', - 'Z2_SYATEKI_MIZU_room_00', - 'Z2_HAKUGIN', - 'Z2_HAKUGIN_room_00', - 'Z2_HAKUGIN_room_01', - 'Z2_HAKUGIN_room_02', - 'Z2_HAKUGIN_room_03', - 'Z2_HAKUGIN_room_04', - 'Z2_HAKUGIN_room_05', - 'Z2_HAKUGIN_room_06', - 'Z2_HAKUGIN_room_07', - 'Z2_HAKUGIN_room_08', - 'Z2_HAKUGIN_room_09', - 'Z2_HAKUGIN_room_10', - 'Z2_HAKUGIN_room_11', - 'Z2_HAKUGIN_room_12', - 'Z2_HAKUGIN_room_13', - 'Z2_ROMANYMAE', - 'Z2_ROMANYMAE_room_00', - 'Z2_PIRATE', - 'Z2_PIRATE_room_00', - 'Z2_PIRATE_room_01', - 'Z2_PIRATE_room_02', - 'Z2_PIRATE_room_03', - 'Z2_PIRATE_room_04', - 'Z2_PIRATE_room_05', - 'Z2_PIRATE_room_06', - 'Z2_PIRATE_room_07', - 'Z2_PIRATE_room_08', - 'Z2_PIRATE_room_09', - 'Z2_PIRATE_room_10', - 'Z2_PIRATE_room_11', - 'Z2_PIRATE_room_12', - 'Z2_PIRATE_room_13', - 'Z2_PIRATE_room_14', - 'Z2_SYATEKI_MORI', - 'Z2_SYATEKI_MORI_room_00', - 'Z2_SINKAI', - 'Z2_SINKAI_room_00', - 'Z2_YOUSEI_IZUMI', - 'Z2_YOUSEI_IZUMI_room_00', - 'Z2_YOUSEI_IZUMI_room_01', - 'Z2_YOUSEI_IZUMI_room_02', - 'Z2_YOUSEI_IZUMI_room_03', - 'Z2_YOUSEI_IZUMI_room_04', - 'Z2_KINSTA1', - 'Z2_KINSTA1_room_00', - 'Z2_KINSTA1_room_01', - 'Z2_KINSTA1_room_02', - 'Z2_KINSTA1_room_03', - 'Z2_KINSTA1_room_04', - 'Z2_KINSTA1_room_05', - 'Z2_KINDAN2', - 'Z2_KINDAN2_room_00', - 'Z2_KINDAN2_room_01', - 'Z2_KINDAN2_room_02', - 'Z2_KINDAN2_room_03', - 'Z2_KINDAN2_room_04', - 'Z2_KINDAN2_room_05', - 'Z2_TENMON_DAI', - 'Z2_TENMON_DAI_room_00', - 'Z2_TENMON_DAI_room_01', - 'Z2_LAST_DEKU', - 'Z2_LAST_DEKU_room_00', - 'Z2_LAST_DEKU_room_01', - 'Z2_22DEKUCITY', - 'Z2_22DEKUCITY_room_00', - 'Z2_22DEKUCITY_room_01', - 'Z2_22DEKUCITY_room_02', - 'Z2_KAJIYA', - 'Z2_KAJIYA_room_00', - 'Z2_00KEIKOKU', - 'Z2_00KEIKOKU_room_00', - 'Z2_POSTHOUSE', - 'Z2_POSTHOUSE_room_00', - 'Z2_LABO', - 'Z2_LABO_room_00', - 'Z2_DANPEI2TEST', - 'Z2_DANPEI2TEST_room_00', - 'Z2_DANPEI2TEST_room_01', - 'Z2_16GORON_HOUSE', - 'Z2_16GORON_HOUSE_room_00', - 'Z2_16GORON_HOUSE_room_01', - 'Z2_33ZORACITY', - 'Z2_33ZORACITY_room_00', - 'Z2_8ITEMSHOP', - 'Z2_8ITEMSHOP_room_00', - 'Z2_F01', - 'Z2_F01_room_00', - 'Z2_INISIE_BS', - 'Z2_INISIE_BS_room_00', - 'Z2_30GYOSON', - 'Z2_30GYOSON_room_00', - 'Z2_31MISAKI', - 'Z2_31MISAKI_room_00', - 'Z2_TAKARAKUJI', - 'Z2_TAKARAKUJI_room_00', - 'Z2_TORIDE', - 'Z2_TORIDE_room_00', - 'Z2_FISHERMAN', - 'Z2_FISHERMAN_room_00', - 'Z2_GORONSHOP', - 'Z2_GORONSHOP_room_00', - 'Z2_DEKU_KING', - 'Z2_DEKU_KING_room_00', - 'Z2_LAST_GORON', - 'Z2_LAST_GORON_room_00', - 'Z2_LAST_GORON_room_01', - 'Z2_24KEMONOMITI', - 'Z2_24KEMONOMITI_room_00', - 'Z2_F01_B', - 'Z2_F01_B_room_00', - 'Z2_F01C', - 'Z2_F01C_room_00', - 'Z2_BOTI', - 'Z2_BOTI_room_00', - 'Z2_BOTI_room_01', - 'Z2_HAKUGIN_BS', - 'Z2_HAKUGIN_BS_room_00', - 'Z2_20SICHITAI', - 'Z2_20SICHITAI_room_00', - 'Z2_20SICHITAI_room_01', - 'Z2_20SICHITAI_room_02', - 'Z2_21MITURINMAE', - 'Z2_21MITURINMAE_room_00', - 'Z2_LAST_ZORA', - 'Z2_LAST_ZORA_room_00', - 'Z2_11GORONNOSATO2', - 'Z2_11GORONNOSATO2_room_00', - 'Z2_11GORONNOSATO2_room_01', - 'Z2_SEA', - 'Z2_SEA_room_00', - 'Z2_SEA_room_01', - 'Z2_SEA_room_02', - 'Z2_SEA_room_03', - 'Z2_SEA_room_04', - 'Z2_SEA_room_05', - 'Z2_SEA_room_06', - 'Z2_SEA_room_07', - 'Z2_SEA_room_08', - 'Z2_SEA_room_09', - 'Z2_SEA_room_10', - 'Z2_SEA_room_11', - 'Z2_SEA_room_12', - 'Z2_SEA_room_13', - 'Z2_SEA_room_14', - 'Z2_SEA_room_15', - 'Z2_35TAKI', - 'Z2_35TAKI_room_00', - 'Z2_REDEAD', - 'Z2_REDEAD_room_00', - 'Z2_REDEAD_room_01', - 'Z2_REDEAD_room_02', - 'Z2_REDEAD_room_03', - 'Z2_REDEAD_room_04', - 'Z2_REDEAD_room_05', - 'Z2_REDEAD_room_06', - 'Z2_REDEAD_room_07', - 'Z2_REDEAD_room_08', - 'Z2_REDEAD_room_09', - 'Z2_REDEAD_room_10', - 'Z2_REDEAD_room_11', - 'Z2_REDEAD_room_12', - 'Z2_REDEAD_room_13', - 'Z2_BANDROOM', - 'Z2_BANDROOM_room_00', - 'Z2_BANDROOM_room_01', - 'Z2_BANDROOM_room_02', - 'Z2_BANDROOM_room_03', - 'Z2_BANDROOM_room_04', - 'Z2_11GORONNOSATO', - 'Z2_11GORONNOSATO_room_00', - 'Z2_11GORONNOSATO_room_01', - 'Z2_GORON_HAKA', - 'Z2_GORON_HAKA_room_00', - 'Z2_SECOM', - 'Z2_SECOM_room_00', - 'Z2_SECOM_room_01', - 'Z2_10YUKIYAMANOMURA', - 'Z2_10YUKIYAMANOMURA_room_00', - 'Z2_TOUGITES', - 'Z2_TOUGITES_room_00', - 'Z2_DANPEI', - 'Z2_DANPEI_room_00', - 'Z2_DANPEI_room_01', - 'Z2_DANPEI_room_02', - 'Z2_DANPEI_room_03', - 'Z2_DANPEI_room_04', - 'Z2_DANPEI_room_05', - 'Z2_DANPEI_room_06', - 'Z2_DANPEI_room_07', - 'Z2_DANPEI_room_08', - 'Z2_IKANAMAE', - 'Z2_IKANAMAE_room_00', - 'Z2_DOUJOU', - 'Z2_DOUJOU_room_00', - 'Z2_MUSICHOUSE', - 'Z2_MUSICHOUSE_room_00', - 'Z2_IKNINSIDE', - 'Z2_IKNINSIDE_room_00', - 'Z2_IKNINSIDE_room_01', - 'Z2_MAP_SHOP', - 'Z2_MAP_SHOP_room_00', - 'Z2_F40', - 'Z2_F40_room_00', - 'Z2_F41', - 'Z2_F41_room_00', - 'Z2_10YUKIYAMANOMURA2', - 'Z2_10YUKIYAMANOMURA2_room_00', - 'Z2_10YUKIYAMANOMURA2_room_01', - 'Z2_14YUKIDAMANOMITI', - 'Z2_14YUKIDAMANOMITI_room_00', - 'Z2_12HAKUGINMAE', - 'Z2_12HAKUGINMAE_room_00', - 'Z2_17SETUGEN', - 'Z2_17SETUGEN_room_00', - 'Z2_17SETUGEN2', - 'Z2_17SETUGEN2_room_00', - 'Z2_SEA_BS', - 'Z2_SEA_BS_room_00', - 'Z2_RANDOM', - 'Z2_RANDOM_room_00', - 'Z2_RANDOM_room_01', - 'Z2_RANDOM_room_02', - 'Z2_RANDOM_room_03', - 'Z2_RANDOM_room_04', - 'Z2_RANDOM_room_05', - 'Z2_YADOYA', - 'Z2_YADOYA_room_00', - 'Z2_YADOYA_room_01', - 'Z2_YADOYA_room_02', - 'Z2_YADOYA_room_03', - 'Z2_YADOYA_room_04', - 'Z2_KONPEKI_ENT', - 'Z2_KONPEKI_ENT_room_00', - 'Z2_INSIDETOWER', - 'Z2_INSIDETOWER_room_00', - 'Z2_INSIDETOWER_room_01', - 'Z2_26SARUNOMORI', - 'Z2_26SARUNOMORI_room_00', - 'Z2_26SARUNOMORI_room_01', - 'Z2_26SARUNOMORI_room_02', - 'Z2_26SARUNOMORI_room_03', - 'Z2_26SARUNOMORI_room_04', - 'Z2_26SARUNOMORI_room_05', - 'Z2_26SARUNOMORI_room_06', - 'Z2_26SARUNOMORI_room_07', - 'Z2_26SARUNOMORI_room_08', - 'Z2_LOST_WOODS', - 'Z2_LOST_WOODS_room_00', - 'Z2_LOST_WOODS_room_01', - 'Z2_LOST_WOODS_room_02', - 'Z2_LAST_LINK', - 'Z2_LAST_LINK_room_00', - 'Z2_LAST_LINK_room_01', - 'Z2_LAST_LINK_room_02', - 'Z2_LAST_LINK_room_03', - 'Z2_LAST_LINK_room_04', - 'Z2_LAST_LINK_room_05', - 'Z2_LAST_LINK_room_06', - 'Z2_LAST_LINK_room_07', - 'Z2_SOUGEN', - 'Z2_SOUGEN_room_00', - 'Z2_BOMYA', - 'Z2_BOMYA_room_00', - 'Z2_KYOJINNOMA', - 'Z2_KYOJINNOMA_room_00', - 'Z2_KOEPONARACE', - 'Z2_KOEPONARACE_room_00', - 'Z2_GORONRACE', - 'Z2_GORONRACE_room_00', - 'Z2_TOWN', - 'Z2_TOWN_room_00', - 'Z2_ICHIBA', - 'Z2_ICHIBA_room_00', - 'Z2_BACKTOWN', - 'Z2_BACKTOWN_room_00', - 'Z2_CLOCKTOWER', - 'Z2_CLOCKTOWER_room_00', - 'Z2_ALLEY', - 'Z2_ALLEY_room_00', - 'SPOT00', - 'SPOT00_room_00', - 'KAKUSIANA', - 'KAKUSIANA_room_00', - 'KAKUSIANA_room_01', - 'KAKUSIANA_room_02', - 'KAKUSIANA_room_03', - 'KAKUSIANA_room_04', - 'KAKUSIANA_room_05', - 'KAKUSIANA_room_06', - 'KAKUSIANA_room_07', - 'KAKUSIANA_room_08', - 'KAKUSIANA_room_09', - 'KAKUSIANA_room_10', - 'KAKUSIANA_room_11', - 'KAKUSIANA_room_12', - 'KAKUSIANA_room_13', - 'KAKUSIANA_room_14', - 'bump_texture_static', - 'anime_model_1_static', - 'anime_model_2_static', - 'anime_model_3_static', - 'anime_model_4_static', - 'anime_model_5_static', - 'anime_model_6_static', - 'anime_texture_1_static', - 'anime_texture_2_static', - 'anime_texture_3_static', - 'anime_texture_4_static', - 'anime_texture_5_static', - 'anime_texture_6_static', - 'softsprite_matrix_static', -] - -def read_uint32_be(offset): - return struct.unpack('>I', romData[offset:offset+4])[0] - -def write_output_file(name, offset, size): - try: - with open(name, 'wb') as f: - f.write(romData[offset:offset+size]) - except IOError: - print('failed to write file ' + name) - -try: - os.mkdir('baserom') -except: - pass - -# read baserom data -try: - with open(ROM_FILE_NAME, 'rb') as f: - romData = f.read() -except IOError: - print('failed to read file' + ROM_FILE_NAME) - sys.exit(1) - -# extract files -for i in range(0, len(FILE_NAMES)): - filename = 'baserom/' + FILE_NAMES[i] - entryOffset = FILE_TABLE_OFFSET + 16 * i - - virtStart = read_uint32_be(entryOffset + 0) - virtEnd = read_uint32_be(entryOffset + 4) - physStart = read_uint32_be(entryOffset + 8) - physEnd = read_uint32_be(entryOffset + 12) - - if physStart == 0xFFFFFFFF and physEnd == 0xFFFFFFFF: # file deleted - if (virtEnd - virtStart) == 0: - continue - physStart = virtStart - physEnd = 0 - compressed = False - size = virtEnd - virtStart - if physEnd == 0: # uncompressed - compressed = False - size = virtEnd - virtStart - else: # compressed - compressed = True - size = physEnd - physStart - - # print(f" 0x{virtStart:08X}:(\"_{filename.split('/')[-1]}SegmentRomStart\",\"UNK_TYPE\",\"\",0x4),") - # print(f" 0x{virtEnd:08X}:(\"_{filename.split('/')[-1]}SegmentRomEnd\",\"UNK_TYPE\",\"\",0x4),") - - #print(f"_{FILE_NAMES[i]}SegmentRomStart = {hex(virtStart)}\n_{FILE_NAMES[i]}SegmentRomEnd = {hex(virtEnd)}") - # print('extracting ' + filename + " (0x%08X, 0x%08X)" % (virtStart, virtEnd)) - write_output_file(filename, physStart, size) - if compressed: - os.system('tools/buildtools/yaz0 -d ' + filename + ' ' + filename) diff --git a/tools/filelists/mm.us.rev1/all.csv b/tools/filelists/n64-us/all.csv similarity index 100% rename from tools/filelists/mm.us.rev1/all.csv rename to tools/filelists/n64-us/all.csv diff --git a/tools/filelists/mm.us.rev1/archives.csv b/tools/filelists/n64-us/archives.csv similarity index 100% rename from tools/filelists/mm.us.rev1/archives.csv rename to tools/filelists/n64-us/archives.csv diff --git a/tools/filelists/mm.us.rev1/asm.csv b/tools/filelists/n64-us/asm.csv similarity index 100% rename from tools/filelists/mm.us.rev1/asm.csv rename to tools/filelists/n64-us/asm.csv diff --git a/tools/filelists/mm.us.rev1/audio.csv b/tools/filelists/n64-us/audio.csv similarity index 100% rename from tools/filelists/mm.us.rev1/audio.csv rename to tools/filelists/n64-us/audio.csv diff --git a/tools/filelists/mm.us.rev1/deleted.csv b/tools/filelists/n64-us/deleted.csv similarity index 100% rename from tools/filelists/mm.us.rev1/deleted.csv rename to tools/filelists/n64-us/deleted.csv diff --git a/tools/filelists/mm.us.rev1/interface.csv b/tools/filelists/n64-us/interface.csv similarity index 100% rename from tools/filelists/mm.us.rev1/interface.csv rename to tools/filelists/n64-us/interface.csv diff --git a/tools/filelists/mm.us.rev1/misc.csv b/tools/filelists/n64-us/misc.csv similarity index 100% rename from tools/filelists/mm.us.rev1/misc.csv rename to tools/filelists/n64-us/misc.csv diff --git a/tools/filelists/mm.us.rev1/objects.csv b/tools/filelists/n64-us/objects.csv similarity index 100% rename from tools/filelists/mm.us.rev1/objects.csv rename to tools/filelists/n64-us/objects.csv diff --git a/tools/filelists/mm.us.rev1/overlay.csv b/tools/filelists/n64-us/overlay.csv similarity index 100% rename from tools/filelists/mm.us.rev1/overlay.csv rename to tools/filelists/n64-us/overlay.csv diff --git a/tools/filelists/mm.us.rev1/scenes.csv b/tools/filelists/n64-us/scenes.csv similarity index 100% rename from tools/filelists/mm.us.rev1/scenes.csv rename to tools/filelists/n64-us/scenes.csv diff --git a/tools/filelists/mm.us.rev1/segments.csv b/tools/filelists/n64-us/segments.csv similarity index 100% rename from tools/filelists/mm.us.rev1/segments.csv rename to tools/filelists/n64-us/segments.csv diff --git a/tools/filelists/mm.us.rev1/text.csv b/tools/filelists/n64-us/text.csv similarity index 100% rename from tools/filelists/mm.us.rev1/text.csv rename to tools/filelists/n64-us/text.csv diff --git a/tools/fixbaserom.py b/tools/fixbaserom.py deleted file mode 100755 index d41444b057..0000000000 --- a/tools/fixbaserom.py +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python3 - -import hashlib, io, struct, sys -from os import path - -import crunch64 -import ipl3checksum - -UNCOMPRESSED_SIZE = 0x2F00000 - -def as_word_list(b): - return [i[0] for i in struct.iter_unpack(">I", b)] - -def read_dmadata_entry(addr): - return as_word_list(fileContent[addr:addr+0x10]) - -def read_dmadata(start): - dmadata = [] - addr = start - entry = read_dmadata_entry(addr) - i = 0 - while any([e != 0 for e in entry]): - # print(f"0x{addr:08X} " + str([f"{e:08X}" for e in entry])) - dmadata.append(entry) - addr += 0x10 - i += 1 - entry = read_dmadata_entry(addr) - # print(f"0x{addr:08X} " + str([f"{e:08X}" for e in entry])) - return dmadata - -def update_crc(decompressed): - print("Recalculating crc...") - calculated_checksum = ipl3checksum.CICKind.CIC_X105.calculateChecksum(bytes(decompressed.getbuffer())) - new_crc = struct.pack(f">II", calculated_checksum[0], calculated_checksum[1]) - - decompressed.seek(0x10) - decompressed.write(new_crc) - return decompressed - -def decompress_rom(dmadata_addr, dmadata): - rom_segments = {} # vrom start : data s.t. len(data) == vrom_end - vrom_start - new_dmadata = bytearray() # new dmadata: {vrom start , vrom end , vrom start , 0} - - decompressed = io.BytesIO(b"") - - for v_start, v_end, p_start, p_end in dmadata: - if p_start == 0xFFFFFFFF and p_end == 0xFFFFFFFF: - new_dmadata.extend(struct.pack(">IIII", v_start, v_end, p_start, p_end)) - continue - if p_end == 0: # uncompressed - rom_segments.update({v_start : fileContent[p_start:p_start + v_end - v_start]}) - else: # compressed - rom_segments.update({v_start : crunch64.yaz0.decompress(fileContent[p_start:p_end])}) - new_dmadata.extend(struct.pack(">IIII", v_start, v_end, v_start, 0)) - - # write rom segments to vaddrs - for vrom_st,data in rom_segments.items(): - decompressed.seek(vrom_st) - decompressed.write(data) - # write new dmadata - decompressed.seek(dmadata_addr) - decompressed.write(new_dmadata) - # pad to size - decompressed.seek(UNCOMPRESSED_SIZE-1) - decompressed.write(bytearray([0])) - # re-calculate crc - return update_crc(decompressed) - -correct_compressed_str_hash = "2a0a8acb61538235bc1094d297fb6556" -correct_str_hash = "f46493eaa0628827dbd6ad3ecd8d65d6" - -def get_str_hash(byte_array): - return str(hashlib.md5(byte_array).hexdigest()) - -# If the baserom exists and is correct, we don't need to change anything -if path.exists("baserom_uncompressed.z64"): - with open("baserom_uncompressed.z64", mode="rb") as file: - fileContent = bytearray(file.read()) - if get_str_hash(fileContent) == correct_str_hash: - print("Found valid baserom - exiting early") - sys.exit(0) - -# Determine if we have a ROM file -romFileName = "" -if path.exists("baserom.mm.us.rev1.z64"): - romFileName = "baserom.mm.us.rev1.z64" -elif path.exists("baserom.mm.us.rev1.n64"): - romFileName = "baserom.mm.us.rev1.n64" -elif path.exists("baserom.mm.us.rev1.v64"): - romFileName = "baserom.mm.us.rev1.v64" -else: - print("Error: Could not find baserom.mm.us.rev1.z64/baserom.mm.us.rev1.n64/baserom.mm.us.rev1.v64.") - sys.exit(1) - -# Read in the original ROM -print("File '" + romFileName + "' found.") -with open(romFileName, mode="rb") as file: - fileContent = bytearray(file.read()) - -fileContentLen = len(fileContent) - -# Check if ROM needs to be byte/word swapped -# Little-endian -if fileContent[0] == 0x40: - # Word Swap ROM - print("ROM needs to be word swapped...") - words = str(int(fileContentLen/4)) - little_byte_format = "<" + words + "I" - big_byte_format = ">" + words + "I" - tmp = struct.unpack_from(little_byte_format, fileContent, 0) - struct.pack_into(big_byte_format, fileContent, 0, *tmp) - - print("Word swapping done.") - -# Byte-swapped -elif fileContent[0] == 0x37: - # Byte Swap ROM - print("ROM needs to be byte swapped...") - halfwords = str(int(fileContentLen/2)) - little_byte_format = "<" + halfwords + "H" - big_byte_format = ">" + halfwords + "H" - tmp = struct.unpack_from(little_byte_format, fileContent, 0) - struct.pack_into(big_byte_format, fileContent, 0, *tmp) - - print("Byte swapping done.") - -# Check to see if the ROM is a compressed "vanilla" ROM -compressed_str_hash = get_str_hash(bytearray(fileContent)) -if compressed_str_hash != correct_compressed_str_hash: - print("Error: Expected a hash of " + correct_compressed_str_hash + " but got " + compressed_str_hash + ". " + - "The baserom has probably been tampered, find a new one") - sys.exit(1) - -# Decompress -FILE_TABLE_OFFSET = 0x1A500 # 0x1C110 for JP1.0, 0x1C050 for JP1.1, 0x24F60 for debug -if any([b != 0 for b in fileContent[FILE_TABLE_OFFSET + 0x9C:FILE_TABLE_OFFSET + 0x9C + 0x4]]): - print("Decompressing rom...") - fileContent = decompress_rom(FILE_TABLE_OFFSET, read_dmadata(FILE_TABLE_OFFSET)).getbuffer() - -# FF Padding (TODO is there an automatic way we can find where to start padding from? Largest dmadata file end maybe?) -for i in range(0x2EE8000,UNCOMPRESSED_SIZE): - fileContent[i] = 0xFF - -# Check to see if the ROM is a "vanilla" ROM -str_hash = get_str_hash(bytearray(fileContent)) -if str_hash != correct_str_hash: - print("Error: Expected a hash of " + correct_str_hash + " but got " + str_hash + ". " + - "The baserom has probably been tampered, find a new one") - sys.exit(1) - -# Write out our new ROM -print("Writing new ROM 'baserom_uncompressed.z64'.") -with open("baserom_uncompressed.z64", "wb") as file: - file.write(bytes(fileContent)) - -print("Done!") diff --git a/tools/get_actor_sizes.py b/tools/get_actor_sizes.py index 387cccc6a5..6c177d252d 100755 --- a/tools/get_actor_sizes.py +++ b/tools/get_actor_sizes.py @@ -5,7 +5,7 @@ import argparse, math, os, re script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = script_dir + "/../" asm_dir = root_dir + "asm/non_matchings/overlays/actors" -build_dir = root_dir + "build/src/overlays/actors" +build_dir = root_dir + "build/n64-us/src/overlays/actors" def get_num_instructions(f_path): diff --git a/tools/msg/nes/msgdisNES.py b/tools/msg/nes/msgdisNES.py index f39032a693..484e569e3c 100755 --- a/tools/msg/nes/msgdisNES.py +++ b/tools/msg/nes/msgdisNES.py @@ -252,7 +252,7 @@ class MessageNES: def parseTable(start): table = {} - with open("baserom/code","rb") as f: + with open("extracted/n64-us/baserom/code","rb") as f: f.seek(start) buf = f.read(8) textId, typePos, segment = struct.unpack(">HBxI", buf) @@ -263,14 +263,14 @@ def parseTable(start): return table -NES_MESSAGE_TABLE_ADDR = 0x1210D8 # Location of NES message table in baserom/code +NES_MESSAGE_TABLE_ADDR = 0x1210D8 # Location of NES message table in extracted/n64-us/baserom/code NES_SEGMENT_ADDR = 0x08000000 def main(outfile): msgTable = parseTable(NES_MESSAGE_TABLE_ADDR) buf = [] - with open("baserom/message_data_static", "rb") as f: + with open("extracted/n64-us/baserom/message_data_static", "rb") as f: buf = f.read() bufLen = len(buf) diff --git a/tools/msg/staff/msgdisStaff.py b/tools/msg/staff/msgdisStaff.py index 3b51793b52..a7c2665b5a 100755 --- a/tools/msg/staff/msgdisStaff.py +++ b/tools/msg/staff/msgdisStaff.py @@ -172,7 +172,7 @@ class MessageCredits: def parseTable(start): table = {} - with open("baserom/code","rb") as f: + with open("extracted/n64-us/baserom/code","rb") as f: f.seek(start) buf = f.read(8) textId, typePos, segment = struct.unpack(">HBxI", buf) @@ -183,14 +183,14 @@ def parseTable(start): return table -STAFF_MESSAGE_TABLE_ADDR = 0x12A048 # Location of Staff message table in baserom/code +STAFF_MESSAGE_TABLE_ADDR = 0x12A048 # Location of Staff message table in extracted/n64-us/baserom/code STAFF_SEGMENT_ADDR = 0x07000000 def main(outfile): msgTable = parseTable(STAFF_MESSAGE_TABLE_ADDR) buf = [] - with open("baserom/staff_message_data_static", "rb") as f: + with open("extracted/n64-us/baserom/staff_message_data_static", "rb") as f: buf = f.read() bufLen = len(buf) diff --git a/tools/overlayhelpers/actor_symbols.py b/tools/overlayhelpers/actor_symbols.py index e3f079ad92..67ea7b6516 100755 --- a/tools/overlayhelpers/actor_symbols.py +++ b/tools/overlayhelpers/actor_symbols.py @@ -710,7 +710,7 @@ def null_or_ptr(w): # (name, vrom_st, vrom_end, vram_st, vram_end) def read_actor_ovl_tbl(): actortbl = [] - with open(repo + "baserom/code","rb") as codefile: + with open(repo + "baseroms/n64-us/code","rb") as codefile: codefile.seek(0x109510) # actor overlay table offset into code entry = as_word_list(codefile.read(0x20)) i = 0 diff --git a/tools/progress.py b/tools/progress.py index 255cf6130f..c0e072f463 100755 --- a/tools/progress.py +++ b/tools/progress.py @@ -19,7 +19,7 @@ AUTOGENERATED_ASSET_NAME = re.compile(r".+0[0-9A-Fa-f]{5}") ASM_JMP_LABEL = re.compile(r"^(?PL[0-9A-F]{8})$") # TODO: consider making this a parameter of this script -GAME_VERSION = "mm.us.rev1" +GAME_VERSION = "n64-us" def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) @@ -105,13 +105,13 @@ def CalculateNonNamedAssets(mapFileList, assetsTracker): for mapFile in mapFileList: if mapFile["section"] != ".data" and mapFile["section"] != ".rodata": continue - if not mapFile["name"].startswith("build/assets/"): + if not mapFile["name"].startswith("build/n64-us/assets/"): continue - if mapFile["name"].startswith("build/assets/c"): - assetCat = mapFile["name"].split("/")[3] + if mapFile["name"].startswith("build/n64-us/assets/c"): + assetCat = mapFile["name"].split("/")[4] else: - assetCat = mapFile["name"].split("/")[2] + assetCat = mapFile["name"].split("/")[3] for symbol in mapFile["symbols"]: @@ -122,7 +122,7 @@ def CalculateNonNamedAssets(mapFileList, assetsTracker): return assetsTracker -map_file = ReadAllLines('build/mm.map') +map_file = ReadAllLines('build/n64-us/mm-n64-us.map') # Get list of Non-Matchings all_files = GetFiles("src", ".c") @@ -217,7 +217,7 @@ for line in map_file: mapFileList.append(fileData) if (section == ".text"): - srcCat = obj_file.split("/")[2] + srcCat = obj_file.split("/")[3] if srcCat in srcCategoriesFixer: srcCat = srcCategoriesFixer[srcCat] @@ -225,19 +225,19 @@ for line in map_file: correctSection = fileSectionFixer[objFileName] if correctSection in srcTracker: srcTracker[correctSection]["totalSize"] += file_size - elif obj_file.startswith("build/src"): + elif obj_file.startswith("build/n64-us/src"): if srcCat in srcTracker: srcTracker[srcCat]["totalSize"] += file_size - elif (obj_file.startswith("build/asm")): + elif (obj_file.startswith("build/n64-us/asm")): if srcCat in asmTracker: asmTracker[srcCat]["totalSize"] += file_size if section == ".data" or section == ".rodata": - if obj_file.startswith("build/assets/"): - if obj_file.startswith("build/assets/c"): - assetCat = obj_file.split("/")[3] + if obj_file.startswith("build/n64-us/assets/"): + if obj_file.startswith("build/n64-us/assets/c"): + assetCat = obj_file.split("/")[4] else: - assetCat = obj_file.split("/")[2] + assetCat = obj_file.split("/")[3] if assetCat in assetsTracker: assetsTracker[assetCat]["currentSize"] += file_size elif assetCat in ignoredAssets: @@ -318,7 +318,7 @@ for srcCat in asmTracker: # Calculate size of all assets for assetCat in assetsTracker: for index, f in assetsTracker[assetCat]["files"]: - assetsTracker[assetCat]["totalSize"] += os.stat(os.path.join("baserom", f)).st_size + assetsTracker[assetCat]["totalSize"] += os.stat(os.path.join("baseroms", "n64-us", "segments", f)).st_size if args.matching: for assetCat in assetsTracker: diff --git a/tools/sort_actor_funcs.py b/tools/sort_actor_funcs.py index 1a75d56855..86493c87b3 100755 --- a/tools/sort_actor_funcs.py +++ b/tools/sort_actor_funcs.py @@ -17,7 +17,7 @@ if "/overlays/actors/" not in str(file_path): exit() map_path = file_path.parent.parent.parent.parent.parent -map_lines = (map_path / "build" / "mm.map").read_text().splitlines()[10000:] +map_lines = (map_path / "build" / "n64-us" / "mm-n64-us.map").read_text().splitlines()[10000:] i = 0 while not f"{file_path.stem}.o(.text)" in map_lines[i]: diff --git a/tools/warnings_count/update_current_warnings.sh b/tools/warnings_count/update_current_warnings.sh index f2cff34c53..f481ab3684 100755 --- a/tools/warnings_count/update_current_warnings.sh +++ b/tools/warnings_count/update_current_warnings.sh @@ -10,5 +10,5 @@ make distclean make setup 2> tools/warnings_count/warnings_setup_current.txt make assets 2> tools/warnings_count/warnings_assets_current.txt make disasm 2> tools/warnings_count/warnings_disasm_current.txt -make uncompressed 2> tools/warnings_count/warnings_build_current.txt -make compressed 2> tools/warnings_count/warnings_compress_current.txt +make rom 2> tools/warnings_count/warnings_build_current.txt +make compress 2> tools/warnings_count/warnings_compress_current.txt diff --git a/tools/z64compress/.editorconfig b/tools/z64compress/.editorconfig deleted file mode 100644 index 342ff359ce..0000000000 --- a/tools/z64compress/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -end_of_line = lf -insert_final_newline = true - -# Matches multiple files with brace expansion notation -[*.{c,h,ch}] -charset = utf-8 -indent_style = tab -indent_size = 3 -trim_trailing_whitespace = false - -[*.md] -trim_trailing_whitespace = false diff --git a/tools/z64compress/.gitignore b/tools/z64compress/.gitignore deleted file mode 100644 index 6a47e0517a..0000000000 --- a/tools/z64compress/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -bin/ -o/ -z64compress diff --git a/tools/z64compress/.gitrepo b/tools/z64compress/.gitrepo deleted file mode 100644 index 183bfc3267..0000000000 --- a/tools/z64compress/.gitrepo +++ /dev/null @@ -1,12 +0,0 @@ -; DO NOT EDIT (unless you know what you are doing) -; -; This subdirectory is a git "subrepo", and this file is maintained by the -; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme -; -[subrepo] - remote = https://github.com/z64me/z64compress.git - branch = main - commit = 5da3132606e4fd427a8d72b8428e4f921cd6e56f - parent = 837eb1c80687fe9b57a3c7b841547c33feeed6c7 - method = merge - cmdver = 0.4.3 diff --git a/tools/z64compress/LICENSE b/tools/z64compress/LICENSE deleted file mode 100644 index f288702d2f..0000000000 --- a/tools/z64compress/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/tools/z64compress/Makefile b/tools/z64compress/Makefile deleted file mode 100644 index f16167ccd2..0000000000 --- a/tools/z64compress/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -CC := gcc -CFLAGS := -DNDEBUG -s -Os -flto -Wall -Wextra - -# Target platform, specify with TARGET= on the command line, linux64 is default. -# Currently supported: linux64, linux32, win32 -TARGET ?= linux64 - -ifeq ($(TARGET),linux32) - TARGET_CFLAGS := -m32 -else ifeq ($(TARGET),win32) -# If using a cross compiler, specify the compiler executable on the command line. -# make TARGET=win32 CC=~/c/mxe/usr/bin/i686-w64-mingw32.static-gcc - TARGET_LIBS := -mconsole -municode -else ifneq ($(TARGET),linux64) - $(error Supported targets: linux64, linux32, win32) -endif - -# Whether to use native optimizations, specify with NATIVE_OPT=0/1 on the command line, default is 0. -# This is not supported by all compilers which is particularly an issue on Mac, and may inhibit tests. -NATIVE_OPT ?= 0 -ifeq ($(NATIVE_OPT),1) - TARGET_CFLAGS += -march=native -mtune=native -endif - -OBJ_DIR := o/$(TARGET) - -$(OBJ_DIR)/src/enc/%.o: CFLAGS := -DNDEBUG -s -Ofast -flto -Wall - -SRC_DIRS := $(shell find src -type d) -C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) -O_FILES := $(foreach f,$(C_FILES:.c=.o),$(OBJ_DIR)/$f) - -# Make build directories -$(shell mkdir -p $(foreach dir,$(SRC_DIRS),$(OBJ_DIR)/$(dir))) - -.PHONY: all clean - -all: z64compress - -z64compress: $(O_FILES) - $(CC) $(TARGET_CFLAGS) $(CFLAGS) $(O_FILES) -lm -lpthread $(TARGET_LIBS) -o z64compress - -$(OBJ_DIR)/%.o: %.c - $(CC) -c $(TARGET_CFLAGS) $(CFLAGS) $< -o $@ - -clean: - $(RM) -rf z64compress bin o diff --git a/tools/z64compress/README.md b/tools/z64compress/README.md deleted file mode 100644 index 1731a8ab03..0000000000 --- a/tools/z64compress/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# z64compress - -`z64compress` is a program for compressing Zelda 64 roms: be they retail, hacked traditionally, or custom-built from the [`Ocarina of Time`](https://github.com/zeldaret/oot) or [`Majora's Mask`](https://github.com/zeldaret/mm) reverse engineering projects. It is written in highly efficient C and leverages the power of multithreading to make compression as fast as possible. To reduce overhead on subsequent compressions, an optional cache directory can be specified. - -In addition to the default `yaz`, it supports some faster and more compact algorithms such as `lzo`, `ucl`, and `aplib`. In order to use these, grab patches or code from my [`z64enc` repository](https://github.com/z64me/z64enc). - -If you add an algorithm, please make sure `valgrind` reports no memory leaks or other errors before making a pull request. Thank you! - -(By the way, `valgrind` works better without the `-march=native -mtune=native` optimizations, so turn those off when testing `valgrind`.) - -## Usage -This is a command line application. Learn from these common examples and adapt the arguments to your needs: -``` - compressing oot debug - --in "path/to/in.z64" - --out "path/to/out.z64" - --mb 32 - --codec yaz - --cache "path/to/cache" - --dma "0x12F70,1548" - --compress "9-14,28-END" - --threads 4 - - compressing oot ntsc 1.0 - --in "path/to/in.z64" - --out "path/to/out.z64" - --mb 32 - --codec yaz - --cache "path/to/cache" - --dma "0x7430,1526" - --compress "10-14,27-END" - --threads 4 - - compressing mm usa - --in "path/to/in.z64" - --out "path/to/out.z64" - --mb 32 - --codec yaz - --cache "path/to/cache" - --dma "0x1A500,1568" - --compress "10-14,23,24,31-END" - --skip "1127" - --repack "15-20,22" - --threads 4 -``` - -## Arguments -``` - --in uncompressed input rom - - --out compressed output rom - - --matching attempt matching compression at the cost of - some optimizations and reduced performance - - --mb how many mb the compressed rom should be - - --codec currently supported codecs - yaz - ucl - lzo - aplib - * to use non-yaz codecs, find patches - and code on my z64enc repo - - --cache is optional and won't be created if - no path is specified (having a cache - makes subsequent compressions faster) - * pro-tip: linux users who don't want a - cache to persist across power cycles - can use the path "/tmp/z64compress" - - --dma specify dmadata address and count - - --compress enable compression on specified files - - --skip disable compression on specified files - - --repack handles Majora's Mask archives - - --threads optional multithreading; - exclude this argument to disable it - - --only-stdout reserve stderr for errors and print - everything else to stdout - - arguments are executed as they - are parsed, so order matters! -``` - -## Building -I have included shell scripts for building Linux and Windows binaries. Windows binaries are built using a cross compiler ([I recommend `MXE`](https://mxe.cc/)). - -Alternatively, a Makefile-based build system is provided. Choose the target platform with `make TARGET=linux64|linux32|win32`, default is linux64. If building for windows with a cross compiler, specify the compiler executable with `make TARGET=win32 CC=/path/to/executable`. diff --git a/tools/z64compress/release-linux.sh b/tools/z64compress/release-linux.sh deleted file mode 100755 index 24f4cb2d5a..0000000000 --- a/tools/z64compress/release-linux.sh +++ /dev/null @@ -1,14 +0,0 @@ -# build compression functions (slow) -gcc -DNDEBUG -s -Ofast -flto -lm -c -Wall -march=native -mtune=native src/enc/*.c src/enc/lzo/*.c src/enc/ucl/comp/*.c src/enc/apultra/*.c -mkdir -p o -mv *.o o - -# build everything else -gcc -o z64compress -DNDEBUG src/*.c o/*.o -Wall -Wextra -s -Os -flto -lpthread -march=native -mtune=native - -# move to bin directory -mkdir -p bin/linux64 -mv z64compress bin/linux64 - - - diff --git a/tools/z64compress/release-linux32.sh b/tools/z64compress/release-linux32.sh deleted file mode 100755 index 9f413e2965..0000000000 --- a/tools/z64compress/release-linux32.sh +++ /dev/null @@ -1,14 +0,0 @@ -# build compression functions (slow) -gcc -m32 -DNDEBUG -s -Ofast -flto -lm -c -Wall -march=native -mtune=native src/enc/*.c src/enc/lzo/*.c src/enc/ucl/comp/*.c src/enc/apultra/*.c -mkdir -p o -mv *.o o - -# build everything else -gcc -m32 -o z64compress -DNDEBUG src/*.c o/*.o -Wall -Wextra -s -Os -flto -lpthread -march=native -mtune=native - -# move to bin directory -mkdir -p bin/linux32 -mv z64compress bin/linux32 - - - diff --git a/tools/z64compress/release-win32.sh b/tools/z64compress/release-win32.sh deleted file mode 100755 index 5b115816d8..0000000000 --- a/tools/z64compress/release-win32.sh +++ /dev/null @@ -1,12 +0,0 @@ -# build compression functions (slow) -~/c/mxe/usr/bin/i686-w64-mingw32.static-gcc -DNDEBUG -s -Ofast -flto -lm -c -Wall src/enc/*.c src/enc/lzo/*.c src/enc/ucl/comp/*.c src/enc/apultra/*.c -mkdir -p o -mv *.o o - -# build everything else -~/c/mxe/usr/bin/i686-w64-mingw32.static-gcc -o z64compress.exe -DNDEBUG src/*.c o/*.o -Wall -Wextra -s -Os -flto -lpthread -mconsole -municode - -# move to bin directory -mkdir -p bin/win32 -mv z64compress.exe bin/win32 - diff --git a/tools/z64compress/src/enc/aplib.c b/tools/z64compress/src/enc/aplib.c deleted file mode 100644 index e4aa95f812..0000000000 --- a/tools/z64compress/src/enc/aplib.c +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include -#include "apultra/libapultra.h" - -static void compression_progress(long long nOriginalSize, long long nCompressedSize) { - /* do nothing */ -} - -int -aplenc( - void *_src - , unsigned src_sz - , void *_dst - , unsigned *dst_sz - , void *_ctx -) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - int nMaxCompressedSize = apultra_get_max_compressed_size(src_sz); - apultra_stats stats; - - int hlen = 8; /* header length; required due to MM's archives */ - memset(dst, 0, hlen); - memcpy(dst, "APL0", 4); - dst[4] = (src_sz >> 24); - dst[5] = (src_sz >> 16); - dst[6] = (src_sz >> 8); - dst[7] = (src_sz >> 0); - - *dst_sz = apultra_compress( - src - , dst + hlen - , src_sz - , nMaxCompressedSize - , 0 /* flags */ - , 0 /* nMaxWindowSize */ - , 0 /* nDictionarySize */ - , compression_progress - , &stats - ); - - *dst_sz = *dst_sz + hlen; - - return 0; -} - diff --git a/tools/z64compress/src/enc/apultra/apultra.c b/tools/z64compress/src/enc/apultra/apultra.c deleted file mode 100644 index a61d6b41c6..0000000000 --- a/tools/z64compress/src/enc/apultra/apultra.c +++ /dev/null @@ -1,1225 +0,0 @@ -#if 0 -/* - * apultra.c - command line compression utility for the apultra library - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#include -#include -#include -#ifdef _WIN32 -#include -#include -#else -#include -#endif -#include "libapultra.h" - -#define OPT_VERBOSE 1 -#define OPT_STATS 2 -#define OPT_BACKWARD 4 - -#define TOOL_VERSION "1.4.1" - -/*---------------------------------------------------------------------------*/ - -#ifdef _WIN32 -LARGE_INTEGER hpc_frequency; -BOOL hpc_available = FALSE; -#endif - -static void do_init_time() { -#ifdef _WIN32 - hpc_frequency.QuadPart = 0; - hpc_available = QueryPerformanceFrequency(&hpc_frequency); -#endif -} - -static long long do_get_time() { - long long nTime; - -#ifdef _WIN32 - if (hpc_available) { - LARGE_INTEGER nCurTime; - - /* Use HPC hardware for best precision */ - QueryPerformanceCounter(&nCurTime); - nTime = (long long)(nCurTime.QuadPart * 1000000LL / hpc_frequency.QuadPart); - } - else { - struct _timeb tb; - _ftime(&tb); - - nTime = ((long long)tb.time * 1000LL + (long long)tb.millitm) * 1000LL; - } -#else - struct timeval tm; - gettimeofday(&tm, NULL); - - nTime = (long long)tm.tv_sec * 1000000LL + (long long)tm.tv_usec; -#endif - return nTime; -} - -static void do_reverse_buffer(unsigned char *pBuffer, size_t nBufferSize) { - size_t nMidPoint = nBufferSize / 2; - size_t i, j; - - for (i = 0, j = nBufferSize - 1; i < nMidPoint; i++, j--) { - unsigned char c = pBuffer[i]; - pBuffer[i] = pBuffer[j]; - pBuffer[j] = c; - } -} - -/*---------------------------------------------------------------------------*/ - -static void compression_progress(long long nOriginalSize, long long nCompressedSize) { - if (nOriginalSize >= 512 * 1024) { - fprintf(stdout, "\r%lld => %lld (%g %%) \b\b\b\b\b", nOriginalSize, nCompressedSize, (double)(nCompressedSize * 100.0 / nOriginalSize)); - fflush(stdout); - } -} - -static int do_compress(const char *pszInFilename, const char *pszOutFilename, const char *pszDictionaryFilename, const unsigned int nOptions, const unsigned int nMaxWindowSize) { - long long nStartTime = 0LL, nEndTime = 0LL; - size_t nOriginalSize = 0L, nCompressedSize = 0L, nMaxCompressedSize; - int nFlags = 0; - apultra_stats stats; - unsigned char *pDecompressedData; - unsigned char *pCompressedData; - - if (nOptions & OPT_VERBOSE) { - nStartTime = do_get_time(); - } - - FILE* f_dict = NULL; - size_t nDictionarySize = 0; - if (pszDictionaryFilename) { - /* Open the dictionary */ - f_dict = fopen(pszDictionaryFilename, "rb"); - if (!f_dict) { - fprintf(stderr, "error opening dictionary '%s' for reading\n", pszDictionaryFilename); - return 100; - } - - /* Get dictionary size */ - fseek(f_dict, 0, SEEK_END); - nDictionarySize = (size_t)ftell(f_dict); - fseek(f_dict, 0, SEEK_SET); - - if (nDictionarySize > BLOCK_SIZE) nDictionarySize = BLOCK_SIZE; - } - - /* Read the whole original file in memory */ - - FILE *f_in = fopen(pszInFilename, "rb"); - if (!f_in) { - if (f_dict) fclose(f_dict); - fprintf(stderr, "error opening '%s' for reading\n", pszInFilename); - return 100; - } - - fseek(f_in, 0, SEEK_END); - nOriginalSize = (size_t)ftell(f_in); - fseek(f_in, 0, SEEK_SET); - - pDecompressedData = (unsigned char*)malloc(nDictionarySize + nOriginalSize); - if (!pDecompressedData) { - fclose(f_in); - if (f_dict) fclose(f_dict); - fprintf(stderr, "out of memory for reading '%s', %zd bytes needed\n", pszInFilename, nOriginalSize); - return 100; - } - - if (f_dict) { - /* Read dictionary data */ - if (fread(pDecompressedData + ((nOptions & OPT_BACKWARD) ? nOriginalSize : 0), 1, nDictionarySize, f_dict) != nDictionarySize) { - free(pDecompressedData); - fclose(f_in); - fclose(f_dict); - fprintf(stderr, "I/O error while reading dictionary '%s'\n", pszDictionaryFilename); - return 100; - } - - fclose(f_dict); - f_dict = NULL; - } - - /* Read input file data */ - if (fread(pDecompressedData + ((nOptions & OPT_BACKWARD) ? 0 : nDictionarySize), 1, nOriginalSize, f_in) != nOriginalSize) { - free(pDecompressedData); - fclose(f_in); - fprintf(stderr, "I/O error while reading '%s'\n", pszInFilename); - return 100; - } - - fclose(f_in); - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pDecompressedData, nDictionarySize + nOriginalSize); - - /* Allocate max compressed size */ - - nMaxCompressedSize = apultra_get_max_compressed_size(nDictionarySize + nOriginalSize); - - pCompressedData = (unsigned char*)malloc(nMaxCompressedSize); - if (!pCompressedData) { - free(pDecompressedData); - fprintf(stderr, "out of memory for compressing '%s', %zd bytes needed\n", pszInFilename, nMaxCompressedSize); - return 100; - } - - memset(pCompressedData, 0, nMaxCompressedSize); - - nCompressedSize = apultra_compress(pDecompressedData, pCompressedData, nDictionarySize + nOriginalSize, nMaxCompressedSize, nFlags, nMaxWindowSize, nDictionarySize, compression_progress, &stats); - - if ((nOptions & OPT_VERBOSE)) { - nEndTime = do_get_time(); - } - - if (nCompressedSize == -1) { - free(pCompressedData); - free(pDecompressedData); - fprintf(stderr, "compression error for '%s'\n", pszInFilename); - return 100; - } - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pCompressedData, nCompressedSize); - - if (pszOutFilename) { - FILE *f_out; - - /* Write whole compressed file out */ - - f_out = fopen(pszOutFilename, "wb"); - if (f_out) { - fwrite(pCompressedData, 1, nCompressedSize, f_out); - fclose(f_out); - } - } - - free(pCompressedData); - free(pDecompressedData); - - if ((nOptions & OPT_VERBOSE)) { - double fDelta = ((double)(nEndTime - nStartTime)) / 1000000.0; - double fSpeed = ((double)nOriginalSize / 1048576.0) / fDelta; - fprintf(stdout, "\rCompressed '%s' in %g seconds, %.02g Mb/s, %d tokens (%g bytes/token), %d into %d bytes ==> %g %%\n", - pszInFilename, fDelta, fSpeed, stats.commands_divisor, (double)nOriginalSize / (double)stats.commands_divisor, - (int)nOriginalSize, (int)nCompressedSize, (double)(nCompressedSize * 100.0 / nOriginalSize)); - } - - if (nOptions & OPT_STATS) { - fprintf(stdout, "Tokens: literals: %d short matches: %d normal matches: %d large matches: %d rep matches: %d EOD: %d\n", - stats.num_literals, stats.num_4bit_matches, stats.num_7bit_matches, stats.num_variable_matches, stats.num_rep_matches, stats.num_eod); - if (stats.match_divisor > 0) { - fprintf(stdout, "Offsets: min: %d avg: %d max: %d count: %d\n", stats.min_offset, (int)(stats.total_offsets / (long long)stats.match_divisor), stats.max_offset, stats.match_divisor); - fprintf(stdout, "Match lens: min: %d avg: %d max: %d count: %d\n", stats.min_match_len, stats.total_match_lens / stats.match_divisor, stats.max_match_len, stats.match_divisor); - } - else { - fprintf(stdout, "Offsets: none\n"); - fprintf(stdout, "Match lens: none\n"); - } - if (stats.rle1_divisor > 0) { - fprintf(stdout, "RLE1 lens: min: %d avg: %d max: %d count: %d\n", stats.min_rle1_len, stats.total_rle1_lens / stats.rle1_divisor, stats.max_rle1_len, stats.rle1_divisor); - } - else { - fprintf(stdout, "RLE1 lens: none\n"); - } - if (stats.rle2_divisor > 0) { - fprintf(stdout, "RLE2 lens: min: %d avg: %d max: %d count: %d\n", stats.min_rle2_len, stats.total_rle2_lens / stats.rle2_divisor, stats.max_rle2_len, stats.rle2_divisor); - } - else { - fprintf(stdout, "RLE2 lens: none\n"); - } - fprintf(stdout, "Safe distance: %d (0x%X)\n", stats.safe_dist, stats.safe_dist); - } - return 0; -} - -/*---------------------------------------------------------------------------*/ - -static int do_decompress(const char *pszInFilename, const char *pszOutFilename, const char *pszDictionaryFilename, const unsigned int nOptions) { - long long nStartTime = 0LL, nEndTime = 0LL; - size_t nCompressedSize, nMaxDecompressedSize, nOriginalSize; - unsigned char *pCompressedData; - unsigned char *pDecompressedData; - int nFlags = 0; - - /* Read the whole compressed file in memory */ - - FILE *f_in = fopen(pszInFilename, "rb"); - if (!f_in) { - fprintf(stderr, "error opening '%s' for reading\n", pszInFilename); - return 100; - } - - fseek(f_in, 0, SEEK_END); - nCompressedSize = (size_t)ftell(f_in); - fseek(f_in, 0, SEEK_SET); - - pCompressedData = (unsigned char*)malloc(nCompressedSize); - if (!pCompressedData) { - fclose(f_in); - fprintf(stderr, "out of memory for reading '%s', %zd bytes needed\n", pszInFilename, nCompressedSize); - return 100; - } - - if (fread(pCompressedData, 1, nCompressedSize, f_in) != nCompressedSize) { - free(pCompressedData); - fclose(f_in); - fprintf(stderr, "I/O error while reading '%s'\n", pszInFilename); - return 100; - } - - fclose(f_in); - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pCompressedData, nCompressedSize); - - /* Get max decompressed size */ - - nMaxDecompressedSize = apultra_get_max_decompressed_size(pCompressedData, nCompressedSize, nFlags); - if (nMaxDecompressedSize == -1) { - free(pCompressedData); - fprintf(stderr, "invalid compressed format for file '%s'\n", pszInFilename); - return 100; - } - - FILE* f_dict = NULL; - size_t nDictionarySize = 0; - if (pszDictionaryFilename) { - /* Open the dictionary */ - f_dict = fopen(pszDictionaryFilename, "rb"); - if (!f_dict) { - fprintf(stderr, "error opening dictionary '%s' for reading\n", pszDictionaryFilename); - return 100; - } - - /* Get dictionary size */ - fseek(f_dict, 0, SEEK_END); - nDictionarySize = (size_t)ftell(f_dict); - fseek(f_dict, 0, SEEK_SET); - - if (nDictionarySize > BLOCK_SIZE) nDictionarySize = BLOCK_SIZE; - } - - /* Allocate max decompressed size */ - - pDecompressedData = (unsigned char*)malloc(nDictionarySize + nMaxDecompressedSize); - if (!pDecompressedData) { - free(pCompressedData); - if (f_dict) fclose(f_dict); - fprintf(stderr, "out of memory for decompressing '%s', %zd bytes needed\n", pszInFilename, nMaxDecompressedSize); - return 100; - } - - memset(pDecompressedData, 0, nDictionarySize + nMaxDecompressedSize); - - if (f_dict) { - /* Read dictionary data */ - if (fread(pDecompressedData, 1, nDictionarySize, f_dict) != nDictionarySize) { - free(pDecompressedData); - fclose(f_in); - fclose(f_dict); - fprintf(stderr, "I/O error while reading dictionary '%s'\n", pszDictionaryFilename); - return 100; - } - - fclose(f_dict); - f_dict = NULL; - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pDecompressedData, nDictionarySize); - } - - if (nOptions & OPT_VERBOSE) { - nStartTime = do_get_time(); - } - - nOriginalSize = apultra_decompress(pCompressedData, pDecompressedData, nCompressedSize, nMaxDecompressedSize, nDictionarySize, nFlags); - if (nOriginalSize == -1) { - free(pDecompressedData); - free(pCompressedData); - - fprintf(stderr, "decompression error for '%s'\n", pszInFilename); - return 100; - } - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pDecompressedData + nDictionarySize, nOriginalSize); - - if (pszOutFilename) { - FILE *f_out; - - /* Write whole decompressed file out */ - - f_out = fopen(pszOutFilename, "wb"); - if (f_out) { - fwrite(pDecompressedData + nDictionarySize, 1, nOriginalSize, f_out); - fclose(f_out); - } - } - - free(pDecompressedData); - free(pCompressedData); - - if (nOptions & OPT_VERBOSE) { - nEndTime = do_get_time(); - double fDelta = ((double)(nEndTime - nStartTime)) / 1000000.0; - double fSpeed = ((double)nOriginalSize / 1048576.0) / fDelta; - fprintf(stdout, "Decompressed '%s' in %g seconds, %g Mb/s\n", - pszInFilename, fDelta, fSpeed); - } - - return 0; -} - -/*---------------------------------------------------------------------------*/ - -static int do_compare(const char *pszInFilename, const char *pszOutFilename, const char *pszDictionaryFilename, const unsigned int nOptions) { - long long nStartTime = 0LL, nEndTime = 0LL; - size_t nCompressedSize, nMaxDecompressedSize, nOriginalSize, nDecompressedSize; - unsigned char *pCompressedData = NULL; - unsigned char *pOriginalData = NULL; - unsigned char *pDecompressedData = NULL; - int nFlags = 0; - - /* Read the whole compressed file in memory */ - - FILE *f_in = fopen(pszInFilename, "rb"); - if (!f_in) { - fprintf(stderr, "error opening '%s' for reading\n", pszInFilename); - return 100; - } - - fseek(f_in, 0, SEEK_END); - nCompressedSize = (size_t)ftell(f_in); - fseek(f_in, 0, SEEK_SET); - - pCompressedData = (unsigned char*)malloc(nCompressedSize); - if (!pCompressedData) { - fclose(f_in); - fprintf(stderr, "out of memory for reading '%s', %zd bytes needed\n", pszInFilename, nCompressedSize); - return 100; - } - - if (fread(pCompressedData, 1, nCompressedSize, f_in) != nCompressedSize) { - free(pCompressedData); - fclose(f_in); - fprintf(stderr, "I/O error while reading '%s'\n", pszInFilename); - return 100; - } - - fclose(f_in); - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pCompressedData, nCompressedSize); - - /* Read the whole original file in memory */ - - f_in = fopen(pszOutFilename, "rb"); - if (!f_in) { - free(pCompressedData); - fprintf(stderr, "error opening '%s' for reading\n", pszInFilename); - return 100; - } - - fseek(f_in, 0, SEEK_END); - nOriginalSize = (size_t)ftell(f_in); - fseek(f_in, 0, SEEK_SET); - - pOriginalData = (unsigned char*)malloc(nOriginalSize); - if (!pOriginalData) { - fclose(f_in); - free(pCompressedData); - fprintf(stderr, "out of memory for reading '%s', %zd bytes needed\n", pszInFilename, nOriginalSize); - return 100; - } - - if (fread(pOriginalData, 1, nOriginalSize, f_in) != nOriginalSize) { - free(pOriginalData); - fclose(f_in); - free(pCompressedData); - fprintf(stderr, "I/O error while reading '%s'\n", pszInFilename); - return 100; - } - - fclose(f_in); - - /* Get max decompressed size */ - - nMaxDecompressedSize = apultra_get_max_decompressed_size(pCompressedData, nCompressedSize, nFlags); - if (nMaxDecompressedSize == -1) { - free(pOriginalData); - free(pCompressedData); - fprintf(stderr, "invalid compressed format for file '%s'\n", pszInFilename); - return 100; - } - - FILE* f_dict = NULL; - size_t nDictionarySize = 0; - if (pszDictionaryFilename) { - /* Open the dictionary */ - f_dict = fopen(pszDictionaryFilename, "rb"); - if (!f_dict) { - fprintf(stderr, "error opening dictionary '%s' for reading\n", pszDictionaryFilename); - return 100; - } - - /* Get dictionary size */ - fseek(f_dict, 0, SEEK_END); - nDictionarySize = (size_t)ftell(f_dict); - fseek(f_dict, 0, SEEK_SET); - - if (nDictionarySize > BLOCK_SIZE) nDictionarySize = BLOCK_SIZE; - } - - /* Allocate max decompressed size */ - - pDecompressedData = (unsigned char*)malloc(nDictionarySize + nMaxDecompressedSize); - if (!pDecompressedData) { - free(pOriginalData); - free(pCompressedData); - if (f_dict) fclose(f_dict); - fprintf(stderr, "out of memory for decompressing '%s', %zd bytes needed\n", pszInFilename, nMaxDecompressedSize); - return 100; - } - - memset(pDecompressedData, 0, nDictionarySize + nMaxDecompressedSize); - - if (f_dict) { - /* Read dictionary data */ - if (fread(pDecompressedData, 1, nDictionarySize, f_dict) != nDictionarySize) { - free(pDecompressedData); - fclose(f_in); - fclose(f_dict); - fprintf(stderr, "I/O error while reading dictionary '%s'\n", pszDictionaryFilename); - return 100; - } - - fclose(f_dict); - f_dict = NULL; - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pDecompressedData, nDictionarySize); - } - - if (nOptions & OPT_VERBOSE) { - nStartTime = do_get_time(); - } - - nDecompressedSize = apultra_decompress(pCompressedData, pDecompressedData, nCompressedSize, nMaxDecompressedSize, nDictionarySize, nFlags); - if (nDecompressedSize == -1) { - free(pDecompressedData); - free(pOriginalData); - free(pCompressedData); - - fprintf(stderr, "decompression error for '%s'\n", pszInFilename); - return 100; - } - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pDecompressedData + nDictionarySize, nDecompressedSize); - - if (nDecompressedSize != nOriginalSize || memcmp(pDecompressedData + nDictionarySize, pOriginalData, nOriginalSize)) { - fprintf(stderr, "error comparing compressed file '%s' with original '%s'\n", pszInFilename, pszOutFilename); - return 100; - } - - free(pDecompressedData); - free(pOriginalData); - free(pCompressedData); - - if (nOptions & OPT_VERBOSE) { - nEndTime = do_get_time(); - double fDelta = ((double)(nEndTime - nStartTime)) / 1000000.0; - double fSpeed = ((double)nOriginalSize / 1048576.0) / fDelta; - fprintf(stdout, "Compared '%s' in %g seconds, %g Mb/s\n", - pszInFilename, fDelta, fSpeed); - } - - return 0; -} - -/*---------------------------------------------------------------------------*/ - -static void generate_compressible_data(unsigned char *pBuffer, size_t nBufferSize, unsigned int nSeed, int nNumLiteralValues, float fMatchProbability) { - size_t nIndex = 0; - int nMatchProbability = (int)(fMatchProbability * 1023.0f); - - srand(nSeed); - - if (nIndex >= nBufferSize) return; - pBuffer[nIndex++] = rand() % nNumLiteralValues; - - while (nIndex < nBufferSize) { - if ((rand() & 1023) >= nMatchProbability) { - size_t nLiteralCount = rand() & 127; - if (nLiteralCount > (nBufferSize - nIndex)) - nLiteralCount = nBufferSize - nIndex; - - while (nLiteralCount--) - pBuffer[nIndex++] = rand() % nNumLiteralValues; - } - else { - size_t nMatchLength = MIN_MATCH_SIZE + (rand() & 1023); - size_t nMatchOffset; - - if (nMatchLength > (nBufferSize - nIndex)) - nMatchLength = nBufferSize - nIndex; - if (nMatchLength > nIndex) - nMatchLength = nIndex; - - if (nMatchLength < nIndex) - nMatchOffset = rand() % (nIndex - nMatchLength); - else - nMatchOffset = 0; - - while (nMatchLength--) { - pBuffer[nIndex] = pBuffer[nIndex - nMatchOffset]; - nIndex++; - } - } - } -} - -static void xor_data(unsigned char *pBuffer, size_t nBufferSize, unsigned int nSeed, float fXorProbability) { - size_t nIndex = 0; - int nXorProbability = (int)(fXorProbability * 1023.0f); - - srand(nSeed); - - if (nIndex >= nBufferSize) return; - - while (nIndex < nBufferSize) { - if ((rand() & 1023) < nXorProbability) { - pBuffer[nIndex] ^= 0xff; - } - nIndex++; - } -} - -static int do_self_test(const unsigned int nOptions, const unsigned int nMaxWindowSize, const int nIsQuickTest) { - unsigned char *pGeneratedData; - unsigned char *pCompressedData; - unsigned char *pTmpCompressedData; - unsigned char *pTmpDecompressedData; - size_t nGeneratedDataSize; - size_t nMaxCompressedDataSize; - unsigned int nSeed = 123; - int nFlags = 0; - int i; - - pGeneratedData = (unsigned char*)malloc(4 * BLOCK_SIZE); - if (!pGeneratedData) { - fprintf(stderr, "out of memory, %d bytes needed\n", 4 * BLOCK_SIZE); - return 100; - } - - nMaxCompressedDataSize = apultra_get_max_compressed_size(4 * BLOCK_SIZE); - pCompressedData = (unsigned char*)malloc(nMaxCompressedDataSize); - if (!pCompressedData) { - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stderr, "out of memory, %zd bytes needed\n", nMaxCompressedDataSize); - return 100; - } - - pTmpCompressedData = (unsigned char*)malloc(nMaxCompressedDataSize); - if (!pTmpCompressedData) { - free(pCompressedData); - pCompressedData = NULL; - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stderr, "out of memory, %zd bytes needed\n", nMaxCompressedDataSize); - return 100; - } - - pTmpDecompressedData = (unsigned char*)malloc(4 * BLOCK_SIZE); - if (!pTmpDecompressedData) { - free(pTmpCompressedData); - pTmpCompressedData = NULL; - free(pCompressedData); - pCompressedData = NULL; - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stderr, "out of memory, %d bytes needed\n", 4 * BLOCK_SIZE); - return 100; - } - - memset(pGeneratedData, 0, 4 * BLOCK_SIZE); - memset(pCompressedData, 0, nMaxCompressedDataSize); - memset(pTmpCompressedData, 0, nMaxCompressedDataSize); - - /* Test compressing with a too small buffer to do anything, expect to fail cleanly */ - for (i = 0; i < 12; i++) { - generate_compressible_data(pGeneratedData, i, nSeed, 256, 0.5f); - apultra_compress(pGeneratedData, pCompressedData, i, i, nFlags, nMaxWindowSize, 0 /* dictionary size */, NULL, NULL); - } - - size_t nDataSizeStep = 128; - float fProbabilitySizeStep = nIsQuickTest ? 0.005f : 0.0005f; - - for (nGeneratedDataSize = 1024; nGeneratedDataSize <= (nIsQuickTest ? 1024U : (4U * BLOCK_SIZE)); nGeneratedDataSize += nDataSizeStep) { - float fMatchProbability; - - fprintf(stdout, "size %zd", nGeneratedDataSize); - for (fMatchProbability = 0; fMatchProbability <= 0.995f; fMatchProbability += fProbabilitySizeStep) { - int nNumLiteralValues[12] = { 1, 2, 3, 15, 30, 56, 96, 137, 178, 191, 255, 256 }; - float fXorProbability; - - fputc('.', stdout); - fflush(stdout); - - for (i = 0; i < 12; i++) { - /* Generate data to compress */ - generate_compressible_data(pGeneratedData, nGeneratedDataSize, nSeed, nNumLiteralValues[i], fMatchProbability); - - /* Try to compress it, expected to succeed */ - size_t nActualCompressedSize = apultra_compress(pGeneratedData, pCompressedData, nGeneratedDataSize, apultra_get_max_compressed_size(nGeneratedDataSize), - nFlags, nMaxWindowSize, 0 /* dictionary size */, NULL, NULL); - if (nActualCompressedSize == -1 || nActualCompressedSize < (1 + 1 + 1 /* footer */)) { - free(pTmpDecompressedData); - pTmpDecompressedData = NULL; - free(pTmpCompressedData); - pTmpCompressedData = NULL; - free(pCompressedData); - pCompressedData = NULL; - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stderr, "\nself-test: error compressing size %zd, seed %d, match probability %f, literals range %d\n", nGeneratedDataSize, nSeed, fMatchProbability, nNumLiteralValues[i]); - return 100; - } - - /* Try to decompress it, expected to succeed */ - size_t nActualDecompressedSize; - nActualDecompressedSize = apultra_decompress(pCompressedData, pTmpDecompressedData, nActualCompressedSize, nGeneratedDataSize, 0 /* dictionary size */, nFlags); - if (nActualDecompressedSize == -1) { - free(pTmpDecompressedData); - pTmpDecompressedData = NULL; - free(pTmpCompressedData); - pTmpCompressedData = NULL; - free(pCompressedData); - pCompressedData = NULL; - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stderr, "\nself-test: error decompressing size %zd, seed %d, match probability %f, literals range %d\n", nGeneratedDataSize, nSeed, fMatchProbability, nNumLiteralValues[i]); - return 100; - } - - if (memcmp(pGeneratedData, pTmpDecompressedData, nGeneratedDataSize)) { - free(pTmpDecompressedData); - pTmpDecompressedData = NULL; - free(pTmpCompressedData); - pTmpCompressedData = NULL; - free(pCompressedData); - pCompressedData = NULL; - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stderr, "\nself-test: error comparing decompressed and original data, size %zd, seed %d, match probability %f, literals range %d\n", nGeneratedDataSize, nSeed, fMatchProbability, nNumLiteralValues[i]); - return 100; - } - - /* Try to decompress corrupted data, expected to fail cleanly, without crashing or corrupting memory outside the output buffer */ - for (fXorProbability = 0.05f; fXorProbability <= 0.5f; fXorProbability += 0.05f) { - memcpy(pTmpCompressedData, pCompressedData, nActualCompressedSize); - xor_data(pTmpCompressedData, nActualCompressedSize, nSeed, fXorProbability); - apultra_decompress(pTmpCompressedData, pGeneratedData, nActualCompressedSize, nGeneratedDataSize, 0 /* dictionary size */, nFlags); - } - } - - nSeed++; - } - - fputc(10, stdout); - fflush(stdout); - - nDataSizeStep <<= 1; - if (nDataSizeStep > (128 * 4096)) - nDataSizeStep = 128 * 4096; - fProbabilitySizeStep *= 1.25; - if (fProbabilitySizeStep > (0.0005f * 4096)) - fProbabilitySizeStep = 0.0005f * 4096; - } - - free(pTmpDecompressedData); - pTmpDecompressedData = NULL; - - free(pTmpCompressedData); - pTmpCompressedData = NULL; - - free(pCompressedData); - pCompressedData = NULL; - - free(pGeneratedData); - pGeneratedData = NULL; - - fprintf(stdout, "All tests passed.\n"); - return 0; -} - -/*---------------------------------------------------------------------------*/ - -static int do_compr_benchmark(const char *pszInFilename, const char *pszOutFilename, const char *pszDictionaryFilename, const unsigned int nOptions, const unsigned int nMaxWindowSize) { - size_t nFileSize, nMaxCompressedSize; - unsigned char *pFileData; - unsigned char *pCompressedData; - int nFlags = 0; - int i; - - if (pszDictionaryFilename) { - fprintf(stderr, "in-memory benchmarking does not support dictionaries\n"); - return 100; - } - - /* Read the whole original file in memory */ - - FILE *f_in = fopen(pszInFilename, "rb"); - if (!f_in) { - fprintf(stderr, "error opening '%s' for reading\n", pszInFilename); - return 100; - } - - fseek(f_in, 0, SEEK_END); - nFileSize = (size_t)ftell(f_in); - fseek(f_in, 0, SEEK_SET); - - pFileData = (unsigned char*)malloc(nFileSize); - if (!pFileData) { - fclose(f_in); - fprintf(stderr, "out of memory for reading '%s', %zd bytes needed\n", pszInFilename, nFileSize); - return 100; - } - - if (fread(pFileData, 1, nFileSize, f_in) != nFileSize) { - free(pFileData); - fclose(f_in); - fprintf(stderr, "I/O error while reading '%s'\n", pszInFilename); - return 100; - } - - fclose(f_in); - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pFileData, nFileSize); - - /* Allocate max compressed size */ - - nMaxCompressedSize = apultra_get_max_compressed_size(nFileSize); - - pCompressedData = (unsigned char*)malloc(nMaxCompressedSize + 2048); - if (!pCompressedData) { - free(pFileData); - fprintf(stderr, "out of memory for compressing '%s', %zd bytes needed\n", pszInFilename, nMaxCompressedSize); - return 100; - } - - memset(pCompressedData + 1024, 0, nMaxCompressedSize); - - long long nBestCompTime = -1; - - size_t nActualCompressedSize = 0; - size_t nRightGuardPos = nMaxCompressedSize; - - for (i = 0; i < 5; i++) { - unsigned char nGuard = 0x33 + i; - int j; - - /* Write guard bytes around the output buffer, to help check for writes outside of it by the compressor */ - memset(pCompressedData, nGuard, 1024); - memset(pCompressedData + 1024 + nRightGuardPos, nGuard, 1024); - - long long t0 = do_get_time(); - nActualCompressedSize = apultra_compress(pFileData, pCompressedData + 1024, nFileSize, nRightGuardPos, nFlags, nMaxWindowSize, 0 /* dictionary size */, NULL, NULL); - long long t1 = do_get_time(); - if (nActualCompressedSize == -1) { - free(pCompressedData); - free(pFileData); - fprintf(stderr, "compression error\n"); - return 100; - } - - long long nCurDecTime = t1 - t0; - if (nBestCompTime == -1 || nBestCompTime > nCurDecTime) - nBestCompTime = nCurDecTime; - - /* Check guard bytes before the output buffer */ - for (j = 0; j < 1024; j++) { - if (pCompressedData[j] != nGuard) { - free(pCompressedData); - free(pFileData); - fprintf(stderr, "error, wrote outside of output buffer at %d!\n", j - 1024); - return 100; - } - } - - /* Check guard bytes after the output buffer */ - for (j = 0; j < 1024; j++) { - if (pCompressedData[1024 + nRightGuardPos + j] != nGuard) { - free(pCompressedData); - free(pFileData); - fprintf(stderr, "error, wrote outside of output buffer at %d!\n", j); - return 100; - } - } - - nRightGuardPos = nActualCompressedSize; - } - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pCompressedData + 1024, nActualCompressedSize); - - if (pszOutFilename) { - FILE *f_out; - - /* Write whole compressed file out */ - - f_out = fopen(pszOutFilename, "wb"); - if (f_out) { - fwrite(pCompressedData + 1024, 1, nActualCompressedSize, f_out); - fclose(f_out); - } - } - - free(pCompressedData); - free(pFileData); - - fprintf(stdout, "compressed size: %zd bytes\n", nActualCompressedSize); - fprintf(stdout, "compression time: %lld microseconds (%g Mb/s)\n", nBestCompTime, ((double)nActualCompressedSize / 1024.0) / ((double)nBestCompTime / 1000.0)); - - return 0; -} - -/*---------------------------------------------------------------------------*/ - -static int do_dec_benchmark(const char *pszInFilename, const char *pszOutFilename, const char *pszDictionaryFilename, const unsigned int nOptions) { - size_t nFileSize, nMaxDecompressedSize; - unsigned char *pFileData; - unsigned char *pDecompressedData; - int nFlags = 0; - int i; - - if (pszDictionaryFilename) { - fprintf(stderr, "in-memory benchmarking does not support dictionaries\n"); - return 100; - } - - /* Read the whole compressed file in memory */ - - FILE *f_in = fopen(pszInFilename, "rb"); - if (!f_in) { - fprintf(stderr, "error opening '%s' for reading\n", pszInFilename); - return 100; - } - - fseek(f_in, 0, SEEK_END); - nFileSize = (size_t)ftell(f_in); - fseek(f_in, 0, SEEK_SET); - - pFileData = (unsigned char*)malloc(nFileSize); - if (!pFileData) { - fclose(f_in); - fprintf(stderr, "out of memory for reading '%s', %zd bytes needed\n", pszInFilename, nFileSize); - return 100; - } - - if (fread(pFileData, 1, nFileSize, f_in) != nFileSize) { - free(pFileData); - fclose(f_in); - fprintf(stderr, "I/O error while reading '%s'\n", pszInFilename); - return 100; - } - - fclose(f_in); - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pFileData, nFileSize); - - /* Allocate max decompressed size */ - - nMaxDecompressedSize = apultra_get_max_decompressed_size(pFileData, nFileSize, nFlags); - if (nMaxDecompressedSize == -1) { - free(pFileData); - fprintf(stderr, "invalid compressed format for file '%s'\n", pszInFilename); - return 100; - } - - pDecompressedData = (unsigned char*)malloc(nMaxDecompressedSize); - if (!pDecompressedData) { - free(pFileData); - fprintf(stderr, "out of memory for decompressing '%s', %zd bytes needed\n", pszInFilename, nMaxDecompressedSize); - return 100; - } - - memset(pDecompressedData, 0, nMaxDecompressedSize); - - long long nBestDecTime = -1; - - size_t nActualDecompressedSize = 0; - for (i = 0; i < 50; i++) { - long long t0 = do_get_time(); - nActualDecompressedSize = apultra_decompress(pFileData, pDecompressedData, nFileSize, nMaxDecompressedSize, 0 /* dictionary size */, nFlags); - long long t1 = do_get_time(); - if (nActualDecompressedSize == -1) { - free(pDecompressedData); - free(pFileData); - fprintf(stderr, "decompression error\n"); - return 100; - } - - long long nCurDecTime = t1 - t0; - if (nBestDecTime == -1 || nBestDecTime > nCurDecTime) - nBestDecTime = nCurDecTime; - } - - if (nOptions & OPT_BACKWARD) - do_reverse_buffer(pDecompressedData, nActualDecompressedSize); - - if (pszOutFilename) { - FILE *f_out; - - /* Write whole decompressed file out */ - - f_out = fopen(pszOutFilename, "wb"); - if (f_out) { - fwrite(pDecompressedData, 1, nActualDecompressedSize, f_out); - fclose(f_out); - } - } - - free(pDecompressedData); - free(pFileData); - - fprintf(stdout, "decompressed size: %zd bytes\n", nActualDecompressedSize); - fprintf(stdout, "decompression time: %lld microseconds (%g Mb/s)\n", nBestDecTime, ((double)nActualDecompressedSize / 1024.0) / ((double)nBestDecTime / 1000.0)); - - return 0; -} - -/*---------------------------------------------------------------------------*/ - -int main(int argc, char **argv) { - int i; - const char *pszInFilename = NULL; - const char *pszOutFilename = NULL; - const char *pszDictionaryFilename = NULL; - int nArgsError = 0; - int nCommandDefined = 0; - int nVerifyCompression = 0; - char cCommand = 'z'; - unsigned int nOptions = 0; - unsigned int nMaxWindowSize = 0; - - for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-d")) { - if (!nCommandDefined) { - nCommandDefined = 1; - cCommand = 'd'; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-z")) { - if (!nCommandDefined) { - nCommandDefined = 1; - cCommand = 'z'; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-c")) { - if (!nVerifyCompression) { - nVerifyCompression = 1; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-cbench")) { - if (!nCommandDefined) { - nCommandDefined = 1; - cCommand = 'B'; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-dbench")) { - if (!nCommandDefined) { - nCommandDefined = 1; - cCommand = 'b'; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-test")) { - if (!nCommandDefined) { - nCommandDefined = 1; - cCommand = 't'; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-quicktest")) { - if (!nCommandDefined) { - nCommandDefined = 1; - cCommand = 'T'; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-D")) { - if (!pszDictionaryFilename && (i + 1) < argc) { - pszDictionaryFilename = argv[i + 1]; - i++; - } - else - nArgsError = 1; - } - else if (!strncmp(argv[i], "-D", 2)) { - if (!pszDictionaryFilename) { - pszDictionaryFilename = argv[i] + 2; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-v")) { - if ((nOptions & OPT_VERBOSE) == 0) { - nOptions |= OPT_VERBOSE; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-w")) { - if (!nMaxWindowSize && (i + 1) < argc) { - char *pEnd = NULL; - nMaxWindowSize = (int)strtol(argv[i + 1], &pEnd, 10); - if (pEnd && pEnd != argv[i + 1] && (nMaxWindowSize >= 16 && nMaxWindowSize <= 0x200000)) { - i++; - } - else { - nArgsError = 1; - } - } - else - nArgsError = 1; - } - else if (!strncmp(argv[i], "-w", 2)) { - if (!nMaxWindowSize) { - char *pEnd = NULL; - nMaxWindowSize = (int)strtol(argv[i] + 2, &pEnd, 10); - if (!(pEnd && pEnd != (argv[i] + 2) && (nMaxWindowSize >= 16 && nMaxWindowSize <= 0x200000))) { - nArgsError = 1; - } - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-stats")) { - if ((nOptions & OPT_STATS) == 0) { - nOptions |= OPT_STATS; - } - else - nArgsError = 1; - } - else if (!strcmp(argv[i], "-b")) { - if ((nOptions & OPT_BACKWARD) == 0) { - nOptions |= OPT_BACKWARD; - } - else - nArgsError = 1; - } - else { - if (!pszInFilename) - pszInFilename = argv[i]; - else { - if (!pszOutFilename) - pszOutFilename = argv[i]; - else - nArgsError = 1; - } - } - } - - if (!nArgsError && cCommand == 't') { - return do_self_test(nOptions, nMaxWindowSize, 0); - } - else if (!nArgsError && cCommand == 'T') { - return do_self_test(nOptions, nMaxWindowSize, 1); - } - - if (nArgsError || !pszInFilename || !pszOutFilename) { - fprintf(stderr, "apultra command-line tool v" TOOL_VERSION " by Emmanuel Marty and spke\n"); - fprintf(stderr, "usage: %s [-c] [-d] [-v] [-b] \n", argv[0]); - fprintf(stderr, " -c: check resulting stream after compressing\n"); - fprintf(stderr, " -d: decompress (default: compress)\n"); - fprintf(stderr, " -b: backwards compression or decompression\n"); - fprintf(stderr, " -w : maximum window size, in bytes (16..2097152), defaults to maximum\n"); - fprintf(stderr, " -D : use dictionary file\n"); - fprintf(stderr, " -cbench: benchmark in-memory compression\n"); - fprintf(stderr, " -dbench: benchmark in-memory decompression\n"); - fprintf(stderr, " -test: run full automated self-tests\n"); - fprintf(stderr, "-quicktest: run quick automated self-tests\n"); - fprintf(stderr, " -stats: show compressed data stats\n"); - fprintf(stderr, " -v: be verbose\n"); - return 100; - } - - do_init_time(); - - if (cCommand == 'z') { - int nResult = do_compress(pszInFilename, pszOutFilename, pszDictionaryFilename, nOptions, nMaxWindowSize); - if (nResult == 0 && nVerifyCompression) { - return do_compare(pszOutFilename, pszInFilename, pszDictionaryFilename, nOptions); - } else { - return nResult; - } - } - else if (cCommand == 'd') { - return do_decompress(pszInFilename, pszOutFilename, pszDictionaryFilename, nOptions); - } - else if (cCommand == 'B') { - return do_compr_benchmark(pszInFilename, pszOutFilename, pszDictionaryFilename, nOptions, nMaxWindowSize); - } - else if (cCommand == 'b') { - return do_dec_benchmark(pszInFilename, pszOutFilename, pszDictionaryFilename, nOptions); - } - else { - return 100; - } -} -#endif diff --git a/tools/z64compress/src/enc/apultra/divsufsort.c b/tools/z64compress/src/enc/apultra/divsufsort.c deleted file mode 100644 index 3a1c753045..0000000000 --- a/tools/z64compress/src/enc/apultra/divsufsort.c +++ /dev/null @@ -1,460 +0,0 @@ -/* - * divsufsort.c for libdivsufsort - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "divsufsort_private.h" -#ifdef _OPENMP -# include -#endif - - -/*- Private Functions -*/ - -/* Sorts suffixes of type B*. */ -static -saidx_t -sort_typeBstar(const sauchar_t *T, saidx_t *SA, - saidx_t *bucket_A, saidx_t *bucket_B, - saidx_t n) { - saidx_t *PAb, *ISAb, *buf; -#ifdef _OPENMP - saidx_t *curbuf; - saidx_t l; -#endif - saidx_t i, j, k, t, m, bufsize; - saint_t c0, c1; -#ifdef _OPENMP - saint_t d0, d1; - int tmp; -#endif - - /* Initialize bucket arrays. */ - for(i = 0; i < BUCKET_A_SIZE; ++i) { bucket_A[i] = 0; } - for(i = 0; i < BUCKET_B_SIZE; ++i) { bucket_B[i] = 0; } - - /* Count the number of occurrences of the first one or two characters of each - type A, B and B* suffix. Moreover, store the beginning position of all - type B* suffixes into the array SA. */ - for(i = n - 1, m = n, c0 = T[n - 1]; 0 <= i;) { - /* type A suffix. */ - do { ++BUCKET_A(c1 = c0); } while((0 <= --i) && ((c0 = T[i]) >= c1)); - if(0 <= i) { - /* type B* suffix. */ - ++BUCKET_BSTAR(c0, c1); - SA[--m] = i; - /* type B suffix. */ - for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) <= c1); --i, c1 = c0) { - ++BUCKET_B(c0, c1); - } - } - } - m = n - m; -/* -note: - A type B* suffix is lexicographically smaller than a type B suffix that - begins with the same first two characters. -*/ - - /* Calculate the index of start/end point of each bucket. */ - for(c0 = 0, i = 0, j = 0; c0 < ALPHABET_SIZE; ++c0) { - t = i + BUCKET_A(c0); - BUCKET_A(c0) = i + j; /* start point */ - i = t + BUCKET_B(c0, c0); - for(c1 = c0 + 1; c1 < ALPHABET_SIZE; ++c1) { - j += BUCKET_BSTAR(c0, c1); - BUCKET_BSTAR(c0, c1) = j; /* end point */ - i += BUCKET_B(c0, c1); - } - } - - if(0 < m) { - /* Sort the type B* suffixes by their first two characters. */ - PAb = SA + n - m; ISAb = SA + m; - for(i = m - 2; 0 <= i; --i) { - t = PAb[i], c0 = T[t], c1 = T[t + 1]; - SA[--BUCKET_BSTAR(c0, c1)] = i; - } - t = PAb[m - 1], c0 = T[t], c1 = T[t + 1]; - SA[--BUCKET_BSTAR(c0, c1)] = m - 1; - - /* Sort the type B* substrings using sssort. */ -#ifdef _OPENMP - tmp = omp_get_max_threads(); - buf = SA + m, bufsize = (n - (2 * m)) / tmp; - c0 = ALPHABET_SIZE - 2, c1 = ALPHABET_SIZE - 1, j = m; -#pragma omp parallel default(shared) private(curbuf, k, l, d0, d1, tmp) - { - tmp = omp_get_thread_num(); - curbuf = buf + tmp * bufsize; - k = 0; - for(;;) { - #pragma omp critical(sssort_lock) - { - if(0 < (l = j)) { - d0 = c0, d1 = c1; - do { - k = BUCKET_BSTAR(d0, d1); - if(--d1 <= d0) { - d1 = ALPHABET_SIZE - 1; - if(--d0 < 0) { break; } - } - } while(((l - k) <= 1) && (0 < (l = k))); - c0 = d0, c1 = d1, j = k; - } - } - if(l == 0) { break; } - sssort(T, PAb, SA + k, SA + l, - curbuf, bufsize, 2, n, *(SA + k) == (m - 1)); - } - } -#else - buf = SA + m, bufsize = n - (2 * m); - for(c0 = ALPHABET_SIZE - 2, j = m; 0 < j; --c0) { - for(c1 = ALPHABET_SIZE - 1; c0 < c1; j = i, --c1) { - i = BUCKET_BSTAR(c0, c1); - if(1 < (j - i)) { - sssort(T, PAb, SA + i, SA + j, - buf, bufsize, 2, n, *(SA + i) == (m - 1)); - } - } - } -#endif - - /* Compute ranks of type B* substrings. */ - for(i = m - 1; 0 <= i; --i) { - if(0 <= SA[i]) { - j = i; - do { ISAb[SA[i]] = i; } while((0 <= --i) && (0 <= SA[i])); - SA[i + 1] = i - j; - if(i <= 0) { break; } - } - j = i; - do { ISAb[SA[i] = ~SA[i]] = j; } while(SA[--i] < 0); - ISAb[SA[i]] = j; - } - - /* Construct the inverse suffix array of type B* suffixes using trsort. */ - trsort(ISAb, SA, m, 1); - - /* Set the sorted order of tyoe B* suffixes. */ - for(i = n - 1, j = m, c0 = T[n - 1]; 0 <= i;) { - for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) >= c1); --i, c1 = c0) { } - if(0 <= i) { - t = i; - for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) <= c1); --i, c1 = c0) { } - SA[ISAb[--j]] = ((t == 0) || (1 < (t - i))) ? t : ~t; - } - } - - /* Calculate the index of start/end point of each bucket. */ - BUCKET_B(ALPHABET_SIZE - 1, ALPHABET_SIZE - 1) = n; /* end point */ - for(c0 = ALPHABET_SIZE - 2, k = m - 1; 0 <= c0; --c0) { - i = BUCKET_A(c0 + 1) - 1; - for(c1 = ALPHABET_SIZE - 1; c0 < c1; --c1) { - t = i - BUCKET_B(c0, c1); - BUCKET_B(c0, c1) = i; /* end point */ - - /* Move all type B* suffixes to the correct position. */ - for(i = t, j = BUCKET_BSTAR(c0, c1); - j <= k; - --i, --k) { SA[i] = SA[k]; } - } - BUCKET_BSTAR(c0, c0 + 1) = i - BUCKET_B(c0, c0) + 1; /* start point */ - BUCKET_B(c0, c0) = i; /* end point */ - } - } - - return m; -} - -/* Constructs the suffix array by using the sorted order of type B* suffixes. */ -static -void -construct_SA(const sauchar_t *T, saidx_t *SA, - saidx_t *bucket_A, saidx_t *bucket_B, - saidx_t n, saidx_t m) { - saidx_t *i, *j, *k; - saidx_t s; - saint_t c0, c1, c2; - - if(0 < m) { - /* Construct the sorted order of type B suffixes by using - the sorted order of type B* suffixes. */ - for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { - /* Scan the suffix array from right to left. */ - for(i = SA + BUCKET_BSTAR(c1, c1 + 1), - j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; - i <= j; - --j) { - if(0 < (s = *j)) { - assert(T[s] == c1); - assert(((s + 1) < n) && (T[s] <= T[s + 1])); - assert(T[s - 1] <= T[s]); - *j = ~s; - c0 = T[--s]; - if((0 < s) && (T[s - 1] > c0)) { s = ~s; } - if(c0 != c2) { - if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } - k = SA + BUCKET_B(c2 = c0, c1); - } - assert(k < j); - *k-- = s; - } else { - assert(((s == 0) && (T[s] == c1)) || (s < 0)); - *j = ~s; - } - } - } - } - - /* Construct the suffix array by using - the sorted order of type B suffixes. */ - k = SA + BUCKET_A(c2 = T[n - 1]); - *k++ = (T[n - 2] < c2) ? ~(n - 1) : (n - 1); - /* Scan the suffix array from left to right. */ - for(i = SA, j = SA + n; i < j; ++i) { - if(0 < (s = *i)) { - assert(T[s - 1] >= T[s]); - c0 = T[--s]; - if((s == 0) || (T[s - 1] < c0)) { s = ~s; } - if(c0 != c2) { - BUCKET_A(c2) = k - SA; - k = SA + BUCKET_A(c2 = c0); - } - assert(i < k); - *k++ = s; - } else { - assert(s < 0); - *i = ~s; - } - } -} - -#if 0 -/* Constructs the burrows-wheeler transformed string directly - by using the sorted order of type B* suffixes. */ -static -saidx_t -construct_BWT(const sauchar_t *T, saidx_t *SA, - saidx_t *bucket_A, saidx_t *bucket_B, - saidx_t n, saidx_t m) { - saidx_t *i, *j, *k, *orig; - saidx_t s; - saint_t c0, c1, c2; - - if(0 < m) { - /* Construct the sorted order of type B suffixes by using - the sorted order of type B* suffixes. */ - for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { - /* Scan the suffix array from right to left. */ - for(i = SA + BUCKET_BSTAR(c1, c1 + 1), - j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; - i <= j; - --j) { - if(0 < (s = *j)) { - assert(T[s] == c1); - assert(((s + 1) < n) && (T[s] <= T[s + 1])); - assert(T[s - 1] <= T[s]); - c0 = T[--s]; - *j = ~((saidx_t)c0); - if((0 < s) && (T[s - 1] > c0)) { s = ~s; } - if(c0 != c2) { - if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } - k = SA + BUCKET_B(c2 = c0, c1); - } - assert(k < j); - *k-- = s; - } else if(s != 0) { - *j = ~s; -#ifndef NDEBUG - } else { - assert(T[s] == c1); -#endif - } - } - } - } - - /* Construct the BWTed string by using - the sorted order of type B suffixes. */ - k = SA + BUCKET_A(c2 = T[n - 1]); - *k++ = (T[n - 2] < c2) ? ~((saidx_t)T[n - 2]) : (n - 1); - /* Scan the suffix array from left to right. */ - for(i = SA, j = SA + n, orig = SA; i < j; ++i) { - if(0 < (s = *i)) { - assert(T[s - 1] >= T[s]); - c0 = T[--s]; - *i = c0; - if((0 < s) && (T[s - 1] < c0)) { s = ~((saidx_t)T[s - 1]); } - if(c0 != c2) { - BUCKET_A(c2) = k - SA; - k = SA + BUCKET_A(c2 = c0); - } - assert(i < k); - *k++ = s; - } else if(s != 0) { - *i = ~s; - } else { - orig = i; - } - } - - return orig - SA; -} -#endif - -/*---------------------------------------------------------------------------*/ - -/** - * Initialize suffix array context - * - * @return 0 for success, or non-zero in case of an error - */ -int divsufsort_init(divsufsort_ctx_t *ctx) { - ctx->bucket_A = (saidx_t *)malloc(BUCKET_A_SIZE * sizeof(saidx_t)); - ctx->bucket_B = NULL; - - if (ctx->bucket_A) { - ctx->bucket_B = (saidx_t *)malloc(BUCKET_B_SIZE * sizeof(saidx_t)); - - if (ctx->bucket_B) - return 0; - } - - divsufsort_destroy(ctx); - return -1; -} - -/** - * Destroy suffix array context - * - * @param ctx suffix array context to destroy - */ -void divsufsort_destroy(divsufsort_ctx_t *ctx) { - if (ctx->bucket_B) { - free(ctx->bucket_B); - ctx->bucket_B = NULL; - } - - if (ctx->bucket_A) { - free(ctx->bucket_A); - ctx->bucket_A = NULL; - } -} - -/*- Function -*/ - -saint_t -divsufsort_build_array(divsufsort_ctx_t *ctx, const sauchar_t *T, saidx_t *SA, saidx_t n) { - saidx_t m; - saint_t err = 0; - - /* Check arguments. */ - if((T == NULL) || (SA == NULL) || (n < 0)) { return -1; } - else if(n == 0) { return 0; } - else if(n == 1) { SA[0] = 0; return 0; } - else if(n == 2) { m = (T[0] < T[1]); SA[m ^ 1] = 0, SA[m] = 1; return 0; } - - /* Suffixsort. */ - if((ctx->bucket_A != NULL) && (ctx->bucket_B != NULL)) { - m = sort_typeBstar(T, SA, ctx->bucket_A, ctx->bucket_B, n); - construct_SA(T, SA, ctx->bucket_A, ctx->bucket_B, n, m); - } else { - err = -2; - } - - return err; -} - -#if 0 -saidx_t -divbwt(const sauchar_t *T, sauchar_t *U, saidx_t *A, saidx_t n) { - saidx_t *B; - saidx_t *bucket_A, *bucket_B; - saidx_t m, pidx, i; - - /* Check arguments. */ - if((T == NULL) || (U == NULL) || (n < 0)) { return -1; } - else if(n <= 1) { if(n == 1) { U[0] = T[0]; } return n; } - - if((B = A) == NULL) { B = (saidx_t *)malloc((size_t)(n + 1) * sizeof(saidx_t)); } - bucket_A = (saidx_t *)malloc(BUCKET_A_SIZE * sizeof(saidx_t)); - bucket_B = (saidx_t *)malloc(BUCKET_B_SIZE * sizeof(saidx_t)); - - /* Burrows-Wheeler Transform. */ - if((B != NULL) && (bucket_A != NULL) && (bucket_B != NULL)) { - m = sort_typeBstar(T, B, bucket_A, bucket_B, n); - pidx = construct_BWT(T, B, bucket_A, bucket_B, n, m); - - /* Copy to output string. */ - U[0] = T[n - 1]; - for(i = 0; i < pidx; ++i) { U[i + 1] = (sauchar_t)B[i]; } - for(i += 1; i < n; ++i) { U[i] = (sauchar_t)B[i]; } - pidx += 1; - } else { - pidx = -2; - } - - free(bucket_B); - free(bucket_A); - if(A == NULL) { free(B); } - - return pidx; -} - -const char * -divsufsort_version(void) { - return PROJECT_VERSION_FULL; -} -#endif - -saint_t -divsufsort(const sauchar_t *T, saidx_t *SA, saidx_t n) { - saidx_t *bucket_A, *bucket_B; - saidx_t m; - saint_t err = 0; - - /* Check arguments. */ - if((T == NULL) || (SA == NULL) || (n < 0)) { return -1; } - else if(n == 0) { return 0; } - else if(n == 1) { SA[0] = 0; return 0; } - else if(n == 2) { m = (T[0] < T[1]); SA[m ^ 1] = 0, SA[m] = 1; return 0; } - - bucket_A = (saidx_t *)malloc(BUCKET_A_SIZE * sizeof(saidx_t)); - bucket_B = (saidx_t *)malloc(BUCKET_B_SIZE * sizeof(saidx_t)); - - /* Suffixsort. */ - if((bucket_A != NULL) && (bucket_B != NULL)) { - m = sort_typeBstar(T, SA, bucket_A, bucket_B, n); - construct_SA(T, SA, bucket_A, bucket_B, n, m); - } else { - err = -2; - } - - free(bucket_B); - free(bucket_A); - - return err; -} diff --git a/tools/z64compress/src/enc/apultra/divsufsort.h b/tools/z64compress/src/enc/apultra/divsufsort.h deleted file mode 100644 index 5c617ee733..0000000000 --- a/tools/z64compress/src/enc/apultra/divsufsort.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * divsufsort.h for libdivsufsort - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _DIVSUFSORT_H -#define _DIVSUFSORT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define DIVSUFSORT_API - -/*- Datatypes -*/ -#ifndef SAUCHAR_T -#define SAUCHAR_T -typedef unsigned char sauchar_t; -#endif /* SAUCHAR_T */ -#ifndef SAINT_T -#define SAINT_T -typedef int saint_t; -#endif /* SAINT_T */ -#ifndef SAIDX_T -#define SAIDX_T -typedef int saidx_t; -#endif /* SAIDX_T */ -#ifndef PRIdSAIDX_T -#define PRIdSAIDX_T "d" -#endif - -/*- divsufsort context */ -typedef struct _divsufsort_ctx_t { - saidx_t *bucket_A; - saidx_t *bucket_B; -} divsufsort_ctx_t; - -/*- Prototypes -*/ - -/** - * Initialize suffix array context - * - * @return 0 for success, or non-zero in case of an error - */ -int divsufsort_init(divsufsort_ctx_t *ctx); - -/** - * Destroy suffix array context - * - * @param ctx suffix array context to destroy - */ -void divsufsort_destroy(divsufsort_ctx_t *ctx); - -/** - * Constructs the suffix array of a given string. - * @param ctx suffix array context - * @param T[0..n-1] The input string. - * @param SA[0..n-1] The output array of suffixes. - * @param n The length of the given string. - * @return 0 if no error occurred, -1 or -2 otherwise. - */ -DIVSUFSORT_API -saint_t divsufsort_build_array(divsufsort_ctx_t *ctx, const sauchar_t *T, saidx_t *SA, saidx_t n); - -#if 0 -/** - * Constructs the burrows-wheeler transformed string of a given string. - * @param T[0..n-1] The input string. - * @param U[0..n-1] The output string. (can be T) - * @param A[0..n-1] The temporary array. (can be NULL) - * @param n The length of the given string. - * @return The primary index if no error occurred, -1 or -2 otherwise. - */ -DIVSUFSORT_API -saidx_t -divbwt(const sauchar_t *T, sauchar_t *U, saidx_t *A, saidx_t n); - -/** - * Returns the version of the divsufsort library. - * @return The version number string. - */ -DIVSUFSORT_API -const char * -divsufsort_version(void); - - -/** - * Constructs the burrows-wheeler transformed string of a given string and suffix array. - * @param T[0..n-1] The input string. - * @param U[0..n-1] The output string. (can be T) - * @param SA[0..n-1] The suffix array. (can be NULL) - * @param n The length of the given string. - * @param idx The output primary index. - * @return 0 if no error occurred, -1 or -2 otherwise. - */ -DIVSUFSORT_API -saint_t -bw_transform(const sauchar_t *T, sauchar_t *U, - saidx_t *SA /* can NULL */, - saidx_t n, saidx_t *idx); - -/** - * Inverse BW-transforms a given BWTed string. - * @param T[0..n-1] The input string. - * @param U[0..n-1] The output string. (can be T) - * @param A[0..n-1] The temporary array. (can be NULL) - * @param n The length of the given string. - * @param idx The primary index. - * @return 0 if no error occurred, -1 or -2 otherwise. - */ -DIVSUFSORT_API -saint_t -inverse_bw_transform(const sauchar_t *T, sauchar_t *U, - saidx_t *A /* can NULL */, - saidx_t n, saidx_t idx); - -/** - * Checks the correctness of a given suffix array. - * @param T[0..n-1] The input string. - * @param SA[0..n-1] The input suffix array. - * @param n The length of the given string. - * @param verbose The verbose mode. - * @return 0 if no error occurred. - */ -DIVSUFSORT_API -saint_t -sufcheck(const sauchar_t *T, const saidx_t *SA, saidx_t n, saint_t verbose); - -/** - * Search for the pattern P in the string T. - * @param T[0..Tsize-1] The input string. - * @param Tsize The length of the given string. - * @param P[0..Psize-1] The input pattern string. - * @param Psize The length of the given pattern string. - * @param SA[0..SAsize-1] The input suffix array. - * @param SAsize The length of the given suffix array. - * @param idx The output index. - * @return The count of matches if no error occurred, -1 otherwise. - */ -DIVSUFSORT_API -saidx_t -sa_search(const sauchar_t *T, saidx_t Tsize, - const sauchar_t *P, saidx_t Psize, - const saidx_t *SA, saidx_t SAsize, - saidx_t *left); - -/** - * Search for the character c in the string T. - * @param T[0..Tsize-1] The input string. - * @param Tsize The length of the given string. - * @param SA[0..SAsize-1] The input suffix array. - * @param SAsize The length of the given suffix array. - * @param c The input character. - * @param idx The output index. - * @return The count of matches if no error occurred, -1 otherwise. - */ -DIVSUFSORT_API -saidx_t -sa_simplesearch(const sauchar_t *T, saidx_t Tsize, - const saidx_t *SA, saidx_t SAsize, - saint_t c, saidx_t *left); -#endif - -saint_t -divsufsort(const sauchar_t *T, saidx_t *SA, saidx_t n); - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* _DIVSUFSORT_H */ diff --git a/tools/z64compress/src/enc/apultra/divsufsort_config.h b/tools/z64compress/src/enc/apultra/divsufsort_config.h deleted file mode 100644 index 4054a8aae2..0000000000 --- a/tools/z64compress/src/enc/apultra/divsufsort_config.h +++ /dev/null @@ -1,9 +0,0 @@ -#define HAVE_STRING_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STDINT_H 1 -#define INLINE inline - -#ifdef _MSC_VER -#pragma warning( disable : 4244 ) -#endif /* _MSC_VER */ diff --git a/tools/z64compress/src/enc/apultra/divsufsort_private.h b/tools/z64compress/src/enc/apultra/divsufsort_private.h deleted file mode 100644 index b4d97ad4bc..0000000000 --- a/tools/z64compress/src/enc/apultra/divsufsort_private.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * divsufsort_private.h for libdivsufsort - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _DIVSUFSORT_PRIVATE_H -#define _DIVSUFSORT_PRIVATE_H 1 - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "divsufsort_config.h" -#include -#include -#if HAVE_STRING_H -# include -#endif -#if HAVE_STDLIB_H -# include -#endif -#if HAVE_MEMORY_H -# include -#endif -#if HAVE_STDDEF_H -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if defined(BUILD_DIVSUFSORT64) -# include "divsufsort64.h" -# ifndef SAIDX_T -# define SAIDX_T -# define saidx_t saidx64_t -# endif /* SAIDX_T */ -# ifndef PRIdSAIDX_T -# define PRIdSAIDX_T PRIdSAIDX64_T -# endif /* PRIdSAIDX_T */ -# define divsufsort divsufsort64 -# define divbwt divbwt64 -# define divsufsort_version divsufsort64_version -# define bw_transform bw_transform64 -# define inverse_bw_transform inverse_bw_transform64 -# define sufcheck sufcheck64 -# define sa_search sa_search64 -# define sa_simplesearch sa_simplesearch64 -# define sssort sssort64 -# define trsort trsort64 -#else -# include "divsufsort.h" -#endif - - -/*- Constants -*/ -#if !defined(UINT8_MAX) -# define UINT8_MAX (255) -#endif /* UINT8_MAX */ -#if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1) -# undef ALPHABET_SIZE -#endif -#if !defined(ALPHABET_SIZE) -# define ALPHABET_SIZE (UINT8_MAX + 1) -#endif -/* for divsufsort.c */ -#define BUCKET_A_SIZE (ALPHABET_SIZE) -#define BUCKET_B_SIZE (ALPHABET_SIZE * ALPHABET_SIZE) -/* for sssort.c */ -#if defined(SS_INSERTIONSORT_THRESHOLD) -# if SS_INSERTIONSORT_THRESHOLD < 1 -# undef SS_INSERTIONSORT_THRESHOLD -# define SS_INSERTIONSORT_THRESHOLD (1) -# endif -#else -# define SS_INSERTIONSORT_THRESHOLD (8) -#endif -#if defined(SS_BLOCKSIZE) -# if SS_BLOCKSIZE < 0 -# undef SS_BLOCKSIZE -# define SS_BLOCKSIZE (0) -# elif 32768 <= SS_BLOCKSIZE -# undef SS_BLOCKSIZE -# define SS_BLOCKSIZE (32767) -# endif -#else -# define SS_BLOCKSIZE (1024) -#endif -/* minstacksize = log(SS_BLOCKSIZE) / log(3) * 2 */ -#if SS_BLOCKSIZE == 0 -# if defined(BUILD_DIVSUFSORT64) -# define SS_MISORT_STACKSIZE (96) -# else -# define SS_MISORT_STACKSIZE (64) -# endif -#elif SS_BLOCKSIZE <= 4096 -# define SS_MISORT_STACKSIZE (16) -#else -# define SS_MISORT_STACKSIZE (24) -#endif -#if defined(BUILD_DIVSUFSORT64) -# define SS_SMERGE_STACKSIZE (64) -#else -# define SS_SMERGE_STACKSIZE (32) -#endif -/* for trsort.c */ -#define TR_INSERTIONSORT_THRESHOLD (8) -#if defined(BUILD_DIVSUFSORT64) -# define TR_STACKSIZE (96) -#else -# define TR_STACKSIZE (64) -#endif - - -/*- Macros -*/ -#ifndef SWAP -# define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0) -#endif /* SWAP */ -#ifndef MIN -# define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b)) -#endif /* MIN */ -#ifndef MAX -# define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b)) -#endif /* MAX */ -#define STACK_PUSH(_a, _b, _c, _d)\ - do {\ - assert(ssize < STACK_SIZE);\ - stack[ssize].a = (_a), stack[ssize].b = (_b),\ - stack[ssize].c = (_c), stack[ssize++].d = (_d);\ - } while(0) -#define STACK_PUSH5(_a, _b, _c, _d, _e)\ - do {\ - assert(ssize < STACK_SIZE);\ - stack[ssize].a = (_a), stack[ssize].b = (_b),\ - stack[ssize].c = (_c), stack[ssize].d = (_d), stack[ssize++].e = (_e);\ - } while(0) -#define STACK_POP(_a, _b, _c, _d)\ - do {\ - assert(0 <= ssize);\ - if(ssize == 0) { return; }\ - (_a) = stack[--ssize].a, (_b) = stack[ssize].b,\ - (_c) = stack[ssize].c, (_d) = stack[ssize].d;\ - } while(0) -#define STACK_POP5(_a, _b, _c, _d, _e)\ - do {\ - assert(0 <= ssize);\ - if(ssize == 0) { return; }\ - (_a) = stack[--ssize].a, (_b) = stack[ssize].b,\ - (_c) = stack[ssize].c, (_d) = stack[ssize].d, (_e) = stack[ssize].e;\ - } while(0) -/* for divsufsort.c */ -#define BUCKET_A(_c0) bucket_A[(_c0)] -#if ALPHABET_SIZE == 256 -#define BUCKET_B(_c0, _c1) (bucket_B[((_c1) << 8) | (_c0)]) -#define BUCKET_BSTAR(_c0, _c1) (bucket_B[((_c0) << 8) | (_c1)]) -#else -#define BUCKET_B(_c0, _c1) (bucket_B[(_c1) * ALPHABET_SIZE + (_c0)]) -#define BUCKET_BSTAR(_c0, _c1) (bucket_B[(_c0) * ALPHABET_SIZE + (_c1)]) -#endif - - -/*- Private Prototypes -*/ -/* sssort.c */ -void -sssort(const sauchar_t *Td, const saidx_t *PA, - saidx_t *first, saidx_t *last, - saidx_t *buf, saidx_t bufsize, - saidx_t depth, saidx_t n, saint_t lastsuffix); -/* trsort.c */ -void -trsort(saidx_t *ISA, saidx_t *SA, saidx_t n, saidx_t depth); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* _DIVSUFSORT_PRIVATE_H */ diff --git a/tools/z64compress/src/enc/apultra/expand.c b/tools/z64compress/src/enc/apultra/expand.c deleted file mode 100644 index b65409de24..0000000000 --- a/tools/z64compress/src/enc/apultra/expand.c +++ /dev/null @@ -1,396 +0,0 @@ -/* - * expand.c - decompressor implementation - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#include -#include -#include "format.h" -#include "expand.h" -#include "libapultra.h" - -#ifdef _MSC_VER -#define FORCE_INLINE __forceinline -#else /* _MSC_VER */ -#define FORCE_INLINE __attribute__((always_inline)) -#endif /* _MSC_VER */ - -static inline FORCE_INLINE int apultra_read_bit(const unsigned char **ppInBlock, const unsigned char *pDataEnd, int *nCurBitMask, unsigned char *bits) { - const unsigned char *pInBlock = *ppInBlock; - int nBit; - - if ((*nCurBitMask) == 0) { - if (pInBlock >= pDataEnd) return -1; - (*bits) = *pInBlock++; - (*nCurBitMask) = 128; - } - - nBit = ((*bits) & 128) ? 1 : 0; - - (*bits) <<= 1; - (*nCurBitMask) >>= 1; - - *ppInBlock = pInBlock; - return nBit; -} - -static inline FORCE_INLINE int apultra_read_gamma2(const unsigned char **ppInBlock, const unsigned char *pDataEnd, int *nCurBitMask, unsigned char *bits) { - int bit; - unsigned int v = 1; - - do { - v = (v << 1) + apultra_read_bit(ppInBlock, pDataEnd, nCurBitMask, bits); - bit = apultra_read_bit(ppInBlock, pDataEnd, nCurBitMask, bits); - if (bit < 0) return bit; - } while (bit); - - return v; -} - -/** - * Get maximum decompressed size of compressed data - * - * @param pInputData compressed data - * @param nInputSize compressed size in bytes - * @param nFlags compression flags (set to 0) - * - * @return maximum decompressed size - */ -size_t apultra_get_max_decompressed_size(const unsigned char *pInputData, size_t nInputSize, const unsigned int nFlags) { - const unsigned char *pInputDataEnd = pInputData + nInputSize; - int nCurBitMask = 0; - unsigned char bits = 0; - int nMatchOffset = -1; - int nFollowsLiteral = 3; - size_t nDecompressedSize = 0; - - if (pInputData >= pInputDataEnd) - return -1; - pInputData++; - nDecompressedSize++; - - while (1) { - int nResult; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - - if (!nResult) { - /* '0': literal */ - if (pInputData < pInputDataEnd) { - pInputData++; - nDecompressedSize++; - nFollowsLiteral = 3; - } - else { - return -1; - } - } - else { - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - - if (nResult == 0) { - unsigned int nMatchLen; - - /* '10': 8+n bits offset */ - int nMatchOffsetHi = apultra_read_gamma2(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - nMatchOffsetHi -= nFollowsLiteral; - if (nMatchOffsetHi >= 0) { - nMatchOffset = ((unsigned int) nMatchOffsetHi) << 8; - nMatchOffset |= (unsigned int)(*pInputData++); - - nMatchLen = apultra_read_gamma2(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - - if (nMatchOffset < 128 || nMatchOffset >= MINMATCH4_OFFSET) - nMatchLen += 2; - else if (nMatchOffset >= MINMATCH3_OFFSET) - nMatchLen++; - } - else { - /* else rep-match */ - nMatchLen = apultra_read_gamma2(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - } - - nFollowsLiteral = 2; - - nDecompressedSize += nMatchLen; - } - else { - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - - if (nResult == 0) { - unsigned int nCommand; - unsigned int nMatchLen; - - /* '110': 7 bits offset + 1 bit length */ - nCommand = (unsigned int)(*pInputData++); - if (nCommand == 0x00) { - /* EOD. No match len follows. */ - break; - } - - /* Bits 7-1: offset; bit 0: length */ - nMatchOffset = (nCommand >> 1); - nMatchLen = (nCommand & 1) + 2; - - nFollowsLiteral = 2; - nDecompressedSize += nMatchLen; - } - else { - unsigned int nShortMatchOffset; - - /* '111': 4 bit offset */ - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset = nResult << 3; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset |= nResult << 2; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset |= nResult << 1; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset |= nResult << 0; - - nFollowsLiteral = 3; - nDecompressedSize++; - } - } - } - } - - return nDecompressedSize; -} - -/** - * Decompress data in memory - * - * @param pInputData compressed data - * @param pOutBuffer buffer for decompressed data - * @param nInputSize compressed size in bytes - * @param nMaxOutBufferSize maximum capacity of decompression buffer - * @param nDictionarySize size of dictionary in front of input data (0 for none) - * @param nFlags compression flags (set to 0) - * - * @return actual decompressed size, or -1 for error - */ -size_t apultra_decompress(const unsigned char *pInputData, unsigned char *pOutData, size_t nInputSize, size_t nMaxOutBufferSize, size_t nDictionarySize, const unsigned int nFlags) { - const unsigned char *pInputDataEnd = pInputData + nInputSize; - unsigned char *pCurOutData = pOutData + nDictionarySize; - const unsigned char *pOutDataEnd = pCurOutData + nMaxOutBufferSize; - const unsigned char *pOutDataFastEnd = pOutDataEnd - 20; - int nCurBitMask = 0; - unsigned char bits = 0; - int nMatchOffset = -1; - int nFollowsLiteral = 3; - - if (pInputData >= pInputDataEnd && pCurOutData < pOutDataEnd) - return -1; - *pCurOutData++ = *pInputData++; - - while (1) { - int nResult; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - - if (!nResult) { - /* '0': literal */ - if (pInputData < pInputDataEnd && pCurOutData < pOutDataEnd) { - *pCurOutData++ = *pInputData++; - nFollowsLiteral = 3; - } - else { - return -1; - } - } - else { - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - - if (nResult == 0) { - unsigned int nMatchLen; - - /* '10': 8+n bits offset */ - int nMatchOffsetHi = apultra_read_gamma2(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - nMatchOffsetHi -= nFollowsLiteral; - if (nMatchOffsetHi >= 0) { - nMatchOffset = ((unsigned int) nMatchOffsetHi) << 8; - nMatchOffset |= (unsigned int)(*pInputData++); - - nMatchLen = apultra_read_gamma2(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - - if (nMatchOffset < 128 || nMatchOffset >= MINMATCH4_OFFSET) - nMatchLen += 2; - else if (nMatchOffset >= MINMATCH3_OFFSET) - nMatchLen++; - } - else { - /* else rep-match */ - nMatchLen = apultra_read_gamma2(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - } - - nFollowsLiteral = 2; - const unsigned char *pSrc = pCurOutData - nMatchOffset; - if (pSrc >= pOutData && (pSrc + nMatchLen) <= pOutDataEnd) { - if (nMatchLen < 11 && nMatchOffset >= 8 && pCurOutData < pOutDataFastEnd) { - memcpy(pCurOutData, pSrc, 8); - memcpy(pCurOutData + 8, pSrc + 8, 2); - pCurOutData += nMatchLen; - } - else { - if ((pCurOutData + nMatchLen) <= pOutDataEnd) { - /* Do a deterministic, left to right byte copy instead of memcpy() so as to handle overlaps */ - - if (nMatchOffset >= 16 && (pCurOutData + nMatchLen) < (pOutDataFastEnd - 15)) { - const unsigned char *pCopySrc = pSrc; - unsigned char *pCopyDst = pCurOutData; - const unsigned char *pCopyEndDst = pCurOutData + nMatchLen; - - do { - memcpy(pCopyDst, pCopySrc, 16); - pCopySrc += 16; - pCopyDst += 16; - } while (pCopyDst < pCopyEndDst); - - pCurOutData += nMatchLen; - } - else { - while (nMatchLen) { - *pCurOutData++ = *pSrc++; - nMatchLen--; - } - } - } - else { - return -1; - } - } - } - else { - return -1; - } - } - else { - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - - if (nResult == 0) { - unsigned int nCommand; - unsigned int nMatchLen; - - /* '110': 7 bits offset + 1 bit length */ - nCommand = (unsigned int)(*pInputData++); - if (nCommand == 0x00) { - /* EOD. No match len follows. */ - break; - } - - /* Bits 7-1: offset; bit 0: length */ - nMatchOffset = (nCommand >> 1); - nMatchLen = (nCommand & 1) + 2; - - nFollowsLiteral = 2; - const unsigned char *pSrc = pCurOutData - nMatchOffset; - if (pSrc >= pOutData && (pSrc + nMatchLen) <= pOutDataEnd) { - if (nMatchOffset >= 8 && pCurOutData < pOutDataFastEnd) { - memcpy(pCurOutData, pSrc, 8); - memcpy(pCurOutData + 8, pSrc + 8, 2); - pCurOutData += nMatchLen; - } - else { - if ((pCurOutData + nMatchLen) <= pOutDataEnd) { - while (nMatchLen) { - *pCurOutData++ = *pSrc++; - nMatchLen--; - } - } - else { - return -1; - } - } - } - else { - return -1; - } - } - else { - unsigned int nShortMatchOffset; - - /* '111': 4 bit offset */ - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset = nResult << 3; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset |= nResult << 2; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset |= nResult << 1; - - nResult = apultra_read_bit(&pInputData, pInputDataEnd, &nCurBitMask, &bits); - if (nResult < 0) return -1; - nShortMatchOffset |= nResult << 0; - - nFollowsLiteral = 3; - if (nShortMatchOffset) { - /* Short offset, 1-15 */ - const unsigned char *pSrc = pCurOutData - nShortMatchOffset; - if (pSrc >= pOutData && (pCurOutData + 1) <= pOutDataEnd && (pSrc + 1) <= pOutDataEnd) { - *pCurOutData++ = *pSrc++; - } - else { - return -1; - } - } - else { - /* Write zero */ - if ((pCurOutData + 1) <= pOutDataEnd) { - *pCurOutData++ = 0; - } - else { - return -1; - } - } - } - } - } - } - - return (size_t)(pCurOutData - pOutData) - nDictionarySize; -} diff --git a/tools/z64compress/src/enc/apultra/expand.h b/tools/z64compress/src/enc/apultra/expand.h deleted file mode 100644 index 474660ca25..0000000000 --- a/tools/z64compress/src/enc/apultra/expand.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * expand.h - decompressor definitions - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#ifndef _EXPAND_H -#define _EXPAND_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Get maximum decompressed size of compressed data - * - * @param pInputData compressed data - * @param nInputSize compressed size in bytes - * @param nFlags compression flags (set to 0) - * - * @return maximum decompressed size - */ -size_t apultra_get_max_decompressed_size(const unsigned char *pInputData, size_t nInputSize, const unsigned int nFlags); - -/** - * Decompress data in memory - * - * @param pInputData compressed data - * @param pOutBuffer buffer for decompressed data - * @param nInputSize compressed size in bytes - * @param nMaxOutBufferSize maximum capacity of decompression buffer - * @param nDictionarySize size of dictionary in front of input data (0 for none) - * @param nFlags compression flags (set to 0) - * - * @return actual decompressed size, or -1 for error - */ -size_t apultra_decompress(const unsigned char *pInputData, unsigned char *pOutBuffer, size_t nInputSize, size_t nMaxOutBufferSize, size_t nDictionarySize, const unsigned int nFlags); - -#ifdef __cplusplus -} -#endif - -#endif /* _EXPAND_H */ diff --git a/tools/z64compress/src/enc/apultra/format.h b/tools/z64compress/src/enc/apultra/format.h deleted file mode 100644 index cf949b5750..0000000000 --- a/tools/z64compress/src/enc/apultra/format.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * format.h - byte stream format definitions - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#ifndef _FORMAT_H -#define _FORMAT_H - -#define MIN_OFFSET 1 -#define MAX_OFFSET 0x1fffff - -#define MAX_VARLEN 0x1fffff - -#define BLOCK_SIZE 0x100000 - -#define MIN_MATCH_SIZE 1 -#define MINMATCH3_OFFSET 1280 -#define MINMATCH4_OFFSET 32000 - -#endif /* _FORMAT_H */ diff --git a/tools/z64compress/src/enc/apultra/libapultra.h b/tools/z64compress/src/enc/apultra/libapultra.h deleted file mode 100644 index f97e336a75..0000000000 --- a/tools/z64compress/src/enc/apultra/libapultra.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * libapultra.h - library definitions - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#ifndef _LIB_APULTRA_H -#define _LIB_APULTRA_H - -#include "format.h" -#include "shrink.h" -#include "expand.h" - -#endif /* _LIB_APULTRA_H */ diff --git a/tools/z64compress/src/enc/apultra/matchfinder.c b/tools/z64compress/src/enc/apultra/matchfinder.c deleted file mode 100644 index a9987f96e2..0000000000 --- a/tools/z64compress/src/enc/apultra/matchfinder.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * matchfinder.c - LZ match finder implementation - * - * The following copying information applies to this specific source code file: - * - * Written in 2019 by Emmanuel Marty - * Portions written in 2014-2015 by Eric Biggers - * - * To the extent possible under law, the author(s) have dedicated all copyright - * and related and neighboring rights to this software to the public domain - * worldwide via the Creative Commons Zero 1.0 Universal Public Domain - * Dedication (the "CC0"). - * - * This software is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the CC0 for more details. - * - * You should have received a copy of the CC0 along with this software; if not - * see . - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#include -#include -#include "matchfinder.h" -#include "format.h" -#include "libapultra.h" - -/** - * Hash index into TAG_BITS - * - * @param nIndex index value - * - * @return hash - */ -static inline int apultra_get_index_tag(unsigned int nIndex) { - return (int)(((unsigned long long)nIndex * 11400714819323198485ULL) >> (64ULL - TAG_BITS)); -} - -/** - * Parse input data, build suffix array and overlaid data structures to speed up match finding - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param nInWindowSize total input size in bytes (previously compressed bytes + bytes to compress) - * - * @return 0 for success, non-zero for failure - */ -int apultra_build_suffix_array(apultra_compressor *pCompressor, const unsigned char *pInWindow, const int nInWindowSize) { - unsigned long long *intervals = pCompressor->intervals; - - /* Build suffix array from input data */ - saidx_t *suffixArray = (saidx_t*)intervals; - if (divsufsort_build_array(&pCompressor->divsufsort_context, pInWindow, suffixArray, nInWindowSize) != 0) { - return 100; - } - - int i, r; - - for (i = nInWindowSize - 1; i >= 0; i--) { - intervals[i] = suffixArray[i]; - } - - int *PLCP = (int*)pCompressor->pos_data; /* Use temporarily */ - int *Phi = PLCP; - int nCurLen = 0; - - /* Compute the permuted LCP first (Kärkkäinen method) */ - Phi[intervals[0]] = -1; - for (i = 1; i < nInWindowSize; i++) - Phi[intervals[i]] = (unsigned int)intervals[i - 1]; - for (i = 0; i < nInWindowSize; i++) { - if (Phi[i] == -1) { - PLCP[i] = 0; - continue; - } - int nMaxLen = (i > Phi[i]) ? (nInWindowSize - i) : (nInWindowSize - Phi[i]); - while (nCurLen < nMaxLen && pInWindow[i + nCurLen] == pInWindow[Phi[i] + nCurLen]) nCurLen++; - PLCP[i] = nCurLen; - if (nCurLen > 0) - nCurLen--; - } - - /* Rotate permuted LCP into the LCP. This has better cache locality than the direct Kasai LCP method. This also - * saves us from having to build the inverse suffix array index, as the LCP is calculated without it using this method, - * and the interval builder below doesn't need it either. */ - intervals[0] &= POS_MASK; - - for (i = 1; i < nInWindowSize; i++) { - int nIndex = (int)(intervals[i] & POS_MASK); - int nLen = PLCP[nIndex]; - if (nLen < MIN_MATCH_SIZE) - nLen = 0; - if (nLen > LCP_MAX) - nLen = LCP_MAX; - int nTaggedLen = 0; - if (nLen) - nTaggedLen = (nLen << TAG_BITS) | (apultra_get_index_tag((unsigned int)nIndex) & ((1 << TAG_BITS) - 1)); - intervals[i] = ((unsigned long long)nIndex) | (((unsigned long long)nTaggedLen) << LCP_SHIFT); - } - - /** - * Build intervals for finding matches - * - * Methodology and code fragment taken from wimlib (CC0 license): - * https://wimlib.net/git/?p=wimlib;a=blob_plain;f=src/lcpit_matchfinder.c;h=a2d6a1e0cd95200d1f3a5464d8359d5736b14cbe;hb=HEAD - */ - unsigned long long * const SA_and_LCP = intervals; - unsigned long long *pos_data = pCompressor->pos_data; - unsigned long long next_interval_idx; - unsigned long long *top = pCompressor->open_intervals; - unsigned long long prev_pos = SA_and_LCP[0] & POS_MASK; - - *top = 0; - intervals[0] = 0; - next_interval_idx = 1; - - for (r = 1; r < nInWindowSize; r++) { - const unsigned long long next_pos = SA_and_LCP[r] & POS_MASK; - const unsigned long long next_lcp = SA_and_LCP[r] & LCP_MASK; - const unsigned long long top_lcp = *top & LCP_MASK; - - if (next_lcp == top_lcp) { - /* Continuing the deepest open interval */ - pos_data[prev_pos] = *top; - } - else if (next_lcp > top_lcp) { - /* Opening a new interval */ - *++top = next_lcp | next_interval_idx++; - pos_data[prev_pos] = *top; - } - else { - /* Closing the deepest open interval */ - pos_data[prev_pos] = *top; - for (;;) { - const unsigned long long closed_interval_idx = *top-- & POS_MASK; - const unsigned long long superinterval_lcp = *top & LCP_MASK; - - if (next_lcp == superinterval_lcp) { - /* Continuing the superinterval */ - intervals[closed_interval_idx] = *top; - break; - } - else if (next_lcp > superinterval_lcp) { - /* Creating a new interval that is a - * superinterval of the one being - * closed, but still a subinterval of - * its superinterval */ - *++top = next_lcp | next_interval_idx++; - intervals[closed_interval_idx] = *top; - break; - } - else { - /* Also closing the superinterval */ - intervals[closed_interval_idx] = *top; - } - } - } - prev_pos = next_pos; - } - - /* Close any still-open intervals. */ - pos_data[prev_pos] = *top; - for (; top > pCompressor->open_intervals; top--) - intervals[*top & POS_MASK] = *(top - 1); - - /* Success */ - return 0; -} - -/** - * Find matches at the specified offset in the input window - * - * @param pCompressor compression context - * @param nOffset offset to find matches at, in the input window - * @param pMatches pointer to returned matches - * @param pMatchDepth pointer to returned match depths - * @param pMatch1 pointer to 1-byte length, 4 bit offset match - * @param nMaxMatches maximum number of matches to return (0 for none) - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * - * @return number of matches - */ -int apultra_find_matches_at(apultra_compressor *pCompressor, const int nOffset, apultra_match *pMatches, unsigned short *pMatchDepth, unsigned char *pMatch1, const int nMaxMatches, const int nBlockFlags) { - unsigned long long *intervals = pCompressor->intervals; - unsigned long long *pos_data = pCompressor->pos_data; - unsigned long long ref; - unsigned long long super_ref; - unsigned long long match_pos; - apultra_match *matchptr; - unsigned short *depthptr; - const int nMaxOffset = pCompressor->max_offset; - - *pMatch1 = 0; - - /** - * Find matches using intervals - * - * Taken from wimlib (CC0 license): - * https://wimlib.net/git/?p=wimlib;a=blob_plain;f=src/lcpit_matchfinder.c;h=a2d6a1e0cd95200d1f3a5464d8359d5736b14cbe;hb=HEAD - */ - - /* Get the deepest lcp-interval containing the current suffix. */ - ref = pos_data[nOffset]; - - pos_data[nOffset] = 0; - - /* Ascend until we reach a visited interval, the root, or a child of the - * root. Link unvisited intervals to the current suffix as we go. */ - while ((super_ref = intervals[ref & POS_MASK]) & LCP_MASK) { - intervals[ref & POS_MASK] = nOffset | VISITED_FLAG; - ref = super_ref; - } - - if (super_ref == 0) { - /* In this case, the current interval may be any of: - * (1) the root; - * (2) an unvisited child of the root */ - - if (ref != 0) /* Not the root? */ - intervals[ref & POS_MASK] = nOffset | VISITED_FLAG; - return 0; - } - - /* Ascend indirectly via pos_data[] links. */ - match_pos = super_ref & EXCL_VISITED_MASK; - matchptr = pMatches; - depthptr = pMatchDepth; - int nPrevOffset = 0; - int nPrevLen = 0; - int nCurDepth = 0; - unsigned short *cur_depth = NULL; - - if (nOffset >= match_pos && (nBlockFlags & 3) == 3) { - int nMatchOffset = (int)(nOffset - match_pos); - int nMatchLen = (int)(ref >> (LCP_SHIFT + TAG_BITS)); - - if ((matchptr - pMatches) < nMaxMatches) { - if (nMatchOffset <= nMaxOffset) { - if (nPrevOffset && nPrevLen > 2 && nMatchOffset == (nPrevOffset - 1) && nMatchLen == (nPrevLen - 1) && cur_depth && nCurDepth < LCP_MAX) { - nCurDepth++; - *cur_depth = nCurDepth; - } - else { - nCurDepth = 0; - - cur_depth = depthptr; - matchptr->length = nMatchLen; - matchptr->offset = nMatchOffset; - *depthptr = 0; - matchptr++; - depthptr++; - } - - nPrevLen = nMatchLen; - nPrevOffset = nMatchOffset; - } - } - } - - for (;;) { - if ((super_ref = pos_data[match_pos]) > ref) { - match_pos = intervals[super_ref & POS_MASK] & EXCL_VISITED_MASK; - - if (nOffset >= match_pos && (nBlockFlags & 3) == 3) { - int nMatchOffset = (int)(nOffset - match_pos); - int nMatchLen = (int)(ref >> (LCP_SHIFT + TAG_BITS)); - - if ((matchptr - pMatches) < nMaxMatches) { - if (nMatchOffset <= nMaxOffset && abs(nMatchOffset - nPrevOffset) >= 128) { - if (nPrevOffset && nPrevLen > 2 && nMatchOffset == (nPrevOffset - 1) && nMatchLen == (nPrevLen - 1) && cur_depth && nCurDepth < LCP_MAX) { - nCurDepth++; - *cur_depth = nCurDepth | 0x8000; - } - else { - nCurDepth = 0; - - cur_depth = depthptr; - matchptr->length = nMatchLen; - matchptr->offset = nMatchOffset; - *depthptr = 0x8000; - matchptr++; - depthptr++; - } - - nPrevLen = nMatchLen; - nPrevOffset = nMatchOffset; - } - } - } - } - - while ((super_ref = pos_data[match_pos]) > ref) { - match_pos = intervals[super_ref & POS_MASK] & EXCL_VISITED_MASK; - - if (nOffset > match_pos && (nBlockFlags & 3) == 3) { - int nMatchOffset = (int)(nOffset - match_pos); - int nMatchLen = (int)(ref >> (LCP_SHIFT + TAG_BITS)); - - if ((matchptr - pMatches) < nMaxMatches) { - if (nMatchOffset <= nMaxOffset && (nMatchLen >= 3 || (nMatchLen >= 2 && (matchptr - pMatches) < (nMaxMatches - 1))) && nMatchLen < 1280 && abs(nMatchOffset - nPrevOffset) >= 128) { - if (nPrevOffset && nPrevLen > 2 && nMatchOffset == (nPrevOffset - 1) && nMatchLen == (nPrevLen - 1) && cur_depth && nCurDepth < LCP_MAX) { - nCurDepth++; - *cur_depth = nCurDepth | 0x8000; - } - else { - nCurDepth = 0; - - cur_depth = depthptr; - matchptr->length = nMatchLen; - matchptr->offset = nMatchOffset; - *depthptr = 0x8000; - matchptr++; - depthptr++; - } - - nPrevLen = nMatchLen; - nPrevOffset = nMatchOffset; - } - } - } - } - - intervals[ref & POS_MASK] = nOffset | VISITED_FLAG; - pos_data[match_pos] = (unsigned long long)ref; - - int nMatchOffset = (int)(nOffset - match_pos); - int nMatchLen = (int)(ref >> (LCP_SHIFT + TAG_BITS)); - - if ((matchptr - pMatches) < nMaxMatches) { - if (nMatchOffset <= nMaxOffset && nMatchOffset != nPrevOffset) { - if (nPrevOffset && nPrevLen > 2 && nMatchOffset == (nPrevOffset - 1) && nMatchLen == (nPrevLen - 1) && cur_depth && nCurDepth < LCP_MAX) { - nCurDepth++; - *cur_depth = nCurDepth; - } - else { - nCurDepth = 0; - - cur_depth = depthptr; - matchptr->length = nMatchLen; - matchptr->offset = nMatchOffset; - *depthptr = 0; - matchptr++; - depthptr++; - } - - nPrevLen = nMatchLen; - nPrevOffset = nMatchOffset; - } - } - - if (nMatchOffset && nMatchOffset < 16 && nMatchLen) - *pMatch1 = nMatchOffset; - - if (super_ref == 0) - break; - ref = super_ref; - match_pos = intervals[ref & POS_MASK] & EXCL_VISITED_MASK; - - if (nOffset > match_pos && (nBlockFlags & 3) == 3) { - int nMatchOffset = (int)(nOffset - match_pos); - int nMatchLen = (int)(ref >> (LCP_SHIFT + TAG_BITS)); - - if ((matchptr - pMatches) < nMaxMatches) { - if (nMatchOffset <= nMaxOffset && nMatchLen >= 2 && abs(nMatchOffset - nPrevOffset) >= 128) { - if (nPrevOffset && nPrevLen > 2 && nMatchOffset == (nPrevOffset - 1) && nMatchLen == (nPrevLen - 1) && cur_depth && nCurDepth < LCP_MAX) { - nCurDepth++; - *cur_depth = nCurDepth | 0x8000; - } - else { - nCurDepth = 0; - - cur_depth = depthptr; - matchptr->length = nMatchLen; - matchptr->offset = nMatchOffset; - *depthptr = 0x8000; - matchptr++; - depthptr++; - } - - nPrevLen = nMatchLen; - nPrevOffset = nMatchOffset; - } - } - } - } - - return (int)(matchptr - pMatches); -} - -/** - * Skip previously compressed bytes - * - * @param pCompressor compression context - * @param nStartOffset current offset in input window (typically 0) - * @param nEndOffset offset to skip to in input window (typically the number of previously compressed bytes) - */ -void apultra_skip_matches(apultra_compressor *pCompressor, const int nStartOffset, const int nEndOffset) { - apultra_match match; - unsigned short depth; - unsigned char match1; - int i; - - /* Skipping still requires scanning for matches, as this also performs a lazy update of the intervals. However, - * we don't store the matches. */ - for (i = nStartOffset; i < nEndOffset; i++) { - apultra_find_matches_at(pCompressor, i, &match, &depth, &match1, 0, 0); - } -} - -/** - * Find all matches for the data to be compressed - * - * @param pCompressor compression context - * @param nMatchesPerOffset maximum number of matches to store for each offset - * @param nStartOffset current offset in input window (typically the number of previously compressed bytes) - * @param nEndOffset offset to end finding matches at (typically the size of the total input window in bytes - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - */ -void apultra_find_all_matches(apultra_compressor *pCompressor, const int nMatchesPerOffset, const int nStartOffset, const int nEndOffset, const int nBlockFlags) { - apultra_match *pMatch = pCompressor->match; - unsigned short *pMatchDepth = pCompressor->match_depth; - unsigned char *pMatch1 = pCompressor->match1; - int i; - - for (i = nStartOffset; i < nEndOffset; i++) { - int nMatches = apultra_find_matches_at(pCompressor, i, pMatch, pMatchDepth, pMatch1, nMatchesPerOffset, nBlockFlags); - - while (nMatches < nMatchesPerOffset) { - pMatch[nMatches].length = 0; - pMatch[nMatches].offset = 0; - pMatchDepth[nMatches] = 0; - nMatches++; - } - - pMatch += nMatchesPerOffset; - pMatchDepth += nMatchesPerOffset; - pMatch1++; - } -} diff --git a/tools/z64compress/src/enc/apultra/matchfinder.h b/tools/z64compress/src/enc/apultra/matchfinder.h deleted file mode 100644 index 7d68eaf47d..0000000000 --- a/tools/z64compress/src/enc/apultra/matchfinder.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * matchfinder.h - LZ match finder definitions - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#ifndef _MATCHFINDER_H -#define _MATCHFINDER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -typedef struct _apultra_match apultra_match; -typedef struct _apultra_compressor apultra_compressor; - -/** - * Parse input data, build suffix array and overlaid data structures to speed up match finding - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param nInWindowSize total input size in bytes (previously compressed bytes + bytes to compress) - * - * @return 0 for success, non-zero for failure - */ -int apultra_build_suffix_array(apultra_compressor *pCompressor, const unsigned char *pInWindow, const int nInWindowSize); - -/** - * Find matches at the specified offset in the input window - * - * @param pCompressor compression context - * @param nOffset offset to find matches at, in the input window - * @param pMatches pointer to returned matches - * @param pMatchDepth pointer to returned match depths - * @param pMatch1 pointer to 1-byte length, 4 bit offset match - * @param nMaxMatches maximum number of matches to return (0 for none) - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * - * @return number of matches - */ -int apultra_find_matches_at(apultra_compressor *pCompressor, const int nOffset, apultra_match *pMatches, unsigned short *pMatchDepth, unsigned char *pMatch1, const int nMaxMatches, const int nBlockFlags); - -/** - * Skip previously compressed bytes - * - * @param pCompressor compression context - * @param nStartOffset current offset in input window (typically 0) - * @param nEndOffset offset to skip to in input window (typically the number of previously compressed bytes) - */ -void apultra_skip_matches(apultra_compressor *pCompressor, const int nStartOffset, const int nEndOffset); - -/** - * Find all matches for the data to be compressed - * - * @param pCompressor compression context - * @param nMatchesPerOffset maximum number of matches to store for each offset - * @param nStartOffset current offset in input window (typically the number of previously compressed bytes) - * @param nEndOffset offset to end finding matches at (typically the size of the total input window in bytes - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - */ -void apultra_find_all_matches(apultra_compressor *pCompressor, const int nMatchesPerOffset, const int nStartOffset, const int nEndOffset, const int nBlockFlags); - -#ifdef __cplusplus -} -#endif - -#endif /* _MATCHFINDER_H */ diff --git a/tools/z64compress/src/enc/apultra/shrink.c b/tools/z64compress/src/enc/apultra/shrink.c deleted file mode 100644 index 1d24a9cba6..0000000000 --- a/tools/z64compress/src/enc/apultra/shrink.c +++ /dev/null @@ -1,1731 +0,0 @@ -/* - * shrink.c - compressor implementation - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#include -#include -#include -#include "libapultra.h" -#include "matchfinder.h" -#include "shrink.h" -#include "format.h" - -#define TOKEN_CODE_LARGE_MATCH 2 /* 10 */ -#define TOKEN_SIZE_LARGE_MATCH 2 - -#define TOKEN_CODE_7BIT_MATCH 6 /* 110 */ -#define TOKEN_SIZE_7BIT_MATCH 3 - -#define TOKEN_CODE_4BIT_MATCH 7 /* 111 */ -#define TOKEN_SIZE_4BIT_MATCH 3 - -#define CountShift(N,bits) if ((N)>>(bits)) { (N)>>=(bits); (n) += (bits); } - -/** Gamma2 bit counts for common values, up to 255 */ -static char _gamma2_size[256] = { - 0, 0, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -}; - -/** - * Write bitpacked value to output (compressed) buffer - * - * @param pOutData pointer to output buffer - * @param nOutOffset current write index into output buffer - * @param nMaxOutDataSize maximum size of output buffer, in bytes - * @param nValue value to write - * @param nBits number of least significant bits to write in value - * @param nCurBitsOffset write index into output buffer, of current byte being filled with bits - * @param nCurBitShift bit shift count - * - * @return updated write index into output buffer, or -1 in case of an error - */ -static int apultra_write_bits(unsigned char *pOutData, int nOutOffset, const int nMaxOutDataSize, const int nValue, const int nBits, int *nCurBitsOffset, int *nCurBitShift) { - int i; - - if (nOutOffset < 0) return -1; - - for (i = nBits - 1; i >= 0; i--) { - if ((*nCurBitsOffset) == INT_MIN) { - /* Allocate a new byte in the stream to pack bits in */ - if (nOutOffset >= nMaxOutDataSize) return -1; - (*nCurBitsOffset) = nOutOffset; - (*nCurBitShift) = 7; - pOutData[nOutOffset++] = 0; - } - - pOutData[(*nCurBitsOffset)] |= ((nValue >> i) & 1) << (*nCurBitShift); - - (*nCurBitShift) --; - if ((*nCurBitShift) == -1) { - /* Current byte is full */ - (*nCurBitsOffset) = INT_MIN; - } - } - - return nOutOffset; -} - -/** - * Get size of gamma2 encoded value - * - * @param nValue value of evaluate (2..n) - * - * @return number of bits required - */ -static int apultra_get_gamma2_size(int nValue) { - if (nValue >= 0 && nValue < 256) - return _gamma2_size[nValue]; - else { - unsigned int n = 0; - CountShift(nValue, 16); - CountShift(nValue, 8); - CountShift(nValue, 4); - CountShift(nValue, 2); - CountShift(nValue, 1); - - return n << 1; - } -} - -/** - * Write gamma2 encoded value to output (compressed) buffer - * - * @param pOutData pointer to output buffer - * @param nOutOffset current write index into output buffer - * @param nMaxOutDataSize maximum size of output buffer, in bytes - * @param nValue value of write (2..n) - * @param nCurBitsOffset write index into output buffer, of current byte being filled with bits - * @param nCurBitShift bit shift count - * - * @return updated write index into output buffer, or -1 in case of an error - */ -static int apultra_write_gamma2_value(unsigned char *pOutData, int nOutOffset, const int nMaxOutDataSize, int nValue, int *nCurBitsOffset, int *nCurBitShift) { - int msb = 30; - while ((nValue >> msb--) == 0); - - while (msb > 0) { - int bit = (nValue >> msb) & 1; - - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, bit, 1, nCurBitsOffset, nCurBitShift); - msb--; - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, 1, 1, nCurBitsOffset, nCurBitShift); - } - - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, nValue & 1, 1, nCurBitsOffset, nCurBitShift); - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, 0, 1, nCurBitsOffset, nCurBitShift); - return nOutOffset; -} - -/** - * Get the number of extra bits required to represent a match offset - * - * @param nLength match length - * @param nMatchOffset match offset - * @param nFollowsLiteral non-zero if the match follows a literal, zero if it immediately follows another match - * - * @return number of extra bits required - */ -static inline int apultra_get_offset_varlen_size(const int nLength, const int nMatchOffset, const int nFollowsLiteral) { - if (nLength <= 3 && nMatchOffset < 128) - return 8 + TOKEN_SIZE_7BIT_MATCH; - else { - if (nFollowsLiteral) - return 8 + TOKEN_SIZE_LARGE_MATCH + apultra_get_gamma2_size((nMatchOffset >> 8) + 3); - else - return 8 + TOKEN_SIZE_LARGE_MATCH + apultra_get_gamma2_size((nMatchOffset >> 8) + 2); - } -} - -/** - * Get the number of extra bits required to represent a match length - * - * @param nLength match length - * @param nMatchOffset match offset - * - * @return number of extra bits required - */ -static inline int apultra_get_match_varlen_size(int nLength, const int nMatchOffset) { - if (nLength <= 3 && nMatchOffset < 128) - return 0; - else { - if (nMatchOffset < 128 || nMatchOffset >= MINMATCH4_OFFSET) - return apultra_get_gamma2_size(nLength - 2); - else if (nMatchOffset < MINMATCH3_OFFSET) - return apultra_get_gamma2_size(nLength); - else - return apultra_get_gamma2_size(nLength - 1); - } -} - -/** - * Insert forward rep candidate - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param i input data window position whose matches are being considered - * @param nMatchOffset match offset to use as rep candidate - * @param nStartOffset current offset in input window (typically the number of previously compressed bytes) - * @param nEndOffset offset to end finding matches at (typically the size of the total input window in bytes - * @param nArrivalsPerPosition maximum number of arrivals per input buffer position - * @param nDepth current insertion depth - */ -static void apultra_insert_forward_match(apultra_compressor *pCompressor, const unsigned char *pInWindow, const int i, const int nMatchOffset, const int nStartOffset, const int nEndOffset, const int nArrivalsPerPosition, int nDepth) { - const apultra_arrival *arrival = pCompressor->arrival + ((i - nStartOffset) * nArrivalsPerPosition); - const int *rle_len = (int*)pCompressor->intervals /* reuse */; - int* visited = ((int*)pCompressor->pos_data) - nStartOffset /* reuse */; - int* visited2 = visited + (nEndOffset - nStartOffset) /* reuse */; - int j; - - for (j = 0; j < nArrivalsPerPosition && arrival[j].from_slot; j++) { - if (arrival[j].follows_literal) { - int nRepOffset = arrival[j].rep_offset; - - if (nMatchOffset != nRepOffset && nRepOffset) { - int nRepPos = arrival[j].rep_pos; - - if (nRepPos >= nStartOffset && - nRepPos < nEndOffset && - visited[nRepPos] != nMatchOffset) { - - visited[nRepPos] = nMatchOffset; - - if (visited2[nRepPos] != nMatchOffset && nRepPos >= nMatchOffset && pCompressor->match[((nRepPos - nStartOffset) << MATCHES_PER_INDEX_SHIFT) + NMATCHES_PER_INDEX - 1].length == 0) { - const unsigned char* pInWindowAtRepOffset = pInWindow + nRepPos; - - if (pInWindowAtRepOffset[0] == pInWindowAtRepOffset[-nMatchOffset]) { - int nLen0 = rle_len[nRepPos - nMatchOffset]; - int nLen1 = rle_len[nRepPos]; - int nMinLen = (nLen0 < nLen1) ? nLen0 : nLen1; - - int nMaxRepLen = nEndOffset - nRepPos; - if (nMaxRepLen > LCP_MAX) - nMaxRepLen = LCP_MAX; - - if (nMinLen > nMaxRepLen) - nMinLen = nMaxRepLen; - - const unsigned char* pInWindowMax = pInWindowAtRepOffset + nMaxRepLen; - pInWindowAtRepOffset += nMinLen; - - while ((pInWindowAtRepOffset + 8) < pInWindowMax && !memcmp(pInWindowAtRepOffset, pInWindowAtRepOffset - nMatchOffset, 8)) - pInWindowAtRepOffset += 8; - while ((pInWindowAtRepOffset + 4) < pInWindowMax && !memcmp(pInWindowAtRepOffset, pInWindowAtRepOffset - nMatchOffset, 4)) - pInWindowAtRepOffset += 4; - while (pInWindowAtRepOffset < pInWindowMax && pInWindowAtRepOffset[0] == pInWindowAtRepOffset[-nMatchOffset]) - pInWindowAtRepOffset++; - - int nCurRepLen = (int)(pInWindowAtRepOffset - (pInWindow + nRepPos)); - - if (nCurRepLen >= 2) { - apultra_match* fwd_match = pCompressor->match + ((nRepPos - nStartOffset) << MATCHES_PER_INDEX_SHIFT); - unsigned short* fwd_depth = pCompressor->match_depth + ((nRepPos - nStartOffset) << MATCHES_PER_INDEX_SHIFT); - int r; - - for (r = 0; fwd_match[r].length >= MIN_MATCH_SIZE; r++) { - if (fwd_match[r].offset == nMatchOffset && (fwd_depth[r] & 0x3fff) == 0) { - if ((int)fwd_match[r].length < nCurRepLen) { - fwd_match[r].length = nCurRepLen; - fwd_depth[r] = 0; - } - r = NMATCHES_PER_INDEX; - break; - } - } - - if (r < NMATCHES_PER_INDEX) { - visited2[nRepPos] = nMatchOffset; - - fwd_match[r].offset = nMatchOffset; - fwd_match[r].length = nCurRepLen; - fwd_depth[r] = 0; - - if (nDepth < 9) - apultra_insert_forward_match(pCompressor, pInWindow, nRepPos, nMatchOffset, nStartOffset, nEndOffset, nArrivalsPerPosition, nDepth + 1); - } - } - } - } - } - } - } - } -} - -/** - * Attempt to pick optimal matches, so as to produce the smallest possible output that decompresses to the same input - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param nStartOffset current offset in input window (typically the number of previously compressed bytes) - * @param nEndOffset offset to end finding matches at (typically the size of the total input window in bytes - * @param nInsertForwardReps non-zero to insert forward repmatch candidates, zero to use the previously inserted candidates - * @param nCurRepMatchOffset starting rep offset for this block - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * @param nArrivalsPerPosition maximum number of arrivals per input buffer position - */ -static void apultra_optimize_forward(apultra_compressor *pCompressor, const unsigned char *pInWindow, const int nStartOffset, const int nEndOffset, const int nInsertForwardReps, const int *nCurRepMatchOffset, const int nBlockFlags, const int nArrivalsPerPosition) { - apultra_arrival *arrival = pCompressor->arrival - (nStartOffset * nArrivalsPerPosition); - const int* rle_len = (int*)pCompressor->intervals /* reuse */; - int* visited = ((int*)pCompressor->pos_data) - nStartOffset /* reuse */; - int i, j, n; - - if ((nEndOffset - nStartOffset) > pCompressor->block_size) return; - - memset(arrival + (nStartOffset * nArrivalsPerPosition), 0, sizeof(apultra_arrival) * ((nEndOffset - nStartOffset + 1) * nArrivalsPerPosition)); - - arrival[nStartOffset * nArrivalsPerPosition].from_slot = -1; - arrival[nStartOffset * nArrivalsPerPosition].rep_offset = *nCurRepMatchOffset; - - for (i = (nStartOffset * nArrivalsPerPosition); i != ((nEndOffset+1) * nArrivalsPerPosition); i++) { - arrival[i].cost = 0x40000000; - } - - if (nInsertForwardReps) { - memset(visited + nStartOffset, 0, 2 * (nEndOffset - nStartOffset) * sizeof(int)); - } - - for (i = nStartOffset; i != nEndOffset; i++) { - apultra_arrival *cur_arrival = &arrival[i * nArrivalsPerPosition]; - int m; - - const unsigned char nMatch1Offs = pCompressor->match1[i - nStartOffset]; - int nShortOffset; - int nShortLen; - int nLiteralScore; - int nLiteralCost; - - if ((pInWindow[i] != 0 && nMatch1Offs == 0) || (i == nStartOffset && (nBlockFlags & 1))) { - nShortOffset = 0; - nShortLen = 0; - nLiteralCost = 9 /* literal bit + literal byte */; - } - else { - nShortOffset = (pInWindow[i] == 0) ? 0 : nMatch1Offs; - nShortLen = 1; - nLiteralCost = 4 + TOKEN_SIZE_4BIT_MATCH /* command and offset cost; no length cost */; - } - - nLiteralScore = nShortOffset ? 3 : 1; - - if (cur_arrival[nArrivalsPerPosition].from_slot) { - for (j = 0; j < nArrivalsPerPosition && cur_arrival[j].from_slot; j++) { - int nPrevCost = cur_arrival[j].cost & 0x3fffffff; - int nCodingChoiceCost = nPrevCost + nLiteralCost; - int nScore = cur_arrival[j].score + nLiteralScore; - - apultra_arrival* pDestSlots = &cur_arrival[nArrivalsPerPosition]; - if (nCodingChoiceCost < pDestSlots[nArrivalsPerPosition - 1].cost || - (nCodingChoiceCost == pDestSlots[nArrivalsPerPosition - 1].cost && nScore < pDestSlots[nArrivalsPerPosition - 1].score)) { - int nRepOffset = cur_arrival[j].rep_offset; - int exists = 0; - - for (n = 0; - pDestSlots[n].cost < nCodingChoiceCost; - n++) { - if (pDestSlots[n].rep_offset == nRepOffset) { - exists = 1; - break; - } - } - - if (!exists) { - for (; - n < nArrivalsPerPosition && pDestSlots[n].cost == nCodingChoiceCost && nScore >= pDestSlots[n].score; - n++) { - if (pDestSlots[n].rep_offset == nRepOffset) { - exists = 1; - break; - } - } - - if (!exists) { - if (n < nArrivalsPerPosition) { - int nn; - - for (nn = n; - nn < nArrivalsPerPosition && pDestSlots[nn].cost == nCodingChoiceCost; - nn++) { - if (pDestSlots[nn].rep_offset == nRepOffset) { - exists = 1; - break; - } - } - - if (!exists) { - int z; - - for (z = n; z < nArrivalsPerPosition - 1 && pDestSlots[z].from_slot; z++) { - if (pDestSlots[z].rep_offset == nRepOffset) - break; - } - - apultra_arrival* pDestArrival = &pDestSlots[n]; - memmove(&pDestSlots[n + 1], - &pDestSlots[n], - sizeof(apultra_arrival) * (z - n)); - - pDestArrival->cost = nCodingChoiceCost; - pDestArrival->from_pos = i; - pDestArrival->from_slot = j + 1; - pDestArrival->follows_literal = 1; - pDestArrival->rep_offset = nRepOffset; - pDestArrival->short_offset = nShortOffset; - pDestArrival->rep_pos = cur_arrival[j].rep_pos; - pDestArrival->match_len = nShortLen; - pDestArrival->score = nScore; - } - } - } - } - } - } - } - else { - for (j = 0; j < nArrivalsPerPosition && cur_arrival[j].from_slot; j++) { - int nPrevCost = cur_arrival[j].cost & 0x3fffffff; - int nCodingChoiceCost = nPrevCost + nLiteralCost; - int nScore = cur_arrival[j].score + nLiteralScore; - - apultra_arrival* pDestArrival = &cur_arrival[nArrivalsPerPosition + j]; - - pDestArrival->cost = nCodingChoiceCost; - pDestArrival->from_pos = i; - pDestArrival->from_slot = j + 1; - pDestArrival->follows_literal = 1; - pDestArrival->rep_offset = cur_arrival[j].rep_offset; - pDestArrival->short_offset = nShortOffset; - pDestArrival->rep_pos = cur_arrival[j].rep_pos; - pDestArrival->match_len = nShortLen; - pDestArrival->score = nScore; - } - } - - if (i == nStartOffset && (nBlockFlags & 1)) continue; - - const apultra_match *match = pCompressor->match + ((i - nStartOffset) << MATCHES_PER_INDEX_SHIFT); - const unsigned short *match_depth = pCompressor->match_depth + ((i - nStartOffset) << MATCHES_PER_INDEX_SHIFT); - int nNumArrivalsForThisPos = j, nOverallMinRepLen = 0, nOverallMaxRepLen = 0; - - int nRepLenForArrival[NARRIVALS_PER_POSITION_MAX]; - memset(nRepLenForArrival, 0, nArrivalsPerPosition * sizeof(int)); - - int nRepMatchArrivalIdx[NARRIVALS_PER_POSITION_MAX + 1]; - int nNumRepMatchArrivals = 0; - - int nMaxRepLenForPos = nEndOffset - i; - if (nMaxRepLenForPos > LCP_MAX) - nMaxRepLenForPos = LCP_MAX; - const unsigned char* pInWindowStart = pInWindow + i; - const unsigned char* pInWindowMax = pInWindowStart + nMaxRepLenForPos; - const int nLen1 = rle_len[i]; - - for (j = 0; j < nNumArrivalsForThisPos && (i + 2) <= nEndOffset; j++) { - if (cur_arrival[j].follows_literal) { - int nRepOffset = cur_arrival[j].rep_offset; - - if (nRepOffset && i >= nRepOffset) { - if (pInWindowStart[0] == pInWindowStart[-nRepOffset]) { - int nLen0 = rle_len[i - nRepOffset]; - int nMinLen = (nLen0 < nLen1) ? nLen0 : nLen1; - - if (nMinLen > nMaxRepLenForPos) - nMinLen = nMaxRepLenForPos; - - const unsigned char* pInWindowAtRepOffset = pInWindowStart + nMinLen; - while ((pInWindowAtRepOffset + 8) < pInWindowMax && !memcmp(pInWindowAtRepOffset, pInWindowAtRepOffset - nRepOffset, 8)) - pInWindowAtRepOffset += 8; - while ((pInWindowAtRepOffset + 4) < pInWindowMax && !memcmp(pInWindowAtRepOffset, pInWindowAtRepOffset - nRepOffset, 4)) - pInWindowAtRepOffset += 4; - while (pInWindowAtRepOffset < pInWindowMax && pInWindowAtRepOffset[0] == pInWindowAtRepOffset[-nRepOffset]) - pInWindowAtRepOffset++; - - int nCurMaxLen = (int)(pInWindowAtRepOffset - pInWindowStart); - - if (nCurMaxLen >= 2) { - nRepLenForArrival[j] = nCurMaxLen; - nRepMatchArrivalIdx[nNumRepMatchArrivals++] = j; - - if (nOverallMaxRepLen < nCurMaxLen) - nOverallMaxRepLen = nCurMaxLen; - } - } - } - } - } - nRepMatchArrivalIdx[nNumRepMatchArrivals] = -1; - - for (m = 0; m < NMATCHES_PER_INDEX && match[m].length; m++) { - const int nOrigMatchLen = match[m].length; - const int nOrigMatchOffset = match[m].offset; - const unsigned int nOrigMatchDepth = match_depth[m] & 0x3fff; - const int nScorePenalty = 3 + ((match_depth[m] & 0x8000) >> 15); - unsigned int d; - - for (d = 0; d <= nOrigMatchDepth; d += (nOrigMatchDepth ? nOrigMatchDepth : 1)) { - const int nMatchOffset = nOrigMatchOffset - d; - int nMatchLen = nOrigMatchLen - d; - - if ((i + nMatchLen) > nEndOffset) - nMatchLen = nEndOffset - i; - - if (nInsertForwardReps) { - apultra_insert_forward_match(pCompressor, pInWindow, i, nMatchOffset, nStartOffset, nEndOffset, nArrivalsPerPosition, 0); - } - - if (nMatchLen >= 2) { - int nStartingMatchLen, nJumpMatchLen, k; - int nNoRepMatchOffsetCostForLit[2], nNoRepMatchOffsetCostDelta; - int nMinMatchLenForOffset; - int nNoRepCostAdjusment = (nMatchLen >= LCP_MAX) ? 1 : 0; - - if (nMatchOffset < MINMATCH3_OFFSET) - nMinMatchLenForOffset = 2; - else { - if (nMatchOffset < MINMATCH4_OFFSET) - nMinMatchLenForOffset = 3; - else - nMinMatchLenForOffset = 4; - } - - if (nMatchLen >= LEAVE_ALONE_MATCH_SIZE && i >= nMatchLen) - nStartingMatchLen = nMatchLen; - else - nStartingMatchLen = 2; - - if ((nBlockFlags & 3) == 3 && nMatchLen > 90 && i >= 90) - nJumpMatchLen = 90; - else - nJumpMatchLen = nMatchLen + 1; - - if (nStartingMatchLen <= 3 && nMatchOffset < 128) { - nNoRepMatchOffsetCostForLit[0] = 8 + TOKEN_SIZE_7BIT_MATCH; - nNoRepMatchOffsetCostForLit[1] = 8 + TOKEN_SIZE_7BIT_MATCH; - } - else { - nNoRepMatchOffsetCostForLit[0] = 8 + TOKEN_SIZE_LARGE_MATCH + apultra_get_gamma2_size((nMatchOffset >> 8) + 2); - nNoRepMatchOffsetCostForLit[1] = 8 + TOKEN_SIZE_LARGE_MATCH + apultra_get_gamma2_size((nMatchOffset >> 8) + 3); - } - nNoRepMatchOffsetCostDelta = nNoRepMatchOffsetCostForLit[1] - nNoRepMatchOffsetCostForLit[0]; - - for (k = nStartingMatchLen; k <= nMatchLen; k++) { - int nRepMatchMatchLenCost = apultra_get_gamma2_size(k); - apultra_arrival *pDestSlots = &cur_arrival[k * nArrivalsPerPosition]; - - /* Insert non-repmatch candidate */ - - if (k >= nMinMatchLenForOffset) { - int nNoRepMatchMatchLenCost; - - if (k <= 3 && nMatchOffset < 128) - nNoRepMatchMatchLenCost = 0; - else { - if (nMatchOffset < 128 || nMatchOffset >= MINMATCH4_OFFSET) - nNoRepMatchMatchLenCost = apultra_get_gamma2_size(k - 2); - else if (nMatchOffset < MINMATCH3_OFFSET) - nNoRepMatchMatchLenCost = nRepMatchMatchLenCost; - else - nNoRepMatchMatchLenCost = apultra_get_gamma2_size(k - 1); - } - - for (j = 0; j < nNumArrivalsForThisPos; j++) { - if (nMatchOffset != cur_arrival[j].rep_offset || cur_arrival[j].follows_literal == 0) { - int nPrevCost = cur_arrival[j].cost & 0x3fffffff; - int nMatchCmdCost = nNoRepMatchMatchLenCost + nNoRepMatchOffsetCostForLit[cur_arrival[j].follows_literal]; - int nCodingChoiceCost = nPrevCost + nMatchCmdCost; - - if (nCodingChoiceCost <= (pDestSlots[nArrivalsPerPosition - 1].cost + 1)) { - int nScore = cur_arrival[j].score + nScorePenalty; - - if (nCodingChoiceCost < pDestSlots[nArrivalsPerPosition - 2].cost || - (nCodingChoiceCost == pDestSlots[nArrivalsPerPosition - 2].cost && nScore < pDestSlots[nArrivalsPerPosition - 2].score)) { - int exists = 0; - - for (n = 0; - pDestSlots[n].cost < nCodingChoiceCost; - n++) { - if (pDestSlots[n].rep_offset == nMatchOffset) { - exists = 1; - break; - } - } - - if (!exists) { - int nRevisedCodingChoiceCost = nCodingChoiceCost - nNoRepCostAdjusment; - - for (; - n < nArrivalsPerPosition - 1 && pDestSlots[n].cost == nRevisedCodingChoiceCost && nScore >= pDestSlots[n].score; - n++) { - if (pDestSlots[n].rep_offset == nMatchOffset) { - exists = 1; - break; - } - } - - if (!exists) { - if (n < nArrivalsPerPosition - 1) { - int nn; - - for (nn = n; - nn < nArrivalsPerPosition && pDestSlots[nn].cost == nCodingChoiceCost; - nn++) { - if (pDestSlots[nn].rep_offset == nMatchOffset) { - exists = 1; - break; - } - } - - if (!exists) { - int z; - - for (z = n; z < nArrivalsPerPosition - 1 && pDestSlots[z].from_slot; z++) { - if (pDestSlots[z].rep_offset == nMatchOffset) - break; - } - - apultra_arrival* pDestArrival = &pDestSlots[n]; - memmove(&pDestSlots[n + 1], - &pDestSlots[n], - sizeof(apultra_arrival) * (z - n)); - - pDestArrival->cost = nRevisedCodingChoiceCost; - pDestArrival->from_pos = i; - pDestArrival->from_slot = j + 1; - pDestArrival->follows_literal = 0; - pDestArrival->rep_offset = nMatchOffset; - pDestArrival->short_offset = 0; - pDestArrival->rep_pos = i; - pDestArrival->match_len = k; - pDestArrival->score = nScore; - } - } - } - } - else { - if ((nCodingChoiceCost - pDestSlots[n].cost) >= nNoRepMatchOffsetCostDelta) - break; - } - } - if (cur_arrival[j].follows_literal == 0 || nNoRepMatchOffsetCostDelta == 0) - break; - } - else { - break; - } - } - } - } - - /* Insert repmatch candidate */ - - if (k > nOverallMinRepLen && k <= nOverallMaxRepLen) { - int nRepMatchCmdCost = TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */ + nRepMatchMatchLenCost; - int nCurRepMatchArrival; - - if (k <= 90) - nOverallMinRepLen = k; - else if (nOverallMaxRepLen == k) - nOverallMaxRepLen--; - - for (nCurRepMatchArrival = 0; (j = nRepMatchArrivalIdx[nCurRepMatchArrival]) >= 0; nCurRepMatchArrival++) { - if (nRepLenForArrival[j] >= k) { - int nPrevCost = cur_arrival[j].cost & 0x3fffffff; - int nRepCodingChoiceCost = nPrevCost + nRepMatchCmdCost; - int nScore = cur_arrival[j].score + 2; - - if (nRepCodingChoiceCost < pDestSlots[nArrivalsPerPosition - 1].cost || - (nRepCodingChoiceCost == pDestSlots[nArrivalsPerPosition - 1].cost && nScore < pDestSlots[nArrivalsPerPosition - 1].score)) { - int nRepOffset = cur_arrival[j].rep_offset; - int exists = 0; - - for (n = 0; - pDestSlots[n].cost < nRepCodingChoiceCost; - n++) { - if (pDestSlots[n].rep_offset == nRepOffset) { - exists = 1; - break; - } - } - - if (!exists) { - for (; - n < nArrivalsPerPosition && pDestSlots[n].cost == nRepCodingChoiceCost && nScore >= pDestSlots[n].score; - n++) { - if (pDestSlots[n].rep_offset == nRepOffset) { - exists = 1; - break; - } - } - - if (!exists) { - if (n < nArrivalsPerPosition) { - int nn; - - for (nn = n; - nn < nArrivalsPerPosition && pDestSlots[nn].cost == nRepCodingChoiceCost; - nn++) { - if (pDestSlots[nn].rep_offset == nRepOffset) { - exists = 1; - break; - } - } - - if (!exists) { - int z; - - for (z = n; z < nArrivalsPerPosition - 1 && pDestSlots[z].from_slot; z++) { - if (pDestSlots[z].rep_offset == nRepOffset) - break; - } - - apultra_arrival* pDestArrival = &pDestSlots[n]; - memmove(&pDestSlots[n + 1], - &pDestSlots[n], - sizeof(apultra_arrival) * (z - n)); - - pDestArrival->cost = nRepCodingChoiceCost; - pDestArrival->from_pos = i; - pDestArrival->from_slot = j + 1; - pDestArrival->follows_literal = 0; - pDestArrival->rep_offset = nRepOffset; - pDestArrival->short_offset = 0; - pDestArrival->rep_pos = i; - pDestArrival->match_len = k; - pDestArrival->score = nScore; - } - } - } - } - } - else { - break; - } - } - } - } - - if (k == 3 && nMatchOffset < 128) { - nNoRepMatchOffsetCostForLit[0] = 8 + TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size((nMatchOffset >> 8) + 2) */; - nNoRepMatchOffsetCostForLit[1] = 8 + TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size((nMatchOffset >> 8) + 3) */; - } - - if (k == nJumpMatchLen) - k = nMatchLen - 1; - } - } - - if (nOrigMatchLen >= 512) - break; - } - } - } - - if (!nInsertForwardReps) { - const apultra_arrival* end_arrival = &arrival[(i * nArrivalsPerPosition) + 0]; - apultra_final_match* pBestMatch = pCompressor->best_match - nStartOffset; - - while (end_arrival->from_slot > 0 && end_arrival->from_pos >= 0 && (int)end_arrival->from_pos < nEndOffset) { - pBestMatch[end_arrival->from_pos].length = end_arrival->match_len; - if (end_arrival->match_len >= 2) - pBestMatch[end_arrival->from_pos].offset = end_arrival->rep_offset; - else - pBestMatch[end_arrival->from_pos].offset = end_arrival->short_offset; - - end_arrival = &arrival[(end_arrival->from_pos * nArrivalsPerPosition) + (end_arrival->from_slot - 1)]; - } - } -} - -/** - * Attempt to replace matches by literals when it makes the final bitstream smaller, and merge large matches - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param pBestMatch optimal matches to evaluate and update - * @param nStartOffset current offset in input window (typically the number of previously compressed bytes) - * @param nEndOffset offset to end finding matches at (typically the size of the total input window in bytes - * @param nCurRepMatchOffset starting rep offset for this block - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * - * @return non-zero if the number of tokens was reduced, 0 if it wasn't - */ -static int apultra_reduce_commands(apultra_compressor *pCompressor, const unsigned char *pInWindow, apultra_final_match *pBestMatch, const int nStartOffset, const int nEndOffset, const int *nCurRepMatchOffset, const int nBlockFlags) { - int i; - int nRepMatchOffset = *nCurRepMatchOffset; - int nFollowsLiteral = 0; - int nDidReduce = 0; - int nLastMatchLen = 0; - const unsigned char *match1 = pCompressor->match1 - nStartOffset; - - for (i = nStartOffset + ((nBlockFlags & 1) ? 1 : 0); i < nEndOffset; ) { - apultra_final_match *pMatch = pBestMatch + i; - - if (pMatch->length <= 1 && - (i + 1) < nEndOffset && - pBestMatch[i + 1].length >= 2 && - pBestMatch[i + 1].length < MAX_VARLEN && - pBestMatch[i + 1].offset && - i >= pBestMatch[i + 1].offset && - (i + pBestMatch[i + 1].length + 1) <= nEndOffset && - !memcmp(pInWindow + i - (pBestMatch[i + 1].offset), pInWindow + i, pBestMatch[i + 1].length + 1)) { - if ((pBestMatch[i + 1].offset < MINMATCH3_OFFSET || (pBestMatch[i + 1].length + 1) >= 3 || (pBestMatch[i + 1].offset == nRepMatchOffset && nFollowsLiteral)) && - (pBestMatch[i + 1].offset < MINMATCH4_OFFSET || (pBestMatch[i + 1].length + 1) >= 4 || (pBestMatch[i + 1].offset == nRepMatchOffset && nFollowsLiteral))) { - - int nCurPartialCommandSize = (pMatch->length == 1) ? (TOKEN_SIZE_4BIT_MATCH + 4) : (1 /* literal bit */ + 8 /* literal size */); - if (pBestMatch[i + 1].offset == nRepMatchOffset /* always follows a literal, the one at the current position */) { - nCurPartialCommandSize += TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */ + apultra_get_gamma2_size(pBestMatch[i + 1].length); - } - else { - nCurPartialCommandSize += apultra_get_offset_varlen_size(pBestMatch[i + 1].length, pBestMatch[i + 1].offset, 1) + apultra_get_match_varlen_size(pBestMatch[i + 1].length, pBestMatch[i + 1].offset); - } - - int nReducedPartialCommandSize; - if (pBestMatch[i + 1].offset == nRepMatchOffset && nFollowsLiteral) { - nReducedPartialCommandSize = TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */ + apultra_get_gamma2_size(pBestMatch[i + 1].length); - } - else { - nReducedPartialCommandSize = apultra_get_offset_varlen_size(pBestMatch[i + 1].length, pBestMatch[i + 1].offset, nFollowsLiteral) + apultra_get_match_varlen_size(pBestMatch[i + 1].length, pBestMatch[i + 1].offset); - } - - if (nReducedPartialCommandSize < nCurPartialCommandSize || (nFollowsLiteral == 0 && nLastMatchLen >= LCP_MAX)) { - /* Merge */ - pBestMatch[i].length = pBestMatch[i + 1].length + 1; - pBestMatch[i].offset = pBestMatch[i + 1].offset; - pBestMatch[i + 1].length = 0; - pBestMatch[i + 1].offset = 0; - nDidReduce = 1; - continue; - } - } - } - - if (pMatch->length >= 2) { - if (pMatch->length < 32 && /* Don't waste time considering large matches, they will always win over literals */ - (i + pMatch->length) < nEndOffset /* Don't consider the last match in the block, we can only reduce a match inbetween other tokens */) { - int nNextIndex = i + pMatch->length; - int nNextFollowsLiteral = 0; - int nCannotEncode = 0; - - while (nNextIndex < nEndOffset && pBestMatch[nNextIndex].length < 2) { - nNextIndex++; - nNextFollowsLiteral = 1; - } - - if (nNextIndex < nEndOffset && pBestMatch[nNextIndex].length >= 2) { - if (nRepMatchOffset && nRepMatchOffset != pMatch->offset && pBestMatch[nNextIndex].offset && pMatch->offset != pBestMatch[nNextIndex].offset && - nNextFollowsLiteral) { - /* Try to gain a match forward */ - if (i >= pBestMatch[nNextIndex].offset && (i - pBestMatch[nNextIndex].offset + pMatch->length) <= nEndOffset) { - if ((pBestMatch[nNextIndex].offset < MINMATCH3_OFFSET || pMatch->length >= 3) && - (pBestMatch[nNextIndex].offset < MINMATCH4_OFFSET || pMatch->length >= 4)) { - int nMaxLen = 0; - const unsigned char* pInWindowAtPos = pInWindow + i; - while (nMaxLen < pMatch->length && pInWindowAtPos[nMaxLen - pBestMatch[nNextIndex].offset] == pInWindowAtPos[nMaxLen]) - nMaxLen++; - - if (nMaxLen >= pMatch->length) { - /* Replace */ - pMatch->offset = pBestMatch[nNextIndex].offset; - nDidReduce = 1; - } - else if (nMaxLen >= 2) { - if ((nFollowsLiteral && nRepMatchOffset == pBestMatch[nNextIndex].offset) || - ((pBestMatch[nNextIndex].offset < MINMATCH3_OFFSET || nMaxLen >= 3) && - (pBestMatch[nNextIndex].offset < MINMATCH4_OFFSET || nMaxLen >= 4))) { - - int nPartialSizeBefore, nPartialSizeAfter, j; - - nPartialSizeBefore = apultra_get_offset_varlen_size(pMatch->length, pMatch->offset, nFollowsLiteral); - nPartialSizeBefore += apultra_get_match_varlen_size(pMatch->length, pMatch->offset); - - nPartialSizeBefore += apultra_get_offset_varlen_size(pBestMatch[nNextIndex].length, pBestMatch[nNextIndex].offset, 1); - nPartialSizeBefore += apultra_get_match_varlen_size(pBestMatch[nNextIndex].length, pBestMatch[nNextIndex].offset); - - nPartialSizeAfter = apultra_get_offset_varlen_size(nMaxLen, pBestMatch[nNextIndex].offset, nFollowsLiteral); - if (nFollowsLiteral && nRepMatchOffset == pBestMatch[nNextIndex].offset) - nPartialSizeAfter += apultra_get_gamma2_size(nMaxLen); - else - nPartialSizeAfter += apultra_get_match_varlen_size(nMaxLen, pBestMatch[nNextIndex].offset); - - nPartialSizeAfter += TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */; - nPartialSizeAfter += apultra_get_gamma2_size(pBestMatch[nNextIndex].length); - - for (j = nMaxLen; j < pMatch->length; j++) { - if (pInWindow[i + j] == 0 || match1[i + j]) - nPartialSizeAfter += TOKEN_SIZE_4BIT_MATCH + 4; - else - nPartialSizeAfter += 1 /* literal bit */ + 8 /* literal byte */; - } - - if (nPartialSizeAfter < nPartialSizeBefore) { - /* We gain a repmatch that is shorter than the original match as this is the best we can do, so it is followed by extra literals, but - * we have calculated that this is shorter */ - - int nOrigLen = pMatch->length; - int j; - - pMatch->offset = pBestMatch[nNextIndex].offset; - pMatch->length = nMaxLen; - - for (j = nMaxLen; j < nOrigLen; j++) { - pBestMatch[i + j].offset = match1[i + j]; - pBestMatch[i + j].length = (pInWindow[i + j] && match1[i+j] == 0) ? 0 : 1; - } - - nDidReduce = 1; - continue; - } - } - } - } - } - } - - /* Calculate this command's current cost */ - - int nCurCommandSize; - if (pMatch->offset == nRepMatchOffset && nFollowsLiteral) { - nCurCommandSize = TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */ + apultra_get_gamma2_size(pMatch->length); - } - else { - nCurCommandSize = apultra_get_offset_varlen_size(pMatch->length, pMatch->offset, nFollowsLiteral) + apultra_get_match_varlen_size(pMatch->length, pMatch->offset); - } - - /* Calculate the next command's current cost */ - int nNextCommandSize; - if (pBestMatch[nNextIndex].offset == pMatch->offset && nNextFollowsLiteral && pBestMatch[nNextIndex].length >= 2) { - nNextCommandSize = TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */ + apultra_get_gamma2_size(pBestMatch[nNextIndex].length); - } - else { - nNextCommandSize = apultra_get_offset_varlen_size(pBestMatch[nNextIndex].length, pBestMatch[nNextIndex].offset, nNextFollowsLiteral) + apultra_get_match_varlen_size(pBestMatch[nNextIndex].length, pBestMatch[nNextIndex].offset); - } - - int nOriginalCombinedCommandSize = nCurCommandSize + nNextCommandSize; - - /* Calculate the cost of replacing this match command by literals + the effect on the cost of the next command */ - int nReducedCommandSize = 0; - int j; - - for (j = 0; j < pMatch->length; j++) { - if (pInWindow[i + j] == 0 || match1[i + j]) - nReducedCommandSize += TOKEN_SIZE_4BIT_MATCH + 4; - else - nReducedCommandSize += 1 /* literal bit */ + 8; - } - - if (pBestMatch[nNextIndex].offset == nRepMatchOffset /* the new command would always follow literals, the ones we create */ && pBestMatch[nNextIndex].length >= 2) { - nReducedCommandSize += TOKEN_SIZE_LARGE_MATCH + 2 /* apultra_get_gamma2_size(2) */ + apultra_get_gamma2_size(pBestMatch[nNextIndex].length); - } - else { - if ((pBestMatch[nNextIndex].length < 3 && pBestMatch[nNextIndex].offset >= MINMATCH3_OFFSET) || - (pBestMatch[nNextIndex].length < 4 && pBestMatch[nNextIndex].offset >= MINMATCH4_OFFSET)) { - /* This match length can only be encoded with a rep-match */ - nCannotEncode = 1; - } - else { - nReducedCommandSize += apultra_get_offset_varlen_size(pBestMatch[nNextIndex].length, pBestMatch[nNextIndex].offset, 1 /* follows literals */) + apultra_get_match_varlen_size(pBestMatch[nNextIndex].length, pBestMatch[nNextIndex].offset); - } - } - - if (!nCannotEncode && nOriginalCombinedCommandSize > nReducedCommandSize) { - /* Reduce */ - int nMatchLen = pMatch->length; - int j; - - for (j = 0; j < nMatchLen; j++) { - pBestMatch[i + j].offset = match1[i + j]; - pBestMatch[i + j].length = (pInWindow[i + j] && match1[i + j] == 0) ? 0 : 1; - } - - nDidReduce = 1; - continue; - } - } - } - - if ((i + pMatch->length) < nEndOffset && pMatch->offset > 0 && - pBestMatch[i + pMatch->length].offset > 0 && - pBestMatch[i + pMatch->length].length >= 2 && - (pMatch->length + pBestMatch[i + pMatch->length].length) >= LEAVE_ALONE_MATCH_SIZE && - (pMatch->length + pBestMatch[i + pMatch->length].length) <= MAX_VARLEN && - (i + pMatch->length) >= pMatch->offset && - (i + pMatch->length) >= pBestMatch[i + pMatch->length].offset && - (i + pMatch->length + pBestMatch[i + pMatch->length].length) <= nEndOffset && - !memcmp(pInWindow + i + pMatch->length - pMatch->offset, - pInWindow + i + pMatch->length - pBestMatch[i + pMatch->length].offset, - pBestMatch[i + pMatch->length].length)) { - int nMatchLen = pMatch->length; - - /* Join large matches */ - - int nNextIndex = i + pMatch->length + pBestMatch[i + pMatch->length].length; - int nNextFollowsLiteral = 0; - int nCannotEncode = 0; - - while (nNextIndex < nEndOffset && pBestMatch[nNextIndex].length < 2) { - nNextIndex++; - nNextFollowsLiteral = 1; - } - - if (nNextIndex < nEndOffset && nNextFollowsLiteral && pBestMatch[nNextIndex].length >= 2 && - pBestMatch[nNextIndex].offset == pBestMatch[i + pMatch->length].offset) { - if ((pBestMatch[nNextIndex].offset >= MINMATCH3_OFFSET && pBestMatch[nNextIndex].length < 3) || - (pBestMatch[nNextIndex].offset >= MINMATCH4_OFFSET && pBestMatch[nNextIndex].length < 4)) { - nCannotEncode = 1; - } - } - - if (!nCannotEncode) { - pMatch->length += pBestMatch[i + nMatchLen].length; - pBestMatch[i + nMatchLen].offset = 0; - pBestMatch[i + nMatchLen].length = -1; - nDidReduce = 1; - continue; - } - } - - nRepMatchOffset = pMatch->offset; - nFollowsLiteral = 0; - nLastMatchLen = pMatch->length; - - i += pMatch->length; - } - else { - /* 4 bits offset (1 byte match) or literal */ - i++; - nFollowsLiteral = 1; - nLastMatchLen = 0; - } - } - - return nDidReduce; -} - -/** - * Emit a block of compressed data - * - * @param pCompressor compression context - * @param pBestMatch optimal matches to emit - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param nStartOffset current offset in input window (typically the number of previously compressed bytes) - * @param nEndOffset offset to end finding matches at (typically the size of the total input window in bytes - * @param pOutData pointer to output buffer - * @param nMaxOutDataSize maximum size of output buffer, in bytes - * @param nCurBitsOffset write index into output buffer, of current byte being filled with bits - * @param nCurBitShift bit shift count - * @param nFollowsLiteral non-zero if the next command to be issued follows a literal, 0 if not - * @param nCurRepMatchOffset starting rep offset for this block, updated after the block is compressed successfully - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * - * @return size of compressed data in output buffer, or -1 if the data is uncompressible - */ -static int apultra_write_block(apultra_compressor *pCompressor, apultra_final_match *pBestMatch, const unsigned char *pInWindow, const int nStartOffset, const int nEndOffset, unsigned char *pOutData, int nOutOffset, const int nMaxOutDataSize, int *nCurBitsOffset, int *nCurBitShift, int *nFollowsLiteral, int *nCurRepMatchOffset, const int nBlockFlags) { - int i; - int nRepMatchOffset = *nCurRepMatchOffset; - const int nMaxOffset = pCompressor->max_offset; - - if (nBlockFlags & 1) { - if (nOutOffset < 0 || nOutOffset >= nMaxOutDataSize) - return -1; - pOutData[nOutOffset++] = pInWindow[nStartOffset]; - *nFollowsLiteral = 1; - } - - for (i = nStartOffset + ((nBlockFlags & 1) ? 1 : 0); i < nEndOffset; ) { - const apultra_final_match *pMatch = pBestMatch + i; - - if (pMatch->length >= 2) { - int nMatchOffset = pMatch->offset; - int nMatchLen = pMatch->length; - - if (nMatchOffset < MIN_OFFSET || nMatchOffset > nMaxOffset) - return -1; - - if (nMatchOffset == nRepMatchOffset && *nFollowsLiteral) { - /* Rep-match */ - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, TOKEN_CODE_LARGE_MATCH, TOKEN_SIZE_LARGE_MATCH, nCurBitsOffset, nCurBitShift); - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, 0 /* length of 2 encoded as gamma 2 */, 2, nCurBitsOffset, nCurBitShift); - - /* The match length isn't encoded in the command, emit elias gamma value */ - nOutOffset = apultra_write_gamma2_value(pOutData, nOutOffset, nMaxOutDataSize, nMatchLen, nCurBitsOffset, nCurBitShift); - if (nOutOffset < 0) return -1; - - *nFollowsLiteral = 0; - - pCompressor->stats.num_rep_matches++; - } - else { - if (nMatchLen <= 3 && nMatchOffset < 128) { - /* 7 bits offset + 1 bit length */ - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, TOKEN_CODE_7BIT_MATCH, TOKEN_SIZE_7BIT_MATCH, nCurBitsOffset, nCurBitShift); - - if (nOutOffset < 0 || nOutOffset >= nMaxOutDataSize) - return -1; - pOutData[nOutOffset++] = ((nMatchOffset) & 0x7f) << 1 | (nMatchLen - 2); - - *nFollowsLiteral = 0; - nRepMatchOffset = nMatchOffset; - - pCompressor->stats.num_7bit_matches++; - } - else { - /* 8+n bits offset */ - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, TOKEN_CODE_LARGE_MATCH, TOKEN_SIZE_LARGE_MATCH, nCurBitsOffset, nCurBitShift); - - if (nOutOffset < 0 || nOutOffset >= nMaxOutDataSize) - return -1; - if (*nFollowsLiteral) - nOutOffset = apultra_write_gamma2_value(pOutData, nOutOffset, nMaxOutDataSize, (nMatchOffset >> 8) + 3, nCurBitsOffset, nCurBitShift); - else - nOutOffset = apultra_write_gamma2_value(pOutData, nOutOffset, nMaxOutDataSize, (nMatchOffset >> 8) + 2, nCurBitsOffset, nCurBitShift); - pOutData[nOutOffset++] = nMatchOffset & 0xff; - - /* The match length isn't encoded in the command, emit elias gamma value */ - - if (nMatchOffset < 128 || nMatchOffset >= MINMATCH4_OFFSET) - nOutOffset = apultra_write_gamma2_value(pOutData, nOutOffset, nMaxOutDataSize, nMatchLen - 2, nCurBitsOffset, nCurBitShift); - else if (nMatchOffset < MINMATCH3_OFFSET) - nOutOffset = apultra_write_gamma2_value(pOutData, nOutOffset, nMaxOutDataSize, nMatchLen, nCurBitsOffset, nCurBitShift); - else - nOutOffset = apultra_write_gamma2_value(pOutData, nOutOffset, nMaxOutDataSize, nMatchLen - 1, nCurBitsOffset, nCurBitShift); - if (nOutOffset < 0) return -1; - - *nFollowsLiteral = 0; - nRepMatchOffset = nMatchOffset; - - pCompressor->stats.num_variable_matches++; - } - } - - if (nMatchOffset < pCompressor->stats.min_offset || pCompressor->stats.min_offset == -1) - pCompressor->stats.min_offset = nMatchOffset; - if (nMatchOffset > pCompressor->stats.max_offset) - pCompressor->stats.max_offset = nMatchOffset; - pCompressor->stats.total_offsets += (long long)nMatchOffset; - - if (nMatchLen < pCompressor->stats.min_match_len || pCompressor->stats.min_match_len == -1) - pCompressor->stats.min_match_len = nMatchLen; - if (nMatchLen > pCompressor->stats.max_match_len) - pCompressor->stats.max_match_len = nMatchLen; - pCompressor->stats.total_match_lens += nMatchLen; - pCompressor->stats.match_divisor++; - - if (nMatchOffset == 1) { - if (nMatchLen < pCompressor->stats.min_rle1_len || pCompressor->stats.min_rle1_len == -1) - pCompressor->stats.min_rle1_len = nMatchLen; - if (nMatchLen > pCompressor->stats.max_rle1_len) - pCompressor->stats.max_rle1_len = nMatchLen; - pCompressor->stats.total_rle1_lens += nMatchLen; - pCompressor->stats.rle1_divisor++; - } - else if (nMatchOffset == 2) { - if (nMatchLen < pCompressor->stats.min_rle2_len || pCompressor->stats.min_rle2_len == -1) - pCompressor->stats.min_rle2_len = nMatchLen; - if (nMatchLen > pCompressor->stats.max_rle2_len) - pCompressor->stats.max_rle2_len = nMatchLen; - pCompressor->stats.total_rle2_lens += nMatchLen; - pCompressor->stats.rle2_divisor++; - } - - i += nMatchLen; - - pCompressor->stats.commands_divisor++; - } - else if (pMatch->length == 1) { - int nMatchOffset = pMatch->offset; - - /* 4 bits offset */ - - if (nMatchOffset < 0 || nMatchOffset > 15) - return -1; - - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, TOKEN_CODE_4BIT_MATCH, TOKEN_SIZE_4BIT_MATCH, nCurBitsOffset, nCurBitShift); - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, nMatchOffset, 4, nCurBitsOffset, nCurBitShift); - if (nOutOffset < 0) return -1; - - pCompressor->stats.num_4bit_matches++; - pCompressor->stats.commands_divisor++; - - i++; - *nFollowsLiteral = 1; - } - else { - /* Literal */ - - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, 0 /* literal */, 1, nCurBitsOffset, nCurBitShift); - - if (nOutOffset < 0 || nOutOffset >= nMaxOutDataSize) - return -1; - pOutData[nOutOffset++] = pInWindow[i]; - - pCompressor->stats.num_literals++; - pCompressor->stats.commands_divisor++; - i++; - *nFollowsLiteral = 1; - } - - int nCurSafeDist = (i - nStartOffset) - nOutOffset; - if (nCurSafeDist >= 0 && pCompressor->stats.safe_dist < nCurSafeDist) - pCompressor->stats.safe_dist = nCurSafeDist; - } - - if (nBlockFlags & 2) { - /* 8 bits offset */ - - nOutOffset = apultra_write_bits(pOutData, nOutOffset, nMaxOutDataSize, TOKEN_CODE_7BIT_MATCH, TOKEN_SIZE_7BIT_MATCH, nCurBitsOffset, nCurBitShift); - - if (nOutOffset < 0 || nOutOffset >= nMaxOutDataSize) - return -1; - pOutData[nOutOffset++] = 0x00; /* Offset: EOD */ - pCompressor->stats.num_eod++; - pCompressor->stats.commands_divisor++; - - int nCurSafeDist = (i - nStartOffset) - nOutOffset; - if (nCurSafeDist >= 0 && pCompressor->stats.safe_dist < nCurSafeDist) - pCompressor->stats.safe_dist = nCurSafeDist; - } - - *nCurRepMatchOffset = nRepMatchOffset; - return nOutOffset; -} - -/** - * Select the most optimal matches, reduce the token count if possible, and then emit a block of compressed data - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param nPreviousBlockSize number of previously compressed bytes (or 0 for none) - * @param nInDataSize number of input bytes to compress - * @param pOutData pointer to output buffer - * @param nMaxOutDataSize maximum size of output buffer, in bytes - * @param nCurBitsOffset write index into output buffer, of current byte being filled with bits - * @param nCurBitShift bit shift count - * @param nCurFollowsLiteral non-zero if the next command to be issued follows a literal, 0 if not - * @param nCurRepMatchOffset starting rep offset for this block, updated after the block is compressed successfully - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * - * @return size of compressed data in output buffer, or -1 if the data is uncompressible - */ -static int apultra_optimize_and_write_block(apultra_compressor *pCompressor, const unsigned char *pInWindow, const int nPreviousBlockSize, const int nInDataSize, unsigned char *pOutData, const int nMaxOutDataSize, int *nCurBitsOffset, int *nCurBitShift, int *nCurFollowsLiteral, int *nCurRepMatchOffset, const int nBlockFlags) { - int nOutOffset = 0; - const int nEndOffset = nPreviousBlockSize + nInDataSize; - const int nArrivalsPerPosition = pCompressor->max_arrivals; - int *rle_len = (int*)pCompressor->intervals /* reuse */; - int i, nPosition; - - memset(pCompressor->best_match, 0, pCompressor->block_size * sizeof(apultra_final_match)); - - if ((nBlockFlags & 3) == 3) { - int *first_offset_for_byte = pCompressor->first_offset_for_byte; - int *next_offset_for_pos = pCompressor->next_offset_for_pos; - - /* Supplement 2 and 3-byte matches */ - - memset(first_offset_for_byte, 0xff, sizeof(int) * 65536); - memset(next_offset_for_pos, 0xff, sizeof(int) * nInDataSize); - - for (nPosition = nPreviousBlockSize; nPosition < (nEndOffset - 1); nPosition++) { - next_offset_for_pos[nPosition - nPreviousBlockSize] = first_offset_for_byte[((unsigned int)pInWindow[nPosition]) | (((unsigned int)pInWindow[nPosition + 1]) << 8)]; - first_offset_for_byte[((unsigned int)pInWindow[nPosition]) | (((unsigned int)pInWindow[nPosition + 1]) << 8)] = nPosition; - } - - for (nPosition = nPreviousBlockSize + 1; nPosition < (nEndOffset - 1); nPosition++) { - apultra_match *match = pCompressor->match + ((nPosition - nPreviousBlockSize) << MATCHES_PER_INDEX_SHIFT); - unsigned short *match_depth = pCompressor->match_depth + ((nPosition - nPreviousBlockSize) << MATCHES_PER_INDEX_SHIFT); - int m = 0, nInserted = 0; - int nMatchPos; - - while (m < 15 && match[m].length) - m++; - - for (nMatchPos = next_offset_for_pos[nPosition - nPreviousBlockSize]; m < 15 && nMatchPos >= 0; nMatchPos = next_offset_for_pos[nMatchPos - nPreviousBlockSize]) { - int nMatchOffset = nPosition - nMatchPos; - - if (nMatchOffset <= pCompressor->max_offset) { - int nExistingMatchIdx; - int nAlreadyExists = 0; - - for (nExistingMatchIdx = 0; nExistingMatchIdx < m; nExistingMatchIdx++) { - if (match[nExistingMatchIdx].offset == nMatchOffset || - (match[nExistingMatchIdx].offset - (match_depth[nExistingMatchIdx] & 0x3fff)) == nMatchOffset) { - nAlreadyExists = 1; - break; - } - } - - if (!nAlreadyExists) { - match[m].length = (nPosition < (nEndOffset - 2) && pInWindow[nMatchPos + 2] == pInWindow[nPosition + 2]) ? 3 : 2; - match[m].offset = nMatchOffset; - match_depth[m] = 0x4000; - m++; - nInserted++; - if (nInserted >= 6) - break; - } - } - else { - break; - } - } - } - } - - i = 0; - while (i < nEndOffset) { - int nRangeStartIdx = i; - unsigned char c = pInWindow[nRangeStartIdx]; - do { - i++; - } - while (i < nEndOffset && pInWindow[i] == c); - while (nRangeStartIdx < i) { - rle_len[nRangeStartIdx] = i - nRangeStartIdx; - nRangeStartIdx++; - } - } - - apultra_optimize_forward(pCompressor, pInWindow, nPreviousBlockSize, nEndOffset, 1 /* nInsertForwardReps */, nCurRepMatchOffset, nBlockFlags, nArrivalsPerPosition); - - if ((nBlockFlags & 3) == 3 && nArrivalsPerPosition == NARRIVALS_PER_POSITION_MAX) { - const int* next_offset_for_pos = pCompressor->next_offset_for_pos; - int* offset_cache = pCompressor->offset_cache; - - /* Supplement matches further */ - - memset(offset_cache, 0xff, sizeof(int) * 2048); - - for (nPosition = nPreviousBlockSize + 1; nPosition < (nEndOffset - 1); nPosition++) { - apultra_match* match = pCompressor->match + ((nPosition - nPreviousBlockSize) << MATCHES_PER_INDEX_SHIFT); - - if (match[0].length < 8) { - unsigned short* match_depth = pCompressor->match_depth + ((nPosition - nPreviousBlockSize) << MATCHES_PER_INDEX_SHIFT); - int m = 0, nInserted = 0; - int nMatchPos; - - while (m < 46 && match[m].length) { - offset_cache[match[m].offset & 2047] = nPosition; - offset_cache[(match[m].offset - (match_depth[m] & 0x3fff)) & 2047] = nPosition; - m++; - } - - for (nMatchPos = next_offset_for_pos[nPosition - nPreviousBlockSize]; m < 46 && nMatchPos >= 0; nMatchPos = next_offset_for_pos[nMatchPos - nPreviousBlockSize]) { - int nMatchOffset = nPosition - nMatchPos; - - if (nMatchOffset <= pCompressor->max_offset) { - int nAlreadyExists = 0; - - if (offset_cache[nMatchOffset & 2047] == nPosition) { - int nExistingMatchIdx; - - for (nExistingMatchIdx = 0; nExistingMatchIdx < m; nExistingMatchIdx++) { - if (match[nExistingMatchIdx].offset == nMatchOffset || - (match[nExistingMatchIdx].offset - (match_depth[nExistingMatchIdx] & 0x3fff)) == nMatchOffset) { - nAlreadyExists = 1; - - if (match_depth[nExistingMatchIdx] == 0x4000) { - int nMatchLen = 2; - while (nMatchLen < 16 && nPosition < (nEndOffset - nMatchLen) && pInWindow[nMatchPos + nMatchLen] == pInWindow[nPosition + nMatchLen]) - nMatchLen++; - if (nMatchLen > (int)match[nExistingMatchIdx].length) - match[nExistingMatchIdx].length = nMatchLen; - } - - break; - } - } - } - - if (!nAlreadyExists) { - int nForwardPos = nPosition + 2 + 1; - int nGotMatch = 0; - - while (nForwardPos >= nMatchOffset && (nForwardPos + 2) < nEndOffset && nForwardPos < (nPosition + 2 + 1 + 5)) { - if (!memcmp(pInWindow + nForwardPos, pInWindow + nForwardPos - nMatchOffset, 2)) { - nGotMatch = 1; - break; - } - nForwardPos++; - } - - if (nGotMatch) { - int nMatchLen = 2; - while (nMatchLen < 16 && nPosition < (nEndOffset - nMatchLen) && pInWindow[nMatchPos + nMatchLen] == pInWindow[nPosition + nMatchLen]) - nMatchLen++; - match[m].length = nMatchLen; - match[m].offset = nMatchOffset; - match_depth[m] = 0; - m++; - - apultra_insert_forward_match(pCompressor, pInWindow, nPosition, nMatchOffset, nPreviousBlockSize, nEndOffset, nArrivalsPerPosition, 8); - - nInserted++; - if (nInserted >= 18 || (nInserted >= 15 && m >= 38)) - break; - } - } - } - else { - break; - } - } - } - } - } - - /* Pick optimal matches */ - apultra_optimize_forward(pCompressor, pInWindow, nPreviousBlockSize, nEndOffset, 0 /* nInsertForwardReps */, nCurRepMatchOffset, nBlockFlags, nArrivalsPerPosition); - - /* Apply reduction and merge pass */ - int nDidReduce; - int nPasses = 0; - do { - nDidReduce = apultra_reduce_commands(pCompressor, pInWindow, pCompressor->best_match - nPreviousBlockSize, nPreviousBlockSize, nEndOffset, nCurRepMatchOffset, nBlockFlags); - nPasses++; - } while (nDidReduce && nPasses < 20); - - /* Write compressed block */ - - return apultra_write_block(pCompressor, pCompressor->best_match - nPreviousBlockSize, pInWindow, nPreviousBlockSize, nEndOffset, pOutData, nOutOffset, nMaxOutDataSize, nCurBitsOffset, nCurBitShift, nCurFollowsLiteral, nCurRepMatchOffset, nBlockFlags); -} - -/* Forward declaration */ -static void apultra_compressor_destroy(apultra_compressor *pCompressor); - -/** - * Initialize compression context - * - * @param pCompressor compression context to initialize - * @param nBlockSize maximum size of input data (bytes to compress only) - * @param nMaxWindowSize maximum size of input data window (previously compressed bytes + bytes to compress) - * @param nMaxArrivals maximum number of arrivals per position - * @param nFlags compression flags - * - * @return 0 for success, non-zero for failure - */ -static int apultra_compressor_init(apultra_compressor *pCompressor, const int nBlockSize, const int nMaxWindowSize, const int nMaxArrivals, const int nFlags) { - int nResult; - - nResult = divsufsort_init(&pCompressor->divsufsort_context); - pCompressor->intervals = NULL; - pCompressor->pos_data = NULL; - pCompressor->open_intervals = NULL; - pCompressor->match = NULL; - pCompressor->match_depth = NULL; - pCompressor->match1 = NULL; - pCompressor->best_match = NULL; - pCompressor->arrival = NULL; - pCompressor->first_offset_for_byte = NULL; - pCompressor->next_offset_for_pos = NULL; - pCompressor->offset_cache = NULL; - pCompressor->flags = nFlags; - pCompressor->block_size = nBlockSize; - pCompressor->max_arrivals = nMaxArrivals; - - memset(&pCompressor->stats, 0, sizeof(pCompressor->stats)); - pCompressor->stats.min_match_len = -1; - pCompressor->stats.min_offset = -1; - pCompressor->stats.min_rle1_len = -1; - pCompressor->stats.min_rle2_len = -1; - - if (!nResult) { - pCompressor->intervals = (unsigned long long *)malloc(nMaxWindowSize * sizeof(unsigned long long)); - - if (pCompressor->intervals) { - pCompressor->pos_data = (unsigned long long *)malloc(nMaxWindowSize * sizeof(unsigned long long)); - - if (pCompressor->pos_data) { - pCompressor->open_intervals = (unsigned long long *)malloc((LCP_AND_TAG_MAX + 1) * sizeof(unsigned long long)); - - if (pCompressor->open_intervals) { - pCompressor->arrival = (apultra_arrival *)malloc((nBlockSize + 1) * nMaxArrivals * sizeof(apultra_arrival)); - - if (pCompressor->arrival) { - pCompressor->best_match = (apultra_final_match *)malloc(nBlockSize * sizeof(apultra_final_match)); - - if (pCompressor->best_match) { - pCompressor->match = (apultra_match *)malloc(nBlockSize * NMATCHES_PER_INDEX * sizeof(apultra_match)); - if (pCompressor->match) { - pCompressor->match_depth = (unsigned short *)malloc(nBlockSize * NMATCHES_PER_INDEX * sizeof(unsigned short)); - if (pCompressor->match_depth) { - pCompressor->match1 = (unsigned char *)malloc(nBlockSize * sizeof(unsigned char)); - if (pCompressor->match1) { - pCompressor->first_offset_for_byte = (int*)malloc(65536 * sizeof(int)); - if (pCompressor->first_offset_for_byte) { - pCompressor->next_offset_for_pos = (int*)malloc(nBlockSize * sizeof(int)); - if (pCompressor->next_offset_for_pos) { - if (nMaxArrivals == NARRIVALS_PER_POSITION_MAX) { - pCompressor->offset_cache = (int*)malloc(2048 * sizeof(int)); - if (pCompressor->offset_cache) { - return 0; - } - } - else { - return 0; - } - } - } - } - } - } - } - } - } - } - } - } - - apultra_compressor_destroy(pCompressor); - return 100; -} - -/** - * Clean up compression context and free up any associated resources - * - * @param pCompressor compression context to clean up - */ -static void apultra_compressor_destroy(apultra_compressor *pCompressor) { - divsufsort_destroy(&pCompressor->divsufsort_context); - - if (pCompressor->offset_cache) { - free(pCompressor->offset_cache); - pCompressor->offset_cache = NULL; - } - - if (pCompressor->next_offset_for_pos) { - free(pCompressor->next_offset_for_pos); - pCompressor->next_offset_for_pos = NULL; - } - - if (pCompressor->first_offset_for_byte) { - free(pCompressor->first_offset_for_byte); - pCompressor->first_offset_for_byte = NULL; - } - - if (pCompressor->match1) { - free(pCompressor->match1); - pCompressor->match1 = NULL; - } - - if (pCompressor->match_depth) { - free(pCompressor->match_depth); - pCompressor->match_depth = NULL; - } - - if (pCompressor->match) { - free(pCompressor->match); - pCompressor->match = NULL; - } - - if (pCompressor->arrival) { - free(pCompressor->arrival); - pCompressor->arrival = NULL; - } - - if (pCompressor->best_match) { - free(pCompressor->best_match); - pCompressor->best_match = NULL; - } - - if (pCompressor->open_intervals) { - free(pCompressor->open_intervals); - pCompressor->open_intervals = NULL; - } - - if (pCompressor->pos_data) { - free(pCompressor->pos_data); - pCompressor->pos_data = NULL; - } - - if (pCompressor->intervals) { - free(pCompressor->intervals); - pCompressor->intervals = NULL; - } -} - -/** - * Compress one block of data - * - * @param pCompressor compression context - * @param pInWindow pointer to input data window (previously compressed bytes + bytes to compress) - * @param nPreviousBlockSize number of previously compressed bytes (or 0 for none) - * @param nInDataSize number of input bytes to compress - * @param pOutData pointer to output buffer - * @param nMaxOutDataSize maximum size of output buffer, in bytes - * @param nCurBitsOffset write index into output buffer, of current byte being filled with bits - * @param nCurBitShift bit shift count - * @param nCurFollowsLiteral non-zero if the next command to be issued follows a literal, 0 if not - * @param nCurRepMatchOffset starting rep offset for this block, updated after the block is compressed successfully - * @param nBlockFlags bit 0: 1 for first block, 0 otherwise; bit 1: 1 for last block, 0 otherwise - * - * @return size of compressed data in output buffer, or -1 if the data is uncompressible - */ -static int apultra_compressor_shrink_block(apultra_compressor *pCompressor, const unsigned char *pInWindow, const int nPreviousBlockSize, const int nInDataSize, unsigned char *pOutData, const int nMaxOutDataSize, int *nCurBitsOffset, int *nCurBitShift, int *nCurFollowsLiteral, int *nCurRepMatchOffset, const int nBlockFlags) { - int nCompressedSize; - - if (apultra_build_suffix_array(pCompressor, pInWindow, nPreviousBlockSize + nInDataSize)) - nCompressedSize = -1; - else { - if (nPreviousBlockSize) { - apultra_skip_matches(pCompressor, 0, nPreviousBlockSize); - } - apultra_find_all_matches(pCompressor, NMATCHES_PER_INDEX, nPreviousBlockSize, nPreviousBlockSize + nInDataSize, nBlockFlags); - - nCompressedSize = apultra_optimize_and_write_block(pCompressor, pInWindow, nPreviousBlockSize, nInDataSize, pOutData, nMaxOutDataSize, nCurBitsOffset, nCurBitShift, nCurFollowsLiteral, nCurRepMatchOffset, nBlockFlags); - } - - return nCompressedSize; -} - -/** - * Get maximum compressed size of input(source) data - * - * @param nInputSize input(source) size in bytes - * - * @return maximum compressed size - */ -size_t apultra_get_max_compressed_size(size_t nInputSize) { - return ((nInputSize * 9 /* literals + literal bits */ + 1 /* match bit */ + 2 /* 7+1 command bits */ + 8 /* EOD offset bits */) + 7) >> 3; -} - -/** - * Compress memory - * - * @param pInputData pointer to input(source) data to compress - * @param pOutBuffer buffer for compressed data - * @param nInputSize input(source) size in bytes - * @param nMaxOutBufferSize maximum capacity of compression buffer - * @param nFlags compression flags (set to 0) - * @param nMaxWindowSize maximum window size to use (0 for default) - * @param nDictionarySize size of dictionary in front of input data (0 for none) - * @param progress progress function, called after compressing each block, or NULL for none - * @param pStats pointer to compression stats that are filled if this function is successful, or NULL - * - * @return actual compressed size, or -1 for error - */ -size_t apultra_compress(const unsigned char *pInputData, unsigned char *pOutBuffer, size_t nInputSize, size_t nMaxOutBufferSize, - const unsigned int nFlags, size_t nMaxWindowSize, size_t nDictionarySize, void(*progress)(long long nOriginalSize, long long nCompressedSize), apultra_stats *pStats) { - apultra_compressor compressor; - size_t nOriginalSize = 0; - size_t nCompressedSize = 0L; - int nResult; - int nMaxArrivals = NARRIVALS_PER_POSITION_SMALL; - int nError = 0; - const int nBlockSize = (nInputSize < BLOCK_SIZE) ? ((nInputSize < 1024) ? 1024 : (int)nInputSize) : BLOCK_SIZE; - const int nMaxOutBlockSize = (int)apultra_get_max_compressed_size(nBlockSize); - - if (nDictionarySize < nInputSize) { - int nInDataSize = (int)(nInputSize - nDictionarySize); - if (nInDataSize > nBlockSize) - nInDataSize = nBlockSize; - - if (nInDataSize > 0 && (nDictionarySize + nInDataSize) >= nInputSize) { - if (nInputSize <= 262144) - nMaxArrivals = NARRIVALS_PER_POSITION_MAX; - else - nMaxArrivals = NARRIVALS_PER_POSITION_NORMAL; - } - } - - nResult = apultra_compressor_init(&compressor, nBlockSize, nBlockSize * 2, nMaxArrivals, nFlags); - if (nResult != 0) { - return -1; - } - - compressor.max_offset = nMaxWindowSize ? (int)nMaxWindowSize : MAX_OFFSET; - - int nPreviousBlockSize = 0; - int nNumBlocks = 0; - int nCurBitsOffset = INT_MIN, nCurBitShift = 0, nCurFollowsLiteral = 0; - int nBlockFlags = 1; - int nCurRepMatchOffset = 0; - - if (nDictionarySize) { - nOriginalSize = (int)nDictionarySize; - nPreviousBlockSize = (int)nDictionarySize; - } - - while (nOriginalSize < nInputSize && !nError) { - int nInDataSize; - - nInDataSize = (int)(nInputSize - nOriginalSize); - if (nInDataSize > nBlockSize) - nInDataSize = nBlockSize; - - if (nInDataSize > 0) { - int nOutDataSize; - int nOutDataEnd = (int)(nMaxOutBufferSize - nCompressedSize); - - if (nOutDataEnd > nMaxOutBlockSize) - nOutDataEnd = nMaxOutBlockSize; - - if ((nOriginalSize + nInDataSize) >= nInputSize) - nBlockFlags |= 2; - nOutDataSize = apultra_compressor_shrink_block(&compressor, pInputData + nOriginalSize - nPreviousBlockSize, nPreviousBlockSize, nInDataSize, pOutBuffer + nCompressedSize, nOutDataEnd, - &nCurBitsOffset, &nCurBitShift, &nCurFollowsLiteral, &nCurRepMatchOffset, nBlockFlags); - nBlockFlags &= (~1); - - if (nOutDataSize >= 0) { - /* Write compressed block */ - - if (!nError) { - nOriginalSize += nInDataSize; - nCompressedSize += nOutDataSize; - if (nCurBitsOffset != INT_MIN) - nCurBitsOffset -= nOutDataSize; - } - } - else { - nError = -1; - } - - nPreviousBlockSize = nInDataSize; - nNumBlocks++; - } - - if (!nError && nOriginalSize < nInputSize) { - if (progress) - progress(nOriginalSize, nCompressedSize); - } - } - - if (progress) - progress(nOriginalSize, nCompressedSize); - if (pStats) - *pStats = compressor.stats; - - apultra_compressor_destroy(&compressor); - - if (nError) { - return -1; - } - else { - return nCompressedSize; - } -} diff --git a/tools/z64compress/src/enc/apultra/shrink.h b/tools/z64compress/src/enc/apultra/shrink.h deleted file mode 100644 index 7c9b548ddc..0000000000 --- a/tools/z64compress/src/enc/apultra/shrink.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * shrink.h - compressor definitions - * - * Copyright (C) 2019 Emmanuel Marty - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -/* - * Uses the libdivsufsort library Copyright (c) 2003-2008 Yuta Mori - * - * Inspired by cap by Sven-Åke Dahl. https://github.com/svendahl/cap - * Also inspired by Charles Bloom's compression blog. http://cbloomrants.blogspot.com/ - * With ideas from LZ4 by Yann Collet. https://github.com/lz4/lz4 - * With help and support from spke - * - */ - -#ifndef _SHRINK_H -#define _SHRINK_H - -#include "divsufsort.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define LCP_BITS 15 -#define TAG_BITS 4 -#define LCP_MAX ((1U<<(LCP_BITS - TAG_BITS)) - 1) -#define LCP_AND_TAG_MAX ((1U< - * With ideas from Lizard by Przemyslaw Skibinski and Yann Collet. https://github.com/inikep/lizard - * Also with ideas from smallz4 by Stephan Brumme. https://create.stephan-brumme.com/smallz4/ - * - */ - -#include -#include -//#include "shrink_context.h" -//#include "shrink_block.h" -#include "format.h" -#include "matchfinder.h" -//#include "lib.h" diff --git a/tools/z64compress/src/enc/apultra/sssort.c b/tools/z64compress/src/enc/apultra/sssort.c deleted file mode 100644 index 4a18fd2ab4..0000000000 --- a/tools/z64compress/src/enc/apultra/sssort.c +++ /dev/null @@ -1,815 +0,0 @@ -/* - * sssort.c for libdivsufsort - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "divsufsort_private.h" - - -/*- Private Functions -*/ - -static const saint_t lg_table[256]= { - -1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 -}; - -#if (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) - -static INLINE -saint_t -ss_ilg(saidx_t n) { -#if SS_BLOCKSIZE == 0 -# if defined(BUILD_DIVSUFSORT64) - return (n >> 32) ? - ((n >> 48) ? - ((n >> 56) ? - 56 + lg_table[(n >> 56) & 0xff] : - 48 + lg_table[(n >> 48) & 0xff]) : - ((n >> 40) ? - 40 + lg_table[(n >> 40) & 0xff] : - 32 + lg_table[(n >> 32) & 0xff])) : - ((n & 0xffff0000) ? - ((n & 0xff000000) ? - 24 + lg_table[(n >> 24) & 0xff] : - 16 + lg_table[(n >> 16) & 0xff]) : - ((n & 0x0000ff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff])); -# else - return (n & 0xffff0000) ? - ((n & 0xff000000) ? - 24 + lg_table[(n >> 24) & 0xff] : - 16 + lg_table[(n >> 16) & 0xff]) : - ((n & 0x0000ff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff]); -# endif -#elif SS_BLOCKSIZE < 256 - return lg_table[n]; -#else - return (n & 0xff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff]; -#endif -} - -#endif /* (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) */ - -#if SS_BLOCKSIZE != 0 - -static const saint_t sqq_table[256] = { - 0, 16, 22, 27, 32, 35, 39, 42, 45, 48, 50, 53, 55, 57, 59, 61, - 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 81, 83, 84, 86, 87, 89, - 90, 91, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 106, 107, 108, 109, -110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, -128, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, -143, 144, 144, 145, 146, 147, 148, 149, 150, 150, 151, 152, 153, 154, 155, 155, -156, 157, 158, 159, 160, 160, 161, 162, 163, 163, 164, 165, 166, 167, 167, 168, -169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176, 177, 178, 178, 179, 180, -181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, -192, 192, 193, 193, 194, 195, 195, 196, 197, 197, 198, 199, 199, 200, 201, 201, -202, 203, 203, 204, 204, 205, 206, 206, 207, 208, 208, 209, 209, 210, 211, 211, -212, 212, 213, 214, 214, 215, 215, 216, 217, 217, 218, 218, 219, 219, 220, 221, -221, 222, 222, 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, 229, 230, -230, 231, 231, 232, 232, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, -239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 247, -247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255 -}; - -static INLINE -saidx_t -ss_isqrt(saidx_t x) { - saidx_t y, e; - - if(x >= (SS_BLOCKSIZE * SS_BLOCKSIZE)) { return SS_BLOCKSIZE; } - e = (x & 0xffff0000) ? - ((x & 0xff000000) ? - 24 + lg_table[(x >> 24) & 0xff] : - 16 + lg_table[(x >> 16) & 0xff]) : - ((x & 0x0000ff00) ? - 8 + lg_table[(x >> 8) & 0xff] : - 0 + lg_table[(x >> 0) & 0xff]); - - if(e >= 16) { - y = sqq_table[x >> ((e - 6) - (e & 1))] << ((e >> 1) - 7); - if(e >= 24) { y = (y + 1 + x / y) >> 1; } - y = (y + 1 + x / y) >> 1; - } else if(e >= 8) { - y = (sqq_table[x >> ((e - 6) - (e & 1))] >> (7 - (e >> 1))) + 1; - } else { - return sqq_table[x] >> 4; - } - - return (x < (y * y)) ? y - 1 : y; -} - -#endif /* SS_BLOCKSIZE != 0 */ - - -/*---------------------------------------------------------------------------*/ - -/* Compares two suffixes. */ -static INLINE -saint_t -ss_compare(const sauchar_t *T, - const saidx_t *p1, const saidx_t *p2, - saidx_t depth) { - const sauchar_t *U1, *U2, *U1n, *U2n; - - for(U1 = T + depth + *p1, - U2 = T + depth + *p2, - U1n = T + *(p1 + 1) + 2, - U2n = T + *(p2 + 1) + 2; - (U1 < U1n) && (U2 < U2n) && (*U1 == *U2); - ++U1, ++U2) { - } - - return U1 < U1n ? - (U2 < U2n ? *U1 - *U2 : 1) : - (U2 < U2n ? -1 : 0); -} - - -/*---------------------------------------------------------------------------*/ - -#if (SS_BLOCKSIZE != 1) && (SS_INSERTIONSORT_THRESHOLD != 1) - -/* Insertionsort for small size groups */ -static -void -ss_insertionsort(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *last, saidx_t depth) { - saidx_t *i, *j; - saidx_t t; - saint_t r; - - for(i = last - 2; first <= i; --i) { - for(t = *i, j = i + 1; 0 < (r = ss_compare(T, PA + t, PA + *j, depth));) { - do { *(j - 1) = *j; } while((++j < last) && (*j < 0)); - if(last <= j) { break; } - } - if(r == 0) { *j = ~*j; } - *(j - 1) = t; - } -} - -#endif /* (SS_BLOCKSIZE != 1) && (SS_INSERTIONSORT_THRESHOLD != 1) */ - - -/*---------------------------------------------------------------------------*/ - -#if (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) - -static INLINE -void -ss_fixdown(const sauchar_t *Td, const saidx_t *PA, - saidx_t *SA, saidx_t i, saidx_t size) { - saidx_t j, k; - saidx_t v; - saint_t c, d, e; - - for(v = SA[i], c = Td[PA[v]]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { - d = Td[PA[SA[k = j++]]]; - if(d < (e = Td[PA[SA[j]]])) { k = j; d = e; } - if(d <= c) { break; } - } - SA[i] = v; -} - -/* Simple top-down heapsort. */ -static -void -ss_heapsort(const sauchar_t *Td, const saidx_t *PA, saidx_t *SA, saidx_t size) { - saidx_t i, m; - saidx_t t; - - m = size; - if((size % 2) == 0) { - m--; - if(Td[PA[SA[m / 2]]] < Td[PA[SA[m]]]) { SWAP(SA[m], SA[m / 2]); } - } - - for(i = m / 2 - 1; 0 <= i; --i) { ss_fixdown(Td, PA, SA, i, m); } - if((size % 2) == 0) { SWAP(SA[0], SA[m]); ss_fixdown(Td, PA, SA, 0, m); } - for(i = m - 1; 0 < i; --i) { - t = SA[0], SA[0] = SA[i]; - ss_fixdown(Td, PA, SA, 0, i); - SA[i] = t; - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Returns the median of three elements. */ -static INLINE -saidx_t * -ss_median3(const sauchar_t *Td, const saidx_t *PA, - saidx_t *v1, saidx_t *v2, saidx_t *v3) { - saidx_t *t; - if(Td[PA[*v1]] > Td[PA[*v2]]) { SWAP(v1, v2); } - if(Td[PA[*v2]] > Td[PA[*v3]]) { - if(Td[PA[*v1]] > Td[PA[*v3]]) { return v1; } - else { return v3; } - } - return v2; -} - -/* Returns the median of five elements. */ -static INLINE -saidx_t * -ss_median5(const sauchar_t *Td, const saidx_t *PA, - saidx_t *v1, saidx_t *v2, saidx_t *v3, saidx_t *v4, saidx_t *v5) { - saidx_t *t; - if(Td[PA[*v2]] > Td[PA[*v3]]) { SWAP(v2, v3); } - if(Td[PA[*v4]] > Td[PA[*v5]]) { SWAP(v4, v5); } - if(Td[PA[*v2]] > Td[PA[*v4]]) { SWAP(v2, v4); SWAP(v3, v5); } - if(Td[PA[*v1]] > Td[PA[*v3]]) { SWAP(v1, v3); } - if(Td[PA[*v1]] > Td[PA[*v4]]) { SWAP(v1, v4); SWAP(v3, v5); } - if(Td[PA[*v3]] > Td[PA[*v4]]) { return v4; } - return v3; -} - -/* Returns the pivot element. */ -static INLINE -saidx_t * -ss_pivot(const sauchar_t *Td, const saidx_t *PA, saidx_t *first, saidx_t *last) { - saidx_t *middle; - saidx_t t; - - t = last - first; - middle = first + t / 2; - - if(t <= 512) { - if(t <= 32) { - return ss_median3(Td, PA, first, middle, last - 1); - } else { - t >>= 2; - return ss_median5(Td, PA, first, first + t, middle, last - 1 - t, last - 1); - } - } - t >>= 3; - first = ss_median3(Td, PA, first, first + t, first + (t << 1)); - middle = ss_median3(Td, PA, middle - t, middle, middle + t); - last = ss_median3(Td, PA, last - 1 - (t << 1), last - 1 - t, last - 1); - return ss_median3(Td, PA, first, middle, last); -} - - -/*---------------------------------------------------------------------------*/ - -/* Binary partition for substrings. */ -static INLINE -saidx_t * -ss_partition(const saidx_t *PA, - saidx_t *first, saidx_t *last, saidx_t depth) { - saidx_t *a, *b; - saidx_t t; - for(a = first - 1, b = last;;) { - for(; (++a < b) && ((PA[*a] + depth) >= (PA[*a + 1] + 1));) { *a = ~*a; } - for(; (a < --b) && ((PA[*b] + depth) < (PA[*b + 1] + 1));) { } - if(b <= a) { break; } - t = ~*b; - *b = *a; - *a = t; - } - if(first < a) { *first = ~*first; } - return a; -} - -/* Multikey introsort for medium size groups. */ -static -void -ss_mintrosort(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *last, - saidx_t depth) { -#define STACK_SIZE SS_MISORT_STACKSIZE - struct { saidx_t *a, *b, c; saint_t d; } stack[STACK_SIZE]; - const sauchar_t *Td; - saidx_t *a, *b, *c, *d, *e, *f; - saidx_t s, t; - saint_t ssize; - saint_t limit; - saint_t v, x = 0; - - for(ssize = 0, limit = ss_ilg(last - first);;) { - - if((last - first) <= SS_INSERTIONSORT_THRESHOLD) { -#if 1 < SS_INSERTIONSORT_THRESHOLD - if(1 < (last - first)) { ss_insertionsort(T, PA, first, last, depth); } -#endif - STACK_POP(first, last, depth, limit); - continue; - } - - Td = T + depth; - if(limit-- == 0) { ss_heapsort(Td, PA, first, last - first); } - if(limit < 0) { - for(a = first + 1, v = Td[PA[*first]]; a < last; ++a) { - if((x = Td[PA[*a]]) != v) { - if(1 < (a - first)) { break; } - v = x; - first = a; - } - } - if(Td[PA[*first] - 1] < v) { - first = ss_partition(PA, first, a, depth); - } - if((a - first) <= (last - a)) { - if(1 < (a - first)) { - STACK_PUSH(a, last, depth, -1); - last = a, depth += 1, limit = ss_ilg(a - first); - } else { - first = a, limit = -1; - } - } else { - if(1 < (last - a)) { - STACK_PUSH(first, a, depth + 1, ss_ilg(a - first)); - first = a, limit = -1; - } else { - last = a, depth += 1, limit = ss_ilg(a - first); - } - } - continue; - } - - /* choose pivot */ - a = ss_pivot(Td, PA, first, last); - v = Td[PA[*a]]; - SWAP(*first, *a); - - /* partition */ - for(b = first; (++b < last) && ((x = Td[PA[*b]]) == v);) { } - if(((a = b) < last) && (x < v)) { - for(; (++b < last) && ((x = Td[PA[*b]]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - } - for(c = last; (b < --c) && ((x = Td[PA[*c]]) == v);) { } - if((b < (d = c)) && (x > v)) { - for(; (b < --c) && ((x = Td[PA[*c]]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - for(; b < c;) { - SWAP(*b, *c); - for(; (++b < c) && ((x = Td[PA[*b]]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - for(; (b < --c) && ((x = Td[PA[*c]]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - - if(a <= d) { - c = b - 1; - - if((s = a - first) > (t = b - a)) { s = t; } - for(e = first, f = b - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - if((s = d - c) > (t = last - d - 1)) { s = t; } - for(e = b, f = last - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - - a = first + (b - a), c = last - (d - c); - b = (v <= Td[PA[*a] - 1]) ? a : ss_partition(PA, a, c, depth); - - if((a - first) <= (last - c)) { - if((last - c) <= (c - b)) { - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - STACK_PUSH(c, last, depth, limit); - last = a; - } else if((a - first) <= (c - b)) { - STACK_PUSH(c, last, depth, limit); - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - last = a; - } else { - STACK_PUSH(c, last, depth, limit); - STACK_PUSH(first, a, depth, limit); - first = b, last = c, depth += 1, limit = ss_ilg(c - b); - } - } else { - if((a - first) <= (c - b)) { - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - STACK_PUSH(first, a, depth, limit); - first = c; - } else if((last - c) <= (c - b)) { - STACK_PUSH(first, a, depth, limit); - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - first = c; - } else { - STACK_PUSH(first, a, depth, limit); - STACK_PUSH(c, last, depth, limit); - first = b, last = c, depth += 1, limit = ss_ilg(c - b); - } - } - } else { - limit += 1; - if(Td[PA[*first] - 1] < v) { - first = ss_partition(PA, first, last, depth); - limit = ss_ilg(last - first); - } - depth += 1; - } - } -#undef STACK_SIZE -} - -#endif /* (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) */ - - -/*---------------------------------------------------------------------------*/ - -#if SS_BLOCKSIZE != 0 - -static INLINE -void -ss_blockswap(saidx_t *a, saidx_t *b, saidx_t n) { - saidx_t t; - for(; 0 < n; --n, ++a, ++b) { - t = *a, *a = *b, *b = t; - } -} - -static INLINE -void -ss_rotate(saidx_t *first, saidx_t *middle, saidx_t *last) { - saidx_t *a, *b, t; - saidx_t l, r; - l = middle - first, r = last - middle; - for(; (0 < l) && (0 < r);) { - if(l == r) { ss_blockswap(first, middle, l); break; } - if(l < r) { - a = last - 1, b = middle - 1; - t = *a; - do { - *a-- = *b, *b-- = *a; - if(b < first) { - *a = t; - last = a; - if((r -= l + 1) <= l) { break; } - a -= 1, b = middle - 1; - t = *a; - } - } while(1); - } else { - a = first, b = middle; - t = *a; - do { - *a++ = *b, *b++ = *a; - if(last <= b) { - *a = t; - first = a + 1; - if((l -= r + 1) <= r) { break; } - a += 1, b = middle; - t = *a; - } - } while(1); - } - } -} - - -/*---------------------------------------------------------------------------*/ - -static -void -ss_inplacemerge(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *middle, saidx_t *last, - saidx_t depth) { - const saidx_t *p; - saidx_t *a, *b; - saidx_t len, half; - saint_t q, r; - saint_t x; - - for(;;) { - if(*(last - 1) < 0) { x = 1; p = PA + ~*(last - 1); } - else { x = 0; p = PA + *(last - 1); } - for(a = first, len = middle - first, half = len >> 1, r = -1; - 0 < len; - len = half, half >>= 1) { - b = a + half; - q = ss_compare(T, PA + ((0 <= *b) ? *b : ~*b), p, depth); - if(q < 0) { - a = b + 1; - half -= (len & 1) ^ 1; - } else { - r = q; - } - } - if(a < middle) { - if(r == 0) { *a = ~*a; } - ss_rotate(a, middle, last); - last -= middle - a; - middle = a; - if(first == middle) { break; } - } - --last; - if(x != 0) { while(*--last < 0) { } } - if(middle == last) { break; } - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Merge-forward with internal buffer. */ -static -void -ss_mergeforward(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *middle, saidx_t *last, - saidx_t *buf, saidx_t depth) { - saidx_t *a, *b, *c, *bufend; - saidx_t t; - saint_t r; - - bufend = buf + (middle - first) - 1; - ss_blockswap(buf, first, middle - first); - - for(t = *(a = first), b = buf, c = middle;;) { - r = ss_compare(T, PA + *b, PA + *c, depth); - if(r < 0) { - do { - *a++ = *b; - if(bufend <= b) { *bufend = t; return; } - *b++ = *a; - } while(*b < 0); - } else if(r > 0) { - do { - *a++ = *c, *c++ = *a; - if(last <= c) { - while(b < bufend) { *a++ = *b, *b++ = *a; } - *a = *b, *b = t; - return; - } - } while(*c < 0); - } else { - *c = ~*c; - do { - *a++ = *b; - if(bufend <= b) { *bufend = t; return; } - *b++ = *a; - } while(*b < 0); - - do { - *a++ = *c, *c++ = *a; - if(last <= c) { - while(b < bufend) { *a++ = *b, *b++ = *a; } - *a = *b, *b = t; - return; - } - } while(*c < 0); - } - } -} - -/* Merge-backward with internal buffer. */ -static -void -ss_mergebackward(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *middle, saidx_t *last, - saidx_t *buf, saidx_t depth) { - const saidx_t *p1, *p2; - saidx_t *a, *b, *c, *bufend; - saidx_t t; - saint_t r; - saint_t x; - - bufend = buf + (last - middle) - 1; - ss_blockswap(buf, middle, last - middle); - - x = 0; - if(*bufend < 0) { p1 = PA + ~*bufend; x |= 1; } - else { p1 = PA + *bufend; } - if(*(middle - 1) < 0) { p2 = PA + ~*(middle - 1); x |= 2; } - else { p2 = PA + *(middle - 1); } - for(t = *(a = last - 1), b = bufend, c = middle - 1;;) { - r = ss_compare(T, p1, p2, depth); - if(0 < r) { - if(x & 1) { do { *a-- = *b, *b-- = *a; } while(*b < 0); x ^= 1; } - *a-- = *b; - if(b <= buf) { *buf = t; break; } - *b-- = *a; - if(*b < 0) { p1 = PA + ~*b; x |= 1; } - else { p1 = PA + *b; } - } else if(r < 0) { - if(x & 2) { do { *a-- = *c, *c-- = *a; } while(*c < 0); x ^= 2; } - *a-- = *c, *c-- = *a; - if(c < first) { - while(buf < b) { *a-- = *b, *b-- = *a; } - *a = *b, *b = t; - break; - } - if(*c < 0) { p2 = PA + ~*c; x |= 2; } - else { p2 = PA + *c; } - } else { - if(x & 1) { do { *a-- = *b, *b-- = *a; } while(*b < 0); x ^= 1; } - *a-- = ~*b; - if(b <= buf) { *buf = t; break; } - *b-- = *a; - if(x & 2) { do { *a-- = *c, *c-- = *a; } while(*c < 0); x ^= 2; } - *a-- = *c, *c-- = *a; - if(c < first) { - while(buf < b) { *a-- = *b, *b-- = *a; } - *a = *b, *b = t; - break; - } - if(*b < 0) { p1 = PA + ~*b; x |= 1; } - else { p1 = PA + *b; } - if(*c < 0) { p2 = PA + ~*c; x |= 2; } - else { p2 = PA + *c; } - } - } -} - -/* D&C based merge. */ -static -void -ss_swapmerge(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *middle, saidx_t *last, - saidx_t *buf, saidx_t bufsize, saidx_t depth) { -#define STACK_SIZE SS_SMERGE_STACKSIZE -#define GETIDX(a) ((0 <= (a)) ? (a) : (~(a))) -#define MERGE_CHECK(a, b, c)\ - do {\ - if(((c) & 1) ||\ - (((c) & 2) && (ss_compare(T, PA + GETIDX(*((a) - 1)), PA + *(a), depth) == 0))) {\ - *(a) = ~*(a);\ - }\ - if(((c) & 4) && ((ss_compare(T, PA + GETIDX(*((b) - 1)), PA + *(b), depth) == 0))) {\ - *(b) = ~*(b);\ - }\ - } while(0) - struct { saidx_t *a, *b, *c; saint_t d; } stack[STACK_SIZE]; - saidx_t *l, *r, *lm, *rm; - saidx_t m, len, half; - saint_t ssize; - saint_t check, next; - - for(check = 0, ssize = 0;;) { - if((last - middle) <= bufsize) { - if((first < middle) && (middle < last)) { - ss_mergebackward(T, PA, first, middle, last, buf, depth); - } - MERGE_CHECK(first, last, check); - STACK_POP(first, middle, last, check); - continue; - } - - if((middle - first) <= bufsize) { - if(first < middle) { - ss_mergeforward(T, PA, first, middle, last, buf, depth); - } - MERGE_CHECK(first, last, check); - STACK_POP(first, middle, last, check); - continue; - } - - for(m = 0, len = MIN(middle - first, last - middle), half = len >> 1; - 0 < len; - len = half, half >>= 1) { - if(ss_compare(T, PA + GETIDX(*(middle + m + half)), - PA + GETIDX(*(middle - m - half - 1)), depth) < 0) { - m += half + 1; - half -= (len & 1) ^ 1; - } - } - - if(0 < m) { - lm = middle - m, rm = middle + m; - ss_blockswap(lm, middle, m); - l = r = middle, next = 0; - if(rm < last) { - if(*rm < 0) { - *rm = ~*rm; - if(first < lm) { for(; *--l < 0;) { } next |= 4; } - next |= 1; - } else if(first < lm) { - for(; *r < 0; ++r) { } - next |= 2; - } - } - - if((l - first) <= (last - r)) { - STACK_PUSH(r, rm, last, (next & 3) | (check & 4)); - middle = lm, last = l, check = (check & 3) | (next & 4); - } else { - if((next & 2) && (r == middle)) { next ^= 6; } - STACK_PUSH(first, lm, l, (check & 3) | (next & 4)); - first = r, middle = rm, check = (next & 3) | (check & 4); - } - } else { - if(ss_compare(T, PA + GETIDX(*(middle - 1)), PA + *middle, depth) == 0) { - *middle = ~*middle; - } - MERGE_CHECK(first, last, check); - STACK_POP(first, middle, last, check); - } - } -#undef STACK_SIZE -} - -#endif /* SS_BLOCKSIZE != 0 */ - - -/*---------------------------------------------------------------------------*/ - -/*- Function -*/ - -/* Substring sort */ -void -sssort(const sauchar_t *T, const saidx_t *PA, - saidx_t *first, saidx_t *last, - saidx_t *buf, saidx_t bufsize, - saidx_t depth, saidx_t n, saint_t lastsuffix) { - saidx_t *a; -#if SS_BLOCKSIZE != 0 - saidx_t *b, *middle, *curbuf; - saidx_t j, k, curbufsize, limit; -#endif - saidx_t i; - - if(lastsuffix != 0) { ++first; } - -#if SS_BLOCKSIZE == 0 - ss_mintrosort(T, PA, first, last, depth); -#else - if((bufsize < SS_BLOCKSIZE) && - (bufsize < (last - first)) && - (bufsize < (limit = ss_isqrt(last - first)))) { - if(SS_BLOCKSIZE < limit) { limit = SS_BLOCKSIZE; } - buf = middle = last - limit, bufsize = limit; - } else { - middle = last, limit = 0; - } - for(a = first, i = 0; SS_BLOCKSIZE < (middle - a); a += SS_BLOCKSIZE, ++i) { -#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE - ss_mintrosort(T, PA, a, a + SS_BLOCKSIZE, depth); -#elif 1 < SS_BLOCKSIZE - ss_insertionsort(T, PA, a, a + SS_BLOCKSIZE, depth); -#endif - curbufsize = last - (a + SS_BLOCKSIZE); - curbuf = a + SS_BLOCKSIZE; - if(curbufsize <= bufsize) { curbufsize = bufsize, curbuf = buf; } - for(b = a, k = SS_BLOCKSIZE, j = i; j & 1; b -= k, k <<= 1, j >>= 1) { - ss_swapmerge(T, PA, b - k, b, b + k, curbuf, curbufsize, depth); - } - } -#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE - ss_mintrosort(T, PA, a, middle, depth); -#elif 1 < SS_BLOCKSIZE - ss_insertionsort(T, PA, a, middle, depth); -#endif - for(k = SS_BLOCKSIZE; i != 0; k <<= 1, i >>= 1) { - if(i & 1) { - ss_swapmerge(T, PA, a - k, a, middle, buf, bufsize, depth); - a -= k; - } - } - if(limit != 0) { -#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE - ss_mintrosort(T, PA, middle, last, depth); -#elif 1 < SS_BLOCKSIZE - ss_insertionsort(T, PA, middle, last, depth); -#endif - ss_inplacemerge(T, PA, first, middle, last, depth); - } -#endif - - if(lastsuffix != 0) { - /* Insert last type B* suffix. */ - saidx_t PAi[2]; PAi[0] = PA[*(first - 1)], PAi[1] = n - 2; - for(a = first, i = *(first - 1); - (a < last) && ((*a < 0) || (0 < ss_compare(T, &(PAi[0]), PA + *a, depth))); - ++a) { - *(a - 1) = *a; - } - *(a - 1) = i; - } -} diff --git a/tools/z64compress/src/enc/apultra/trsort.c b/tools/z64compress/src/enc/apultra/trsort.c deleted file mode 100644 index 6fe3e67baa..0000000000 --- a/tools/z64compress/src/enc/apultra/trsort.c +++ /dev/null @@ -1,586 +0,0 @@ -/* - * trsort.c for libdivsufsort - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "divsufsort_private.h" - - -/*- Private Functions -*/ - -static const saint_t lg_table[256]= { - -1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 -}; - -static INLINE -saint_t -tr_ilg(saidx_t n) { -#if defined(BUILD_DIVSUFSORT64) - return (n >> 32) ? - ((n >> 48) ? - ((n >> 56) ? - 56 + lg_table[(n >> 56) & 0xff] : - 48 + lg_table[(n >> 48) & 0xff]) : - ((n >> 40) ? - 40 + lg_table[(n >> 40) & 0xff] : - 32 + lg_table[(n >> 32) & 0xff])) : - ((n & 0xffff0000) ? - ((n & 0xff000000) ? - 24 + lg_table[(n >> 24) & 0xff] : - 16 + lg_table[(n >> 16) & 0xff]) : - ((n & 0x0000ff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff])); -#else - return (n & 0xffff0000) ? - ((n & 0xff000000) ? - 24 + lg_table[(n >> 24) & 0xff] : - 16 + lg_table[(n >> 16) & 0xff]) : - ((n & 0x0000ff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff]); -#endif -} - - -/*---------------------------------------------------------------------------*/ - -/* Simple insertionsort for small size groups. */ -static -void -tr_insertionsort(const saidx_t *ISAd, saidx_t *first, saidx_t *last) { - saidx_t *a, *b; - saidx_t t, r; - - for(a = first + 1; a < last; ++a) { - for(t = *a, b = a - 1; 0 > (r = ISAd[t] - ISAd[*b]);) { - do { *(b + 1) = *b; } while((first <= --b) && (*b < 0)); - if(b < first) { break; } - } - if(r == 0) { *b = ~*b; } - *(b + 1) = t; - } -} - - -/*---------------------------------------------------------------------------*/ - -static INLINE -void -tr_fixdown(const saidx_t *ISAd, saidx_t *SA, saidx_t i, saidx_t size) { - saidx_t j, k; - saidx_t v; - saidx_t c, d, e; - - for(v = SA[i], c = ISAd[v]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { - d = ISAd[SA[k = j++]]; - if(d < (e = ISAd[SA[j]])) { k = j; d = e; } - if(d <= c) { break; } - } - SA[i] = v; -} - -/* Simple top-down heapsort. */ -static -void -tr_heapsort(const saidx_t *ISAd, saidx_t *SA, saidx_t size) { - saidx_t i, m; - saidx_t t; - - m = size; - if((size % 2) == 0) { - m--; - if(ISAd[SA[m / 2]] < ISAd[SA[m]]) { SWAP(SA[m], SA[m / 2]); } - } - - for(i = m / 2 - 1; 0 <= i; --i) { tr_fixdown(ISAd, SA, i, m); } - if((size % 2) == 0) { SWAP(SA[0], SA[m]); tr_fixdown(ISAd, SA, 0, m); } - for(i = m - 1; 0 < i; --i) { - t = SA[0], SA[0] = SA[i]; - tr_fixdown(ISAd, SA, 0, i); - SA[i] = t; - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Returns the median of three elements. */ -static INLINE -saidx_t * -tr_median3(const saidx_t *ISAd, saidx_t *v1, saidx_t *v2, saidx_t *v3) { - saidx_t *t; - if(ISAd[*v1] > ISAd[*v2]) { SWAP(v1, v2); } - if(ISAd[*v2] > ISAd[*v3]) { - if(ISAd[*v1] > ISAd[*v3]) { return v1; } - else { return v3; } - } - return v2; -} - -/* Returns the median of five elements. */ -static INLINE -saidx_t * -tr_median5(const saidx_t *ISAd, - saidx_t *v1, saidx_t *v2, saidx_t *v3, saidx_t *v4, saidx_t *v5) { - saidx_t *t; - if(ISAd[*v2] > ISAd[*v3]) { SWAP(v2, v3); } - if(ISAd[*v4] > ISAd[*v5]) { SWAP(v4, v5); } - if(ISAd[*v2] > ISAd[*v4]) { SWAP(v2, v4); SWAP(v3, v5); } - if(ISAd[*v1] > ISAd[*v3]) { SWAP(v1, v3); } - if(ISAd[*v1] > ISAd[*v4]) { SWAP(v1, v4); SWAP(v3, v5); } - if(ISAd[*v3] > ISAd[*v4]) { return v4; } - return v3; -} - -/* Returns the pivot element. */ -static INLINE -saidx_t * -tr_pivot(const saidx_t *ISAd, saidx_t *first, saidx_t *last) { - saidx_t *middle; - saidx_t t; - - t = last - first; - middle = first + t / 2; - - if(t <= 512) { - if(t <= 32) { - return tr_median3(ISAd, first, middle, last - 1); - } else { - t >>= 2; - return tr_median5(ISAd, first, first + t, middle, last - 1 - t, last - 1); - } - } - t >>= 3; - first = tr_median3(ISAd, first, first + t, first + (t << 1)); - middle = tr_median3(ISAd, middle - t, middle, middle + t); - last = tr_median3(ISAd, last - 1 - (t << 1), last - 1 - t, last - 1); - return tr_median3(ISAd, first, middle, last); -} - - -/*---------------------------------------------------------------------------*/ - -typedef struct _trbudget_t trbudget_t; -struct _trbudget_t { - saidx_t chance; - saidx_t remain; - saidx_t incval; - saidx_t count; -}; - -static INLINE -void -trbudget_init(trbudget_t *budget, saidx_t chance, saidx_t incval) { - budget->chance = chance; - budget->remain = budget->incval = incval; -} - -static INLINE -saint_t -trbudget_check(trbudget_t *budget, saidx_t size) { - if(size <= budget->remain) { budget->remain -= size; return 1; } - if(budget->chance == 0) { budget->count += size; return 0; } - budget->remain += budget->incval - size; - budget->chance -= 1; - return 1; -} - - -/*---------------------------------------------------------------------------*/ - -static INLINE -void -tr_partition(const saidx_t *ISAd, - saidx_t *first, saidx_t *middle, saidx_t *last, - saidx_t **pa, saidx_t **pb, saidx_t v) { - saidx_t *a, *b, *c, *d, *e, *f; - saidx_t t, s; - saidx_t x = 0; - - for(b = middle - 1; (++b < last) && ((x = ISAd[*b]) == v);) { } - if(((a = b) < last) && (x < v)) { - for(; (++b < last) && ((x = ISAd[*b]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - } - for(c = last; (b < --c) && ((x = ISAd[*c]) == v);) { } - if((b < (d = c)) && (x > v)) { - for(; (b < --c) && ((x = ISAd[*c]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - for(; b < c;) { - SWAP(*b, *c); - for(; (++b < c) && ((x = ISAd[*b]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - for(; (b < --c) && ((x = ISAd[*c]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - - if(a <= d) { - c = b - 1; - if((s = a - first) > (t = b - a)) { s = t; } - for(e = first, f = b - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - if((s = d - c) > (t = last - d - 1)) { s = t; } - for(e = b, f = last - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - first += (b - a), last -= (d - c); - } - *pa = first, *pb = last; -} - -static -void -tr_copy(saidx_t *ISA, const saidx_t *SA, - saidx_t *first, saidx_t *a, saidx_t *b, saidx_t *last, - saidx_t depth) { - /* sort suffixes of middle partition - by using sorted order of suffixes of left and right partition. */ - saidx_t *c, *d, *e; - saidx_t s, v; - - v = b - SA - 1; - for(c = first, d = a - 1; c <= d; ++c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *++d = s; - ISA[s] = d - SA; - } - } - for(c = last - 1, e = d + 1, d = b; e < d; --c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *--d = s; - ISA[s] = d - SA; - } - } -} - -static -void -tr_partialcopy(saidx_t *ISA, const saidx_t *SA, - saidx_t *first, saidx_t *a, saidx_t *b, saidx_t *last, - saidx_t depth) { - saidx_t *c, *d, *e; - saidx_t s, v; - saidx_t rank, lastrank, newrank = -1; - - v = b - SA - 1; - lastrank = -1; - for(c = first, d = a - 1; c <= d; ++c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *++d = s; - rank = ISA[s + depth]; - if(lastrank != rank) { lastrank = rank; newrank = d - SA; } - ISA[s] = newrank; - } - } - - lastrank = -1; - for(e = d; first <= e; --e) { - rank = ISA[*e]; - if(lastrank != rank) { lastrank = rank; newrank = e - SA; } - if(newrank != rank) { ISA[*e] = newrank; } - } - - lastrank = -1; - for(c = last - 1, e = d + 1, d = b; e < d; --c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *--d = s; - rank = ISA[s + depth]; - if(lastrank != rank) { lastrank = rank; newrank = d - SA; } - ISA[s] = newrank; - } - } -} - -static -void -tr_introsort(saidx_t *ISA, const saidx_t *ISAd, - saidx_t *SA, saidx_t *first, saidx_t *last, - trbudget_t *budget) { -#define STACK_SIZE TR_STACKSIZE - struct { const saidx_t *a; saidx_t *b, *c; saint_t d, e; }stack[STACK_SIZE]; - saidx_t *a, *b, *c; - saidx_t t; - saidx_t v, x = 0; - saidx_t incr = ISAd - ISA; - saint_t limit, next; - saint_t ssize, trlink = -1; - - for(ssize = 0, limit = tr_ilg(last - first);;) { - - if(limit < 0) { - if(limit == -1) { - /* tandem repeat partition */ - tr_partition(ISAd - incr, first, first, last, &a, &b, last - SA - 1); - - /* update ranks */ - if(a < last) { - for(c = first, v = a - SA - 1; c < a; ++c) { ISA[*c] = v; } - } - if(b < last) { - for(c = a, v = b - SA - 1; c < b; ++c) { ISA[*c] = v; } - } - - /* push */ - if(1 < (b - a)) { - STACK_PUSH5(NULL, a, b, 0, 0); - STACK_PUSH5(ISAd - incr, first, last, -2, trlink); - trlink = ssize - 2; - } - if((a - first) <= (last - b)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd, b, last, tr_ilg(last - b), trlink); - last = a, limit = tr_ilg(a - first); - } else if(1 < (last - b)) { - first = b, limit = tr_ilg(last - b); - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } else { - if(1 < (last - b)) { - STACK_PUSH5(ISAd, first, a, tr_ilg(a - first), trlink); - first = b, limit = tr_ilg(last - b); - } else if(1 < (a - first)) { - last = a, limit = tr_ilg(a - first); - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } else if(limit == -2) { - /* tandem repeat copy */ - a = stack[--ssize].b, b = stack[ssize].c; - if(stack[ssize].d == 0) { - tr_copy(ISA, SA, first, a, b, last, ISAd - ISA); - } else { - if(0 <= trlink) { stack[trlink].d = -1; } - tr_partialcopy(ISA, SA, first, a, b, last, ISAd - ISA); - } - STACK_POP5(ISAd, first, last, limit, trlink); - } else { - /* sorted partition */ - if(0 <= *first) { - a = first; - do { ISA[*a] = a - SA; } while((++a < last) && (0 <= *a)); - first = a; - } - if(first < last) { - a = first; do { *a = ~*a; } while(*++a < 0); - next = (ISA[*a] != ISAd[*a]) ? tr_ilg(a - first + 1) : -1; - if(++a < last) { for(b = first, v = a - SA - 1; b < a; ++b) { ISA[*b] = v; } } - - /* push */ - if(trbudget_check(budget, a - first)) { - if((a - first) <= (last - a)) { - STACK_PUSH5(ISAd, a, last, -3, trlink); - ISAd += incr, last = a, limit = next; - } else { - if(1 < (last - a)) { - STACK_PUSH5(ISAd + incr, first, a, next, trlink); - first = a, limit = -3; - } else { - ISAd += incr, last = a, limit = next; - } - } - } else { - if(0 <= trlink) { stack[trlink].d = -1; } - if(1 < (last - a)) { - first = a, limit = -3; - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - continue; - } - - if((last - first) <= TR_INSERTIONSORT_THRESHOLD) { - tr_insertionsort(ISAd, first, last); - limit = -3; - continue; - } - - if(limit-- == 0) { - tr_heapsort(ISAd, first, last - first); - for(a = last - 1; first < a; a = b) { - for(x = ISAd[*a], b = a - 1; (first <= b) && (ISAd[*b] == x); --b) { *b = ~*b; } - } - limit = -3; - continue; - } - - /* choose pivot */ - a = tr_pivot(ISAd, first, last); - SWAP(*first, *a); - v = ISAd[*first]; - - /* partition */ - tr_partition(ISAd, first, first + 1, last, &a, &b, v); - if((last - first) != (b - a)) { - next = (ISA[*a] != v) ? tr_ilg(b - a) : -1; - - /* update ranks */ - for(c = first, v = a - SA - 1; c < a; ++c) { ISA[*c] = v; } - if(b < last) { for(c = a, v = b - SA - 1; c < b; ++c) { ISA[*c] = v; } } - - /* push */ - if((1 < (b - a)) && (trbudget_check(budget, b - a))) { - if((a - first) <= (last - b)) { - if((last - b) <= (b - a)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - STACK_PUSH5(ISAd, b, last, limit, trlink); - last = a; - } else if(1 < (last - b)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - first = b; - } else { - ISAd += incr, first = a, last = b, limit = next; - } - } else if((a - first) <= (b - a)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd, b, last, limit, trlink); - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - last = a; - } else { - STACK_PUSH5(ISAd, b, last, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } else { - STACK_PUSH5(ISAd, b, last, limit, trlink); - STACK_PUSH5(ISAd, first, a, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } else { - if((a - first) <= (b - a)) { - if(1 < (last - b)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - STACK_PUSH5(ISAd, first, a, limit, trlink); - first = b; - } else if(1 < (a - first)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - last = a; - } else { - ISAd += incr, first = a, last = b, limit = next; - } - } else if((last - b) <= (b - a)) { - if(1 < (last - b)) { - STACK_PUSH5(ISAd, first, a, limit, trlink); - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - first = b; - } else { - STACK_PUSH5(ISAd, first, a, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } else { - STACK_PUSH5(ISAd, first, a, limit, trlink); - STACK_PUSH5(ISAd, b, last, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } - } else { - if((1 < (b - a)) && (0 <= trlink)) { stack[trlink].d = -1; } - if((a - first) <= (last - b)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd, b, last, limit, trlink); - last = a; - } else if(1 < (last - b)) { - first = b; - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } else { - if(1 < (last - b)) { - STACK_PUSH5(ISAd, first, a, limit, trlink); - first = b; - } else if(1 < (a - first)) { - last = a; - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } - } else { - if(trbudget_check(budget, last - first)) { - limit = tr_ilg(last - first), ISAd += incr; - } else { - if(0 <= trlink) { stack[trlink].d = -1; } - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } -#undef STACK_SIZE -} - - - -/*---------------------------------------------------------------------------*/ - -/*- Function -*/ - -/* Tandem repeat sort */ -void -trsort(saidx_t *ISA, saidx_t *SA, saidx_t n, saidx_t depth) { - saidx_t *ISAd; - saidx_t *first, *last; - trbudget_t budget; - saidx_t t, skip, unsorted; - - trbudget_init(&budget, tr_ilg(n) * 2 / 3, n); -/* trbudget_init(&budget, tr_ilg(n) * 3 / 4, n); */ - for(ISAd = ISA + depth; -n < *SA; ISAd += ISAd - ISA) { - first = SA; - skip = 0; - unsorted = 0; - do { - if((t = *first) < 0) { first -= t; skip += t; } - else { - if(skip != 0) { *(first + skip) = skip; skip = 0; } - last = SA + ISA[t] + 1; - if(1 < (last - first)) { - budget.count = 0; - tr_introsort(ISA, ISAd, SA, first, last, &budget); - if(budget.count != 0) { unsorted += budget.count; } - else { skip = first - last; } - } else if((last - first) == 1) { - skip = -1; - } - first = last; - } - } while(first < (SA + n)); - if(skip != 0) { *(first + skip) = skip; } - if(unsorted == 0) { break; } - } -} diff --git a/tools/z64compress/src/enc/enc.h b/tools/z64compress/src/enc/enc.h deleted file mode 100644 index 48a24757b9..0000000000 --- a/tools/z64compress/src/enc/enc.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef Z64COMPRESS_ENC_H_INCLUDED -#define Z64COMPRESS_ENC_H_INCLUDED - -int yazenc( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx -); -void *yazCtx_new(void); -void yazCtx_free(void *_ctx); -int yazdec(void *_src, void *_dst, unsigned dstSz, unsigned *srcSz); - -int lzoenc( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx -); -void *lzoCtx_new(void); -void lzoCtx_free(void *_ctx); - -int uclenc( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx -); - -int zx7enc( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx -); - -int aplenc( - void *_src - , unsigned src_sz - , void *_dst - , unsigned *dst_sz - , void *_ctx -); - -#endif /* Z64COMPRESS_ENC_H_INCLUDED */ - diff --git a/tools/z64compress/src/enc/lzo.c b/tools/z64compress/src/enc/lzo.c deleted file mode 100644 index 64f79b722b..0000000000 --- a/tools/z64compress/src/enc/lzo.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" - -void -lzoCtx_free(void *_ctx) -{ - if (!_ctx) - return; - - free(_ctx); -} - -void * -lzoCtx_new(void) -{ - return malloc(LZO1X_999_MEM_COMPRESS); -} - -int -lzoenc( - void *_src - , unsigned src_sz - , void *_dst - , unsigned *dst_sz - , void *_ctx -) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - unsigned char *wrkmem = _ctx; - lzo_uint result_sz = 0; - - int hlen = 8; /* header length; required due to MM's archives */ - memset(dst, 0, hlen); - memcpy(dst, "LZO0", 4); - dst[4] = (src_sz >> 24); - dst[5] = (src_sz >> 16); - dst[6] = (src_sz >> 8); - dst[7] = (src_sz >> 0); - - if (!wrkmem) - return 1; - - memset(wrkmem, 0, LZO1X_999_MEM_COMPRESS); - - lzo1x_999_compress(src, src_sz, dst + hlen, &result_sz, wrkmem); - - *dst_sz = result_sz + hlen; - - return 0; -} - diff --git a/tools/z64compress/src/enc/lzo/config1x.h b/tools/z64compress/src/enc/lzo/config1x.h deleted file mode 100644 index f85cb6548d..0000000000 --- a/tools/z64compress/src/enc/lzo/config1x.h +++ /dev/null @@ -1,106 +0,0 @@ -/* config1x.h -- configuration for the LZO1X algorithm - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the library and is subject - to change. - */ - - -#ifndef __LZO_CONFIG1X_H -#define __LZO_CONFIG1X_H 1 - -#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) -# define LZO1X 1 -#endif - -#include "lzo_conf.h" -#if !defined(__LZO_IN_MINILZO) -#include "lzo1x.h" -#endif - - -/*********************************************************************** -// -************************************************************************/ - -#ifndef LZO_EOF_CODE -#define LZO_EOF_CODE 1 -#endif -#undef LZO_DETERMINISTIC - -#define M1_MAX_OFFSET 0x0400 -#ifndef M2_MAX_OFFSET -#define M2_MAX_OFFSET 0x0800 -#endif -#define M3_MAX_OFFSET 0x4000 -#define M4_MAX_OFFSET 0xbfff - -#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) - -#define M1_MIN_LEN 2 -#define M1_MAX_LEN 2 -#define M2_MIN_LEN 3 -#ifndef M2_MAX_LEN -#define M2_MAX_LEN 8 -#endif -#define M3_MIN_LEN 3 -#define M3_MAX_LEN 33 -#define M4_MIN_LEN 3 -#define M4_MAX_LEN 9 - -#define M1_MARKER 0 -#define M2_MARKER 64 -#define M3_MARKER 32 -#define M4_MARKER 16 - - -/*********************************************************************** -// -************************************************************************/ - -#ifndef MIN_LOOKAHEAD -#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) -#endif - -#if defined(LZO_NEED_DICT_H) - -#ifndef LZO_HASH -#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B -#endif -#define DL_MIN_LEN M2_MIN_LEN -#include "lzo_dict.h" - -#endif - - - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1_d.ch b/tools/z64compress/src/enc/lzo/lzo1_d.ch deleted file mode 100644 index bedc7ce8c4..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1_d.ch +++ /dev/null @@ -1,156 +0,0 @@ -/* lzo1_d.ch -- common decompression stuff - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - - -#if defined(LZO_TEST_OVERRUN) -# if !defined(LZO_TEST_OVERRUN_INPUT) -# define LZO_TEST_OVERRUN_INPUT 2 -# endif -# if !defined(LZO_TEST_OVERRUN_OUTPUT) -# define LZO_TEST_OVERRUN_OUTPUT 2 -# endif -# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) -# define LZO_TEST_OVERRUN_LOOKBEHIND 1 -# endif -#endif - - -/*********************************************************************** -// Overrun detection is internally handled by these macros: -// -// TEST_IP test input overrun at loop begin -// NEED_IP test input overrun at every input byte -// -// TEST_OP test output overrun at loop begin -// NEED_OP test output overrun at every output byte -// -// TEST_LB test match position -// -// The fastest decompressor results when testing for no overruns -// and using LZO_EOF_CODE. -************************************************************************/ - -#undef TEST_IP -#undef TEST_OP -#undef TEST_IP_AND_TEST_OP -#undef TEST_LB -#undef TEST_LBO -#undef NEED_IP -#undef NEED_OP -#undef TEST_IV -#undef TEST_OV -#undef HAVE_TEST_IP -#undef HAVE_TEST_OP -#undef HAVE_NEED_IP -#undef HAVE_NEED_OP -#undef HAVE_ANY_IP -#undef HAVE_ANY_OP - - -#if defined(LZO_TEST_OVERRUN_INPUT) -# if (LZO_TEST_OVERRUN_INPUT >= 1) -# define TEST_IP (ip < ip_end) -# endif -# if (LZO_TEST_OVERRUN_INPUT >= 2) -# define NEED_IP(x) \ - if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun -# define TEST_IV(x) if ((x) > (lzo_uint)0 - (511)) goto input_overrun -# endif -#endif - -#if defined(LZO_TEST_OVERRUN_OUTPUT) -# if (LZO_TEST_OVERRUN_OUTPUT >= 1) -# define TEST_OP (op <= op_end) -# endif -# if (LZO_TEST_OVERRUN_OUTPUT >= 2) -# undef TEST_OP /* don't need both of the tests here */ -# define NEED_OP(x) \ - if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun -# define TEST_OV(x) if ((x) > (lzo_uint)0 - (511)) goto output_overrun -# endif -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -# define TEST_LB(m_pos) if (PTR_LT(m_pos,out) || PTR_GE(m_pos,op)) goto lookbehind_overrun -# define TEST_LBO(m_pos,o) if (PTR_LT(m_pos,out) || PTR_GE(m_pos,op-(o))) goto lookbehind_overrun -#else -# define TEST_LB(m_pos) ((void) 0) -# define TEST_LBO(m_pos,o) ((void) 0) -#endif - - -#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) - /* if we have no EOF code, we have to test for the end of the input */ -# define TEST_IP (ip < ip_end) -#endif - - -#if defined(TEST_IP) -# define HAVE_TEST_IP 1 -#else -# define TEST_IP 1 -#endif -#if defined(TEST_OP) -# define HAVE_TEST_OP 1 -#else -# define TEST_OP 1 -#endif - -#if defined(HAVE_TEST_IP) && defined(HAVE_TEST_OP) -# define TEST_IP_AND_TEST_OP (TEST_IP && TEST_OP) -#elif defined(HAVE_TEST_IP) -# define TEST_IP_AND_TEST_OP TEST_IP -#elif defined(HAVE_TEST_OP) -# define TEST_IP_AND_TEST_OP TEST_OP -#else -# define TEST_IP_AND_TEST_OP 1 -#endif - -#if defined(NEED_IP) -# define HAVE_NEED_IP 1 -#else -# define NEED_IP(x) ((void) 0) -# define TEST_IV(x) ((void) 0) -#endif -#if defined(NEED_OP) -# define HAVE_NEED_OP 1 -#else -# define NEED_OP(x) ((void) 0) -# define TEST_OV(x) ((void) 0) -#endif - - -#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) -# define HAVE_ANY_IP 1 -#endif -#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) -# define HAVE_ANY_OP 1 -#endif - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x.h b/tools/z64compress/src/enc/lzo/lzo1x.h deleted file mode 100644 index a111514072..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x.h +++ /dev/null @@ -1,165 +0,0 @@ -/* lzo1x.h -- public interface of the LZO1X compression algorithm - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZO1X_H_INCLUDED -#define __LZO1X_H_INCLUDED 1 - -#ifndef __LZOCONF_H_INCLUDED -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/*********************************************************************** -// -************************************************************************/ - -/* Memory required for the wrkmem parameter. - * When the required size is 0, you can also pass a NULL pointer. - */ - -#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS -#define LZO1X_MEM_DECOMPRESS (0) -#define LZO1X_MEM_OPTIMIZE (0) - - -/* decompression */ -LZO_EXTERN(int) -lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); - -/* safe decompression with overrun testing */ -LZO_EXTERN(int) -lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); - - -/*********************************************************************** -// -************************************************************************/ - -#define LZO1X_1_MEM_COMPRESS ((lzo_uint32_t) (16384L * lzo_sizeof_dict_t)) - -LZO_EXTERN(int) -lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - - -/*********************************************************************** -// special compressor versions -************************************************************************/ - -/* this version needs only 8 KiB work memory */ -#define LZO1X_1_11_MEM_COMPRESS ((lzo_uint32_t) (2048L * lzo_sizeof_dict_t)) - -LZO_EXTERN(int) -lzo1x_1_11_compress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - - -/* this version needs 16 KiB work memory */ -#define LZO1X_1_12_MEM_COMPRESS ((lzo_uint32_t) (4096L * lzo_sizeof_dict_t)) - -LZO_EXTERN(int) -lzo1x_1_12_compress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - - -/* use this version if you need a little more compression speed */ -#define LZO1X_1_15_MEM_COMPRESS ((lzo_uint32_t) (32768L * lzo_sizeof_dict_t)) - -LZO_EXTERN(int) -lzo1x_1_15_compress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - - -/*********************************************************************** -// better compression ratio at the cost of more memory and time -************************************************************************/ - -#define LZO1X_999_MEM_COMPRESS ((lzo_uint32_t) (14 * 16384L * sizeof(short))) - -LZO_EXTERN(int) -lzo1x_999_compress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - - -/*********************************************************************** -// -************************************************************************/ - -LZO_EXTERN(int) -lzo1x_999_compress_dict ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); - -LZO_EXTERN(int) -lzo1x_999_compress_level ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len, - lzo_callback_p cb, - int compression_level ); - -LZO_EXTERN(int) -lzo1x_decompress_dict_safe ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */, - const lzo_bytep dict, lzo_uint dict_len ); - - -/*********************************************************************** -// optimize a compressed data block -************************************************************************/ - -LZO_EXTERN(int) -lzo1x_optimize ( lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_1.c b/tools/z64compress/src/enc/lzo/lzo1x_1.c deleted file mode 100644 index a659393f28..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_1.c +++ /dev/null @@ -1,57 +0,0 @@ -/* lzo1x_1.c -- LZO1X-1 compression - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "lzo_conf.h" -#if 1 && defined(UA_GET_LE32) -#undef LZO_DICT_USE_PTR -#define LZO_DICT_USE_PTR 0 -#undef lzo_dict_t -#define lzo_dict_t lzo_uint16_t -#endif - -#define LZO_NEED_DICT_H 1 -#ifndef D_BITS -#define D_BITS 14 -#endif -#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) -#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) -#if 1 -#define DINDEX(dv,p) DM(((DMUL(0x1824429d,dv)) >> (32-D_BITS))) -#else -#define DINDEX(dv,p) DM((dv) + ((dv) >> (32-D_BITS))) -#endif -#include "config1x.h" -#define LZO_DETERMINISTIC !(LZO_DICT_USE_PTR) - -#ifndef DO_COMPRESS -#define DO_COMPRESS lzo1x_1_compress -#endif - -#include "lzo1x_c.ch" - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_9x.c b/tools/z64compress/src/enc/lzo/lzo1x_9x.c deleted file mode 100644 index 39a211e54d..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_9x.c +++ /dev/null @@ -1,867 +0,0 @@ -/* lzo1x_9x.c -- implementation of the LZO1X-999 compression algorithm - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) -# define LZO1X 1 -#endif - -#if defined(LZO1X) -# include "config1x.h" -#elif defined(LZO1Y) -# include "config1y.h" -#elif defined(LZO1Z) -# include "config1z.h" -#else -# error -#endif - - -/*********************************************************************** -// -************************************************************************/ - -#define SWD_N M4_MAX_OFFSET /* size of ring buffer */ -#define SWD_THRESHOLD 1 /* lower limit for match length */ -#define SWD_F 2048 /* upper limit for match length */ - -#define SWD_BEST_OFF (LZO_MAX3( M2_MAX_LEN, M3_MAX_LEN, M4_MAX_LEN ) + 1) - -#if defined(LZO1X) -# define LZO_COMPRESS_T lzo1x_999_t -# define lzo_swd_t lzo1x_999_swd_t -#elif defined(LZO1Y) -# define LZO_COMPRESS_T lzo1y_999_t -# define lzo_swd_t lzo1y_999_swd_t -# define lzo1x_999_compress_internal lzo1y_999_compress_internal -# define lzo1x_999_compress_dict lzo1y_999_compress_dict -# define lzo1x_999_compress_level lzo1y_999_compress_level -# define lzo1x_999_compress lzo1y_999_compress -#elif defined(LZO1Z) -# define LZO_COMPRESS_T lzo1z_999_t -# define lzo_swd_t lzo1z_999_swd_t -# define lzo1x_999_compress_internal lzo1z_999_compress_internal -# define lzo1x_999_compress_dict lzo1z_999_compress_dict -# define lzo1x_999_compress_level lzo1z_999_compress_level -# define lzo1x_999_compress lzo1z_999_compress -#else -# error -#endif - -#if 0 -# define HEAD3(b,p) \ - ((((((lzo_xint)b[p]<<3)^b[p+1])<<3)^b[p+2]) & (SWD_HSIZE-1)) -#endif -#if 0 && (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -# define HEAD3(b,p) \ - (((* (lzo_uint32_tp) &b[p]) ^ ((* (lzo_uint32_tp) &b[p])>>10)) & (SWD_HSIZE-1)) -#endif - -#include "lzo_mchw.ch" - - -/* this is a public functions, but there is no prototype in a header file */ -LZO_EXTERN(int) -lzo1x_999_compress_internal ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len, - lzo_callback_p cb, - int try_lazy_parm, - lzo_uint good_length, - lzo_uint max_lazy, - lzo_uint nice_length, - lzo_uint max_chain, - lzo_uint32_t flags ); - - -/*********************************************************************** -// -************************************************************************/ - -static lzo_bytep -code_match ( LZO_COMPRESS_T *c, lzo_bytep op, lzo_uint m_len, lzo_uint m_off ) -{ - lzo_uint x_len = m_len; - lzo_uint x_off = m_off; - - c->match_bytes += m_len; - -#if 0 -/* - static lzo_uint last_m_len = 0, last_m_off = 0; - static lzo_uint prev_m_off[4]; - static unsigned prev_m_off_ptr = 0; - unsigned i; - - //if (m_len >= 3 && m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) - if (m_len >= 3 && m_len <= M2_MAX_LEN) - { - //if (m_len == last_m_len && m_off == last_m_off) - //printf("last_m_len + last_m_off\n"); - //else - if (m_off == last_m_off) - printf("last_m_off\n"); - else - { - for (i = 0; i < 4; i++) - if (m_off == prev_m_off[i]) - printf("prev_m_off %u: %5ld\n",i,(long)m_off); - } - } - last_m_len = m_len; - last_m_off = prev_m_off[prev_m_off_ptr] = m_off; - prev_m_off_ptr = (prev_m_off_ptr + 1) & 3; -*/ -#endif - - assert(op > c->out); - if (m_len == 2) - { - assert(m_off <= M1_MAX_OFFSET); - assert(c->r1_lit > 0); assert(c->r1_lit < 4); - m_off -= 1; -#if defined(LZO1Z) - *op++ = LZO_BYTE(M1_MARKER | (m_off >> 6)); - *op++ = LZO_BYTE(m_off << 2); -#else - *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); - *op++ = LZO_BYTE(m_off >> 2); -#endif - c->m1a_m++; - } -#if defined(LZO1Z) - else if (m_len <= M2_MAX_LEN && (m_off <= M2_MAX_OFFSET || m_off == c->last_m_off)) -#else - else if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) -#endif - { - assert(m_len >= 3); -#if defined(LZO1X) - m_off -= 1; - *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); - *op++ = LZO_BYTE(m_off >> 3); - assert(op[-2] >= M2_MARKER); -#elif defined(LZO1Y) - m_off -= 1; - *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); - *op++ = LZO_BYTE(m_off >> 2); - assert(op[-2] >= M2_MARKER); -#elif defined(LZO1Z) - if (m_off == c->last_m_off) - *op++ = LZO_BYTE(((m_len - 1) << 5) | (0x700 >> 6)); - else - { - m_off -= 1; - *op++ = LZO_BYTE(((m_len - 1) << 5) | (m_off >> 6)); - *op++ = LZO_BYTE(m_off << 2); - } -#endif - c->m2_m++; - } - else if (m_len == M2_MIN_LEN && m_off <= MX_MAX_OFFSET && c->r1_lit >= 4) - { - assert(m_len == 3); - assert(m_off > M2_MAX_OFFSET); - m_off -= 1 + M2_MAX_OFFSET; -#if defined(LZO1Z) - *op++ = LZO_BYTE(M1_MARKER | (m_off >> 6)); - *op++ = LZO_BYTE(m_off << 2); -#else - *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); - *op++ = LZO_BYTE(m_off >> 2); -#endif - c->m1b_m++; - } - else if (m_off <= M3_MAX_OFFSET) - { - assert(m_len >= 3); - m_off -= 1; - if (m_len <= M3_MAX_LEN) - *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); - else - { - m_len -= M3_MAX_LEN; - *op++ = M3_MARKER | 0; - while (m_len > 255) - { - m_len -= 255; - *op++ = 0; - } - assert(m_len > 0); - *op++ = LZO_BYTE(m_len); - } -#if defined(LZO1Z) - *op++ = LZO_BYTE(m_off >> 6); - *op++ = LZO_BYTE(m_off << 2); -#else - *op++ = LZO_BYTE(m_off << 2); - *op++ = LZO_BYTE(m_off >> 6); -#endif - c->m3_m++; - } - else - { - lzo_uint k; - - assert(m_len >= 3); - assert(m_off > 0x4000); assert(m_off <= 0xbfff); - m_off -= 0x4000; - k = (m_off & 0x4000) >> 11; - if (m_len <= M4_MAX_LEN) - *op++ = LZO_BYTE(M4_MARKER | k | (m_len - 2)); - else - { - m_len -= M4_MAX_LEN; - *op++ = LZO_BYTE(M4_MARKER | k | 0); - while (m_len > 255) - { - m_len -= 255; - *op++ = 0; - } - assert(m_len > 0); - *op++ = LZO_BYTE(m_len); - } -#if defined(LZO1Z) - *op++ = LZO_BYTE(m_off >> 6); - *op++ = LZO_BYTE(m_off << 2); -#else - *op++ = LZO_BYTE(m_off << 2); - *op++ = LZO_BYTE(m_off >> 6); -#endif - c->m4_m++; - } - - c->last_m_len = x_len; - c->last_m_off = x_off; - return op; -} - - -static lzo_bytep -STORE_RUN ( LZO_COMPRESS_T *c, lzo_bytep op, const lzo_bytep ii, lzo_uint t ) -{ - c->lit_bytes += t; - - if (op == c->out && t <= 238) - { - *op++ = LZO_BYTE(17 + t); - } - else if (t <= 3) - { -#if defined(LZO1Z) - op[-1] = LZO_BYTE(op[-1] | t); -#else - op[-2] = LZO_BYTE(op[-2] | t); -#endif - c->lit1_r++; - } - else if (t <= 18) - { - *op++ = LZO_BYTE(t - 3); - c->lit2_r++; - } - else - { - lzo_uint tt = t - 18; - - *op++ = 0; - while (tt > 255) - { - tt -= 255; - *op++ = 0; - } - assert(tt > 0); - *op++ = LZO_BYTE(tt); - c->lit3_r++; - } - do *op++ = *ii++; while (--t > 0); - - return op; -} - - -static lzo_bytep -code_run ( LZO_COMPRESS_T *c, lzo_bytep op, const lzo_bytep ii, - lzo_uint lit, lzo_uint m_len ) -{ - if (lit > 0) - { - assert(m_len >= 2); - op = STORE_RUN(c,op,ii,lit); - c->r1_m_len = m_len; - c->r1_lit = lit; - } - else - { - assert(m_len >= 3); - c->r1_m_len = 0; - c->r1_lit = 0; - } - - return op; -} - - -/*********************************************************************** -// -************************************************************************/ - -static lzo_uint -len_of_coded_match ( lzo_uint m_len, lzo_uint m_off, lzo_uint lit ) -{ - lzo_uint n = 4; - - if (m_len < 2) - return 0; - if (m_len == 2) - return (m_off <= M1_MAX_OFFSET && lit > 0 && lit < 4) ? 2 : 0; - if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) - return 2; - if (m_len == M2_MIN_LEN && m_off <= MX_MAX_OFFSET && lit >= 4) - return 2; - if (m_off <= M3_MAX_OFFSET) - { - if (m_len <= M3_MAX_LEN) - return 3; - m_len -= M3_MAX_LEN; - while (m_len > 255) - { - m_len -= 255; - n++; - } - return n; - } - if (m_off <= M4_MAX_OFFSET) - { - if (m_len <= M4_MAX_LEN) - return 3; - m_len -= M4_MAX_LEN; - while (m_len > 255) - { - m_len -= 255; - n++; - } - return n; - } - return 0; -} - - -static lzo_uint -min_gain(lzo_uint ahead, lzo_uint lit1, lzo_uint lit2, lzo_uint l1, lzo_uint l2, lzo_uint l3) -{ - lzo_uint lazy_match_min_gain; - - assert (ahead >= 1); - lazy_match_min_gain = ahead; - -#if 0 - if (l3) - lit2 -= ahead; -#endif - - if (lit1 <= 3) - lazy_match_min_gain += (lit2 <= 3) ? 0 : 2; - else if (lit1 <= 18) - lazy_match_min_gain += (lit2 <= 18) ? 0 : 1; - - lazy_match_min_gain += (l2 - l1) * 2; - if (l3) - lazy_match_min_gain -= (ahead - l3) * 2; - - if ((lzo_int) lazy_match_min_gain < 0) - lazy_match_min_gain = 0; - -#if 0 - if (l1 == 2) - if (lazy_match_min_gain == 0) - lazy_match_min_gain = 1; -#endif - - return lazy_match_min_gain; -} - - -/*********************************************************************** -// -************************************************************************/ - -#if !defined(NDEBUG) -static -void assert_match( const lzo_swd_p swd, lzo_uint m_len, lzo_uint m_off ) -{ - const LZO_COMPRESS_T *c = swd->c; - lzo_uint d_off; - - assert(m_len >= 2); - if (m_off <= (lzo_uint) (c->bp - c->in)) - { - assert(c->bp - m_off + m_len < c->ip); - assert(lzo_memcmp(c->bp, c->bp - m_off, m_len) == 0); - } - else - { - assert(swd->dict != NULL); - d_off = m_off - (lzo_uint) (c->bp - c->in); - assert(d_off <= swd->dict_len); - if (m_len > d_off) - { - assert(lzo_memcmp(c->bp, swd->dict_end - d_off, d_off) == 0); - assert(c->in + m_len - d_off < c->ip); - assert(lzo_memcmp(c->bp + d_off, c->in, m_len - d_off) == 0); - } - else - { - assert(lzo_memcmp(c->bp, swd->dict_end - d_off, m_len) == 0); - } - } -} -#else -# define assert_match(a,b,c) ((void)0) -#endif - - -#if defined(SWD_BEST_OFF) - -static void -better_match ( const lzo_swd_p swd, lzo_uint *m_len, lzo_uint *m_off ) -{ -#if defined(LZO1Z) - const LZO_COMPRESS_T *c = swd->c; -#endif - - if (*m_len <= M2_MIN_LEN) - return; -#if defined(LZO1Z) - if (*m_off == c->last_m_off && *m_len <= M2_MAX_LEN) - return; -#if 1 - if (*m_len >= M2_MIN_LEN + 1 && *m_len <= M2_MAX_LEN + 1 && - c->last_m_off && swd->best_off[*m_len-1] == c->last_m_off) - { - *m_len = *m_len - 1; - *m_off = swd->best_off[*m_len]; - return; - } -#endif -#endif - - if (*m_off <= M2_MAX_OFFSET) - return; - -#if 1 - /* M3/M4 -> M2 */ - if (*m_off > M2_MAX_OFFSET && - *m_len >= M2_MIN_LEN + 1 && *m_len <= M2_MAX_LEN + 1 && - swd->best_off[*m_len-1] && swd->best_off[*m_len-1] <= M2_MAX_OFFSET) - { - *m_len = *m_len - 1; - *m_off = swd->best_off[*m_len]; - return; - } -#endif - -#if 1 - /* M4 -> M2 */ - if (*m_off > M3_MAX_OFFSET && - *m_len >= M4_MAX_LEN + 1 && *m_len <= M2_MAX_LEN + 2 && - swd->best_off[*m_len-2] && swd->best_off[*m_len-2] <= M2_MAX_OFFSET) - { - *m_len = *m_len - 2; - *m_off = swd->best_off[*m_len]; - return; - } -#endif - -#if 1 - /* M4 -> M3 */ - if (*m_off > M3_MAX_OFFSET && - *m_len >= M4_MAX_LEN + 1 && *m_len <= M3_MAX_LEN + 1 && - swd->best_off[*m_len-1] && swd->best_off[*m_len-1] <= M3_MAX_OFFSET) - { - *m_len = *m_len - 1; - *m_off = swd->best_off[*m_len]; - } -#endif -} - -#endif - - -/*********************************************************************** -// -************************************************************************/ - -LZO_PUBLIC(int) -lzo1x_999_compress_internal ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len, - lzo_callback_p cb, - int try_lazy_parm, - lzo_uint good_length, - lzo_uint max_lazy, - lzo_uint nice_length, - lzo_uint max_chain, - lzo_uint32_t flags ) -{ - lzo_bytep op; - const lzo_bytep ii; - lzo_uint lit; - lzo_uint m_len, m_off; - LZO_COMPRESS_T cc; - LZO_COMPRESS_T * const c = &cc; - lzo_swd_p const swd = (lzo_swd_p) wrkmem; - lzo_uint try_lazy; - int r; - - /* sanity check */ -#if defined(LZO1X) - LZO_COMPILE_TIME_ASSERT(LZO1X_999_MEM_COMPRESS >= SIZEOF_LZO_SWD_T) -#elif defined(LZO1Y) - LZO_COMPILE_TIME_ASSERT(LZO1Y_999_MEM_COMPRESS >= SIZEOF_LZO_SWD_T) -#elif defined(LZO1Z) - LZO_COMPILE_TIME_ASSERT(LZO1Z_999_MEM_COMPRESS >= SIZEOF_LZO_SWD_T) -#else -# error -#endif - -/* setup parameter defaults */ - /* number of lazy match tries */ - try_lazy = (lzo_uint) try_lazy_parm; - if (try_lazy_parm < 0) - try_lazy = 1; - /* reduce lazy match search if we already have a match with this length */ - if (good_length == 0) - good_length = 32; - /* do not try a lazy match if we already have a match with this length */ - if (max_lazy == 0) - max_lazy = 32; - /* stop searching for longer matches than this one */ - if (nice_length == 0) - nice_length = 0; - /* don't search more positions than this */ - if (max_chain == 0) - max_chain = SWD_MAX_CHAIN; - - c->init = 0; - c->ip = c->in = in; - c->in_end = in + in_len; - c->out = out; - c->cb = cb; - c->m1a_m = c->m1b_m = c->m2_m = c->m3_m = c->m4_m = 0; - c->lit1_r = c->lit2_r = c->lit3_r = 0; - - op = out; - ii = c->ip; /* point to start of literal run */ - lit = 0; - c->r1_lit = c->r1_m_len = 0; - - r = init_match(c,swd,dict,dict_len,flags); - if (r != 0) - return r; - if (max_chain > 0) - swd->max_chain = max_chain; - if (nice_length > 0) - swd->nice_length = nice_length; - - r = find_match(c,swd,0,0); - if (r != 0) - return r; - while (c->look > 0) - { - lzo_uint ahead; - lzo_uint max_ahead; - lzo_uint l1, l2, l3; - - c->codesize = pd(op, out); - - m_len = c->m_len; - m_off = c->m_off; - - assert(c->bp == c->ip - c->look); - assert(c->bp >= in); - if (lit == 0) - ii = c->bp; - assert(ii + lit == c->bp); - assert(swd->b_char == *(c->bp)); - - if ( m_len < 2 || - (m_len == 2 && (m_off > M1_MAX_OFFSET || lit == 0 || lit >= 4)) || -#if 1 - /* Do not accept this match for compressed-data compatibility - * with LZO v1.01 and before - * [ might be a problem for decompress() and optimize() ] - */ - (m_len == 2 && op == out) || -#endif - (op == out && lit == 0)) - { - /* a literal */ - m_len = 0; - } - else if (m_len == M2_MIN_LEN) - { - /* compression ratio improves if we code a literal in some cases */ - if (m_off > MX_MAX_OFFSET && lit >= 4) - m_len = 0; - } - - if (m_len == 0) - { - /* a literal */ - lit++; - swd->max_chain = max_chain; - r = find_match(c,swd,1,0); - assert(r == 0); LZO_UNUSED(r); - continue; - } - - /* a match */ -#if defined(SWD_BEST_OFF) - if (swd->use_best_off) - better_match(swd,&m_len,&m_off); -#endif - assert_match(swd,m_len,m_off); - - - /* shall we try a lazy match ? */ - ahead = 0; - if (try_lazy == 0 || m_len >= max_lazy) - { - /* no */ - l1 = 0; - max_ahead = 0; - } - else - { - /* yes, try a lazy match */ - l1 = len_of_coded_match(m_len,m_off,lit); - assert(l1 > 0); -#if 1 - max_ahead = LZO_MIN(try_lazy, l1 - 1); -#else - max_ahead = LZO_MIN3(try_lazy, l1, m_len - 1); -#endif - } - - - while (ahead < max_ahead && c->look > m_len) - { - lzo_uint lazy_match_min_gain; - - if (m_len >= good_length) - swd->max_chain = max_chain >> 2; - else - swd->max_chain = max_chain; - r = find_match(c,swd,1,0); - ahead++; - - assert(r == 0); LZO_UNUSED(r); - assert(c->look > 0); - assert(ii + lit + ahead == c->bp); - -#if defined(LZO1Z) - if (m_off == c->last_m_off && c->m_off != c->last_m_off) - if (m_len >= M2_MIN_LEN && m_len <= M2_MAX_LEN) - c->m_len = 0; -#endif - if (c->m_len < m_len) - continue; -#if 1 - if (c->m_len == m_len && c->m_off >= m_off) - continue; -#endif -#if defined(SWD_BEST_OFF) - if (swd->use_best_off) - better_match(swd,&c->m_len,&c->m_off); -#endif - l2 = len_of_coded_match(c->m_len,c->m_off,lit+ahead); - if (l2 == 0) - continue; -#if 0 - if (c->m_len == m_len && l2 >= l1) - continue; -#endif - - -#if 1 - /* compressed-data compatibility [see above] */ - l3 = (op == out) ? 0 : len_of_coded_match(ahead,m_off,lit); -#else - l3 = len_of_coded_match(ahead,m_off,lit); -#endif - - lazy_match_min_gain = min_gain(ahead,lit,lit+ahead,l1,l2,l3); - if (c->m_len >= m_len + lazy_match_min_gain) - { - c->lazy++; - assert_match(swd,c->m_len,c->m_off); - - if (l3) - { - /* code previous run */ - op = code_run(c,op,ii,lit,ahead); - lit = 0; - /* code shortened match */ - op = code_match(c,op,ahead,m_off); - } - else - { - lit += ahead; - assert(ii + lit == c->bp); - } - goto lazy_match_done; - } - } - - - assert(ii + lit + ahead == c->bp); - - /* 1 - code run */ - op = code_run(c,op,ii,lit,m_len); - lit = 0; - - /* 2 - code match */ - op = code_match(c,op,m_len,m_off); - swd->max_chain = max_chain; - r = find_match(c,swd,m_len,1+ahead); - assert(r == 0); LZO_UNUSED(r); - -lazy_match_done: ; - } - - - /* store final run */ - if (lit > 0) - op = STORE_RUN(c,op,ii,lit); - -#if defined(LZO_EOF_CODE) - *op++ = M4_MARKER | 1; - *op++ = 0; - *op++ = 0; -#endif - - c->codesize = pd(op, out); - assert(c->textsize == in_len); - - *out_len = pd(op, out); - - if (c->cb && c->cb->nprogress) - (*c->cb->nprogress)(c->cb, c->textsize, c->codesize, 0); - -#if 0 - printf("%ld %ld -> %ld %ld: %ld %ld %ld %ld %ld %ld: %ld %ld %ld %ld\n", - (long) c->textsize, (long) in_len, (long) c->codesize, - c->match_bytes, c->m1a_m, c->m1b_m, c->m2_m, c->m3_m, c->m4_m, - c->lit_bytes, c->lit1_r, c->lit2_r, c->lit3_r, c->lazy); -#endif - assert(c->lit_bytes + c->match_bytes == in_len); - - return LZO_E_OK; -} - - -/*********************************************************************** -// -************************************************************************/ - -LZO_PUBLIC(int) -lzo1x_999_compress_level ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len, - lzo_callback_p cb, - int compression_level ) -{ - static const struct - { - int try_lazy_parm; - lzo_uint good_length; - lzo_uint max_lazy; - lzo_uint nice_length; - lzo_uint max_chain; - lzo_uint32_t flags; - } c[9] = { - /* faster compression */ - { 0, 0, 0, 8, 4, 0 }, - { 0, 0, 0, 16, 8, 0 }, - { 0, 0, 0, 32, 16, 0 }, - { 1, 4, 4, 16, 16, 0 }, - { 1, 8, 16, 32, 32, 0 }, - { 1, 8, 16, 128, 128, 0 }, - { 2, 8, 32, 128, 256, 0 }, - { 2, 32, 128, SWD_F, 2048, 1 }, - { 2, SWD_F, SWD_F, SWD_F, 4096, 1 } - /* max. compression */ - }; - - if (compression_level < 1 || compression_level > 9) - return LZO_E_ERROR; - - compression_level -= 1; - return lzo1x_999_compress_internal(in, in_len, out, out_len, wrkmem, - dict, dict_len, cb, - c[compression_level].try_lazy_parm, - c[compression_level].good_length, - c[compression_level].max_lazy, -#if 0 - c[compression_level].nice_length, -#else - 0, -#endif - c[compression_level].max_chain, - c[compression_level].flags); -} - - -/*********************************************************************** -// -************************************************************************/ - -LZO_PUBLIC(int) -lzo1x_999_compress_dict ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ) -{ - return lzo1x_999_compress_level(in, in_len, out, out_len, wrkmem, - dict, dict_len, 0, 8); -} - -LZO_PUBLIC(int) -lzo1x_999_compress ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem ) -{ - return lzo1x_999_compress_level(in, in_len, out, out_len, wrkmem, - NULL, 0, (lzo_callback_p) 0, 9/*ootntsc10: 9 saves 2580 bytes over 8*/); -} - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_c.ch b/tools/z64compress/src/enc/lzo/lzo1x_c.ch deleted file mode 100644 index be19b2b741..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_c.ch +++ /dev/null @@ -1,403 +0,0 @@ -/* lzo1x_c.ch -- implementation of the LZO1[XY]-1 compression algorithm - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - - -#if 1 && defined(DO_COMPRESS) && !defined(do_compress) - /* choose a unique name to better help PGO optimizations */ -# define do_compress LZO_PP_ECONCAT2(DO_COMPRESS,_core) -#endif - - -/*********************************************************************** -// compress a block of data. -************************************************************************/ - -static __lzo_noinline lzo_uint -do_compress ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_uint ti, lzo_voidp wrkmem) -{ - const lzo_bytep ip; - lzo_bytep op; - const lzo_bytep const in_end = in + in_len; - const lzo_bytep const ip_end = in + in_len - 20; - const lzo_bytep ii; - lzo_dict_p const dict = (lzo_dict_p) wrkmem; - - op = out; - ip = in; - ii = ip; - - ip += ti < 4 ? 4 - ti : 0; - for (;;) - { - const lzo_bytep m_pos; -#if !(LZO_DETERMINISTIC) - LZO_DEFINE_UNINITIALIZED_VAR(lzo_uint, m_off, 0); - lzo_uint m_len; - lzo_uint dindex; -next: - if __lzo_unlikely(ip >= ip_end) - break; - DINDEX1(dindex,ip); - GINDEX(m_pos,m_off,dict,dindex,in); - if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) - goto literal; -#if 1 - if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) - goto try_match; - DINDEX2(dindex,ip); -#endif - GINDEX(m_pos,m_off,dict,dindex,in); - if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) - goto literal; - if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) - goto try_match; - goto literal; - -try_match: -#if (LZO_OPT_UNALIGNED32) - if (UA_GET_NE32(m_pos) != UA_GET_NE32(ip)) -#else - if (m_pos[0] != ip[0] || m_pos[1] != ip[1] || m_pos[2] != ip[2] || m_pos[3] != ip[3]) -#endif - { - /* a literal */ -literal: - UPDATE_I(dict,0,dindex,ip,in); - ip += 1 + ((ip - ii) >> 5); - continue; - } -/*match:*/ - UPDATE_I(dict,0,dindex,ip,in); -#else - lzo_uint m_off; - lzo_uint m_len; - { - lzo_uint32_t dv; - lzo_uint dindex; -literal: - ip += 1 + ((ip - ii) >> 5); -next: - if __lzo_unlikely(ip >= ip_end) - break; - dv = UA_GET_LE32(ip); - dindex = DINDEX(dv,ip); - GINDEX(m_off,m_pos,in+dict,dindex,in); - UPDATE_I(dict,0,dindex,ip,in); - if __lzo_unlikely(dv != UA_GET_LE32(m_pos)) - goto literal; - } -#endif - - /* a match */ - - ii -= ti; ti = 0; - { - lzo_uint t = pd(ip,ii); - if (t != 0) - { - if (t <= 3) - { - op[-2] = LZO_BYTE(op[-2] | t); -#if (LZO_OPT_UNALIGNED32) - UA_COPY4(op, ii); - op += t; -#else - { do *op++ = *ii++; while (--t > 0); } -#endif - } -#if (LZO_OPT_UNALIGNED32) || (LZO_OPT_UNALIGNED64) - else if (t <= 16) - { - *op++ = LZO_BYTE(t - 3); - UA_COPY8(op, ii); - UA_COPY8(op+8, ii+8); - op += t; - } -#endif - else - { - if (t <= 18) - *op++ = LZO_BYTE(t - 3); - else - { - lzo_uint tt = t - 18; - *op++ = 0; - while __lzo_unlikely(tt > 255) - { - tt -= 255; - UA_SET1(op, 0); - op++; - } - assert(tt > 0); - *op++ = LZO_BYTE(tt); - } -#if (LZO_OPT_UNALIGNED32) || (LZO_OPT_UNALIGNED64) - do { - UA_COPY8(op, ii); - UA_COPY8(op+8, ii+8); - op += 16; ii += 16; t -= 16; - } while (t >= 16); if (t > 0) -#endif - { do *op++ = *ii++; while (--t > 0); } - } - } - } - m_len = 4; - { -#if (LZO_OPT_UNALIGNED64) - lzo_uint64_t v; - v = UA_GET_NE64(ip + m_len) ^ UA_GET_NE64(m_pos + m_len); - if __lzo_unlikely(v == 0) { - do { - m_len += 8; - v = UA_GET_NE64(ip + m_len) ^ UA_GET_NE64(m_pos + m_len); - if __lzo_unlikely(ip + m_len >= ip_end) - goto m_len_done; - } while (v == 0); - } -#if (LZO_ABI_BIG_ENDIAN) && defined(lzo_bitops_ctlz64) - m_len += lzo_bitops_ctlz64(v) / CHAR_BIT; -#elif (LZO_ABI_BIG_ENDIAN) - if ((v >> (64 - CHAR_BIT)) == 0) do { - v <<= CHAR_BIT; - m_len += 1; - } while ((v >> (64 - CHAR_BIT)) == 0); -#elif (LZO_ABI_LITTLE_ENDIAN) && defined(lzo_bitops_cttz64) - m_len += lzo_bitops_cttz64(v) / CHAR_BIT; -#elif (LZO_ABI_LITTLE_ENDIAN) - if ((v & UCHAR_MAX) == 0) do { - v >>= CHAR_BIT; - m_len += 1; - } while ((v & UCHAR_MAX) == 0); -#else - if (ip[m_len] == m_pos[m_len]) do { - m_len += 1; - } while (ip[m_len] == m_pos[m_len]); -#endif -#elif (LZO_OPT_UNALIGNED32) - lzo_uint32_t v; - v = UA_GET_NE32(ip + m_len) ^ UA_GET_NE32(m_pos + m_len); - if __lzo_unlikely(v == 0) { - do { - m_len += 4; - v = UA_GET_NE32(ip + m_len) ^ UA_GET_NE32(m_pos + m_len); - if (v != 0) - break; - m_len += 4; - v = UA_GET_NE32(ip + m_len) ^ UA_GET_NE32(m_pos + m_len); - if __lzo_unlikely(ip + m_len >= ip_end) - goto m_len_done; - } while (v == 0); - } -#if (LZO_ABI_BIG_ENDIAN) && defined(lzo_bitops_ctlz32) - m_len += lzo_bitops_ctlz32(v) / CHAR_BIT; -#elif (LZO_ABI_BIG_ENDIAN) - if ((v >> (32 - CHAR_BIT)) == 0) do { - v <<= CHAR_BIT; - m_len += 1; - } while ((v >> (32 - CHAR_BIT)) == 0); -#elif (LZO_ABI_LITTLE_ENDIAN) && defined(lzo_bitops_cttz32) - m_len += lzo_bitops_cttz32(v) / CHAR_BIT; -#elif (LZO_ABI_LITTLE_ENDIAN) - if ((v & UCHAR_MAX) == 0) do { - v >>= CHAR_BIT; - m_len += 1; - } while ((v & UCHAR_MAX) == 0); -#else - if (ip[m_len] == m_pos[m_len]) do { - m_len += 1; - } while (ip[m_len] == m_pos[m_len]); -#endif -#else - if __lzo_unlikely(ip[m_len] == m_pos[m_len]) { - do { - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if __lzo_unlikely(ip + m_len >= ip_end) - goto m_len_done; - } while (ip[m_len] == m_pos[m_len]); - } -#endif - } -m_len_done: - m_off = pd(ip,m_pos); - ip += m_len; - ii = ip; - if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) - { - m_off -= 1; -#if defined(LZO1X) - *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); - *op++ = LZO_BYTE(m_off >> 3); -#elif defined(LZO1Y) - *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); - *op++ = LZO_BYTE(m_off >> 2); -#endif - } - else if (m_off <= M3_MAX_OFFSET) - { - m_off -= 1; - if (m_len <= M3_MAX_LEN) - *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); - else - { - m_len -= M3_MAX_LEN; - *op++ = M3_MARKER | 0; - while __lzo_unlikely(m_len > 255) - { - m_len -= 255; - UA_SET1(op, 0); - op++; - } - *op++ = LZO_BYTE(m_len); - } - *op++ = LZO_BYTE(m_off << 2); - *op++ = LZO_BYTE(m_off >> 6); - } - else - { - m_off -= 0x4000; - if (m_len <= M4_MAX_LEN) - *op++ = LZO_BYTE(M4_MARKER | ((m_off >> 11) & 8) | (m_len - 2)); - else - { - m_len -= M4_MAX_LEN; - *op++ = LZO_BYTE(M4_MARKER | ((m_off >> 11) & 8)); - while __lzo_unlikely(m_len > 255) - { - m_len -= 255; - UA_SET1(op, 0); - op++; - } - *op++ = LZO_BYTE(m_len); - } - *op++ = LZO_BYTE(m_off << 2); - *op++ = LZO_BYTE(m_off >> 6); - } - goto next; - } - - *out_len = pd(op, out); - return pd(in_end,ii-ti); -} - - -/*********************************************************************** -// public entry point -************************************************************************/ - -LZO_PUBLIC(int) -DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem ) -{ - const lzo_bytep ip = in; - lzo_bytep op = out; - lzo_uint l = in_len; - lzo_uint t = 0; - - while (l > 20) - { - lzo_uint ll = l; - lzo_uintptr_t ll_end; -#if 0 || (LZO_DETERMINISTIC) - ll = LZO_MIN(ll, 49152); -#endif - ll_end = (lzo_uintptr_t)ip + ll; - if ((ll_end + ((t + ll) >> 5)) <= ll_end || (const lzo_bytep)(ll_end + ((t + ll) >> 5)) <= ip + ll) - break; -#if (LZO_DETERMINISTIC) - lzo_memset(wrkmem, 0, ((lzo_uint)1 << D_BITS) * sizeof(lzo_dict_t)); -#endif - t = do_compress(ip,ll,op,out_len,t,wrkmem); - ip += ll; - op += *out_len; - l -= ll; - } - t += l; - - if (t > 0) - { - const lzo_bytep ii = in + in_len - t; - - if (op == out && t <= 238) - *op++ = LZO_BYTE(17 + t); - else if (t <= 3) - op[-2] = LZO_BYTE(op[-2] | t); - else if (t <= 18) - *op++ = LZO_BYTE(t - 3); - else - { - lzo_uint tt = t - 18; - - *op++ = 0; - while (tt > 255) - { - tt -= 255; - UA_SET1(op, 0); - op++; - } - assert(tt > 0); - *op++ = LZO_BYTE(tt); - } - UA_COPYN(op, ii, t); - op += t; - } - - *op++ = M4_MARKER | 1; - *op++ = 0; - *op++ = 0; - - *out_len = pd(op, out); - return LZO_E_OK; -} - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_d.ch b/tools/z64compress/src/enc/lzo/lzo1x_d.ch deleted file mode 100644 index b6c6d9947c..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_d.ch +++ /dev/null @@ -1,475 +0,0 @@ -/* lzo1x_d.ch -- implementation of the LZO1X decompression algorithm - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "lzo1_d.ch" - - -/*********************************************************************** -// decompress a block of data. -************************************************************************/ - -#if defined(DO_DECOMPRESS) -LZO_PUBLIC(int) -DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem ) -#endif -{ - lzo_bytep op; - const lzo_bytep ip; - lzo_uint t; -#if defined(COPY_DICT) - lzo_uint m_off; - const lzo_bytep dict_end; -#else - const lzo_bytep m_pos; -#endif - - const lzo_bytep const ip_end = in + in_len; -#if defined(HAVE_ANY_OP) - lzo_bytep const op_end = out + *out_len; -#endif -#if defined(LZO1Z) - lzo_uint last_m_off = 0; -#endif - - LZO_UNUSED(wrkmem); - -#if defined(COPY_DICT) - if (dict) - { - if (dict_len > M4_MAX_OFFSET) - { - dict += dict_len - M4_MAX_OFFSET; - dict_len = M4_MAX_OFFSET; - } - dict_end = dict + dict_len; - } - else - { - dict_len = 0; - dict_end = NULL; - } -#endif /* COPY_DICT */ - - *out_len = 0; - - op = out; - ip = in; - - NEED_IP(1); - if (*ip > 17) - { - t = *ip++ - 17; - if (t < 4) - goto match_next; - assert(t > 0); NEED_OP(t); NEED_IP(t+3); - do *op++ = *ip++; while (--t > 0); - goto first_literal_run; - } - - for (;;) - { - NEED_IP(3); - t = *ip++; - if (t >= 16) - goto match; - /* a literal run */ - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_IV(t); - NEED_IP(1); - } - t += 15 + *ip++; - } - /* copy literals */ - assert(t > 0); NEED_OP(t+3); NEED_IP(t+6); -#if (LZO_OPT_UNALIGNED64) && (LZO_OPT_UNALIGNED32) - t += 3; - if (t >= 8) do - { - UA_COPY8(op,ip); - op += 8; ip += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY4(op,ip); - op += 4; ip += 4; t -= 4; - } - if (t > 0) - { - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } - } -#elif (LZO_OPT_UNALIGNED32) || (LZO_ALIGNED_OK_4) -#if !(LZO_OPT_UNALIGNED32) - if (PTR_ALIGNED2_4(op,ip)) - { -#endif - UA_COPY4(op,ip); - op += 4; ip += 4; - if (--t > 0) - { - if (t >= 4) - { - do { - UA_COPY4(op,ip); - op += 4; ip += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *ip++; while (--t > 0); - } - else - do *op++ = *ip++; while (--t > 0); - } -#if !(LZO_OPT_UNALIGNED32) - } - else -#endif -#endif -#if !(LZO_OPT_UNALIGNED32) - { - *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; - do *op++ = *ip++; while (--t > 0); - } -#endif - - -first_literal_run: - - - t = *ip++; - if (t >= 16) - goto match; -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(3); - t = 3; COPY_DICT(t,m_off) -#else /* !COPY_DICT */ -#if defined(LZO1Z) - t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else - m_pos = op - (1 + M2_MAX_OFFSET); - m_pos -= t >> 2; - m_pos -= *ip++ << 2; -#endif - TEST_LB(m_pos); NEED_OP(3); - *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; -#endif /* COPY_DICT */ - goto match_done; - - - /* handle matches */ - for (;;) { -match: - if (t >= 64) /* a M2 match */ - { -#if defined(COPY_DICT) -#if defined(LZO1X) - m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); - t = (t >> 4) - 3; -#elif defined(LZO1Z) - m_off = t & 0x1f; - if (m_off >= 0x1c) - m_off = last_m_off; - else - { - m_off = 1 + (m_off << 6) + (*ip++ >> 2); - last_m_off = m_off; - } - t = (t >> 5) - 1; -#endif -#else /* !COPY_DICT */ -#if defined(LZO1X) - m_pos = op - 1; - m_pos -= (t >> 2) & 7; - m_pos -= *ip++ << 3; - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_pos = op - 1; - m_pos -= (t >> 2) & 3; - m_pos -= *ip++ << 2; - t = (t >> 4) - 3; -#elif defined(LZO1Z) - { - lzo_uint off = t & 0x1f; - m_pos = op; - if (off >= 0x1c) - { - assert(last_m_off > 0); - m_pos -= last_m_off; - } - else - { - off = 1 + (off << 6) + (*ip++ >> 2); - m_pos -= off; - last_m_off = off; - } - } - t = (t >> 5) - 1; -#endif - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); - goto copy_match; -#endif /* COPY_DICT */ - } - else if (t >= 32) /* a M3 match */ - { - t &= 31; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_OV(t); - NEED_IP(1); - } - t += 31 + *ip++; - NEED_IP(2); - } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); - last_m_off = m_off; -#else - m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); -#endif -#else /* !COPY_DICT */ -#if defined(LZO1Z) - { - lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); - m_pos = op - off; - last_m_off = off; - } -#elif (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) - m_pos = op - 1; - m_pos -= UA_GET_LE16(ip) >> 2; -#else - m_pos = op - 1; - m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif -#endif /* COPY_DICT */ - ip += 2; - } - else if (t >= 16) /* a M4 match */ - { -#if defined(COPY_DICT) - m_off = (t & 8) << 11; -#else /* !COPY_DICT */ - m_pos = op; - m_pos -= (t & 8) << 11; -#endif /* COPY_DICT */ - t &= 7; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_OV(t); - NEED_IP(1); - } - t += 7 + *ip++; - NEED_IP(2); - } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off += (ip[0] << 6) + (ip[1] >> 2); -#else - m_off += (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_off == 0) - goto eof_found; - m_off += 0x4000; -#if defined(LZO1Z) - last_m_off = m_off; -#endif -#else /* !COPY_DICT */ -#if defined(LZO1Z) - m_pos -= (ip[0] << 6) + (ip[1] >> 2); -#elif (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) - m_pos -= UA_GET_LE16(ip) >> 2; -#else - m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_pos == op) - goto eof_found; - m_pos -= 0x4000; -#if defined(LZO1Z) - last_m_off = pd((const lzo_bytep)op, m_pos); -#endif -#endif /* COPY_DICT */ - } - else /* a M1 match */ - { -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = 1 + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(2); - t = 2; COPY_DICT(t,m_off) -#else /* !COPY_DICT */ -#if defined(LZO1Z) - t = 1 + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else - m_pos = op - 1; - m_pos -= t >> 2; - m_pos -= *ip++ << 2; -#endif - TEST_LB(m_pos); NEED_OP(2); - *op++ = *m_pos++; *op++ = *m_pos; -#endif /* COPY_DICT */ - goto match_done; - } - - /* copy match */ -#if defined(COPY_DICT) - - NEED_OP(t+3-1); - t += 3-1; COPY_DICT(t,m_off) - -#else /* !COPY_DICT */ - - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -#if (LZO_OPT_UNALIGNED64) && (LZO_OPT_UNALIGNED32) - if (op - m_pos >= 8) - { - t += (3 - 1); - if (t >= 8) do - { - UA_COPY8(op,m_pos); - op += 8; m_pos += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4; - } - if (t > 0) - { - *op++ = m_pos[0]; - if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } } - } - } - else -#elif (LZO_OPT_UNALIGNED32) || (LZO_ALIGNED_OK_4) -#if !(LZO_OPT_UNALIGNED32) - if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) - { - assert((op - m_pos) >= 4); /* both pointers are aligned */ -#else - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) - { -#endif - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4 - (3 - 1); - do { - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *m_pos++; while (--t > 0); - } - else -#endif - { -copy_match: - *op++ = *m_pos++; *op++ = *m_pos++; - do *op++ = *m_pos++; while (--t > 0); - } - -#endif /* COPY_DICT */ - -match_done: -#if defined(LZO1Z) - t = ip[-1] & 3; -#else - t = ip[-2] & 3; -#endif - if (t == 0) - break; - - /* copy literals */ -match_next: - assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+3); -#if 0 - do *op++ = *ip++; while (--t > 0); -#else - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } -#endif - t = *ip++; - } - } - -eof_found: - *out_len = pd(op, out); - return (ip == ip_end ? LZO_E_OK : - (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); - - -#if defined(HAVE_NEED_IP) -input_overrun: - *out_len = pd(op, out); - return LZO_E_INPUT_OVERRUN; -#endif - -#if defined(HAVE_NEED_OP) -output_overrun: - *out_len = pd(op, out); - return LZO_E_OUTPUT_OVERRUN; -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -lookbehind_overrun: - *out_len = pd(op, out); - return LZO_E_LOOKBEHIND_OVERRUN; -#endif -} - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_d1.c b/tools/z64compress/src/enc/lzo/lzo1x_d1.c deleted file mode 100644 index 68faf48e87..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_d1.c +++ /dev/null @@ -1,36 +0,0 @@ -/* lzo1x_d1.c -- LZO1X decompression - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "config1x.h" - -#undef LZO_TEST_OVERRUN -#define DO_DECOMPRESS lzo1x_decompress - -#include "lzo1x_d.ch" - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_d2.c b/tools/z64compress/src/enc/lzo/lzo1x_d2.c deleted file mode 100644 index 8b7c316af7..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_d2.c +++ /dev/null @@ -1,61 +0,0 @@ -/* lzo1x_d2.c -- LZO1X decompression with overrun testing - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "config1x.h" - -#define LZO_TEST_OVERRUN 1 -#define DO_DECOMPRESS lzo1x_decompress_safe - -#include "lzo1x_d.ch" - -#if defined(LZO_ARCH_I386) && defined(LZO_USE_ASM) -LZO_EXTERN(int) lzo1x_decompress_asm_safe - (const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem); -LZO_PUBLIC(int) lzo1x_decompress_asm_safe - (const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem) -{ - return lzo1x_decompress_safe(src, src_len, dst, dst_len, wrkmem); -} -LZO_EXTERN(int) lzo1x_decompress_asm_fast_safe - (const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem); -LZO_PUBLIC(int) lzo1x_decompress_asm_fast_safe - (const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem) -{ - return lzo1x_decompress_safe(src, src_len, dst, dst_len, wrkmem); -} -#endif - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo1x_d3.c b/tools/z64compress/src/enc/lzo/lzo1x_d3.c deleted file mode 100644 index b3d430f851..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo1x_d3.c +++ /dev/null @@ -1,93 +0,0 @@ -/* lzo1x_d3.c -- LZO1X decompression with preset dictionary - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "config1x.h" - -#define LZO_TEST_OVERRUN 1 - - -#define SLOW_MEMCPY(a,b,l) { do *a++ = *b++; while (--l > 0); } -#define FAST_MEMCPY(a,b,l) { lzo_memcpy(a,b,l); a += l; } - -#if 1 && defined(FAST_MEMCPY) -# define DICT_MEMMOVE(op,m_pos,m_len,m_off) \ - if (m_off >= (m_len)) \ - FAST_MEMCPY(op,m_pos,m_len) \ - else \ - SLOW_MEMCPY(op,m_pos,m_len) -#else -# define DICT_MEMMOVE(op,m_pos,m_len,m_off) \ - SLOW_MEMCPY(op,m_pos,m_len) -#endif - -#if !defined(FAST_MEMCPY) -# define FAST_MEMCPY SLOW_MEMCPY -#endif - - -#define COPY_DICT_DICT(m_len,m_off) \ - { \ - const lzo_bytep m_pos; \ - m_off -= pd(op, out); assert(m_off > 0); \ - if (m_off > dict_len) goto lookbehind_overrun; \ - m_pos = dict_end - m_off; \ - if (m_len > m_off) \ - { \ - m_len -= m_off; \ - FAST_MEMCPY(op,m_pos,m_off) \ - m_pos = out; \ - SLOW_MEMCPY(op,m_pos,m_len) \ - } \ - else \ - FAST_MEMCPY(op,m_pos,m_len) \ - } - -#define COPY_DICT(m_len,m_off) \ - assert(m_len >= 2); assert(m_off > 0); assert(op > out); \ - if (m_off <= pd(op, out)) \ - { \ - const lzo_bytep m_pos = op - m_off; \ - DICT_MEMMOVE(op,m_pos,m_len,m_off) \ - } \ - else \ - COPY_DICT_DICT(m_len,m_off) - - - - -LZO_PUBLIC(int) -lzo1x_decompress_dict_safe ( const lzo_bytep in, lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem /* NOT USED */, - const lzo_bytep dict, lzo_uint dict_len) - - -#include "lzo1x_d.ch" - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_conf.h b/tools/z64compress/src/enc/lzo/lzo_conf.h deleted file mode 100644 index fff021d1a1..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_conf.h +++ /dev/null @@ -1,436 +0,0 @@ -/* lzo_conf.h -- main internal configuration file for the the LZO library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the library and is subject - to change. - */ - - -#ifndef __LZO_CONF_H -#define __LZO_CONF_H 1 - -#if !defined(__LZO_IN_MINILZO) -#if defined(LZO_CFG_FREESTANDING) && (LZO_CFG_FREESTANDING) -# define LZO_LIBC_FREESTANDING 1 -# define LZO_OS_FREESTANDING 1 -#endif -#if defined(LZO_CFG_EXTRA_CONFIG_HEADER) -# include LZO_CFG_EXTRA_CONFIG_HEADER -#endif -#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) -# error "include this file first" -#endif -#if defined(LZO_CFG_BUILD_DLL) && (LZO_CFG_BUILD_DLL+0) && !defined(__LZO_EXPORT1) && !defined(__LZO_EXPORT2) && 0 - /* idea: we could auto-define __LZO_EXPORT1 for DLL exports */ -#ifndef __LZODEFS_H_INCLUDED -#if defined(LZO_HAVE_CONFIG_H) -# include -#endif -#include -#include -#include "lzodefs.h" -#endif - /* #define __LZO_EXPORT1 __attribute__((__visibility__("default"))) */ - /* #define __LZO_EXPORT1 __declspec(dllexport) */ -#endif -#include "lzoconf.h" -#if defined(LZO_CFG_EXTRA_CONFIG_HEADER2) -# include LZO_CFG_EXTRA_CONFIG_HEADER2 -#endif -#endif /* !defined(__LZO_IN_MINILZO) */ - -#if !defined(__LZOCONF_H_INCLUDED) || (LZO_VERSION+0 != 0x20a0) -# error "version mismatch" -#endif - - -/*********************************************************************** -// pragmas -************************************************************************/ - -#if (LZO_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1100)) - /* disable bogus "unreachable code" warnings */ -# pragma warning(disable: 4702) -#endif -#if (LZO_CC_MSC && (_MSC_VER >= 1000)) -# pragma warning(disable: 4127 4701) - /* disable warnings about inlining */ -# pragma warning(disable: 4514 4710 4711) -#endif -#if (LZO_CC_MSC && (_MSC_VER >= 1300)) - /* disable '-Wall' warnings in system header files */ -# pragma warning(disable: 4820) -#endif -#if (LZO_CC_MSC && (_MSC_VER >= 1800)) - /* disable '-Wall' warnings in system header files */ -# pragma warning(disable: 4746) -#endif -#if (LZO_CC_INTELC && (__INTEL_COMPILER >= 900)) - /* disable pedantic warnings in system header files */ -# pragma warning(disable: 1684) -#endif - -#if (LZO_CC_SUNPROC) -#if !defined(__cplusplus) -# pragma error_messages(off,E_END_OF_LOOP_CODE_NOT_REACHED) -# pragma error_messages(off,E_LOOP_NOT_ENTERED_AT_TOP) -# pragma error_messages(off,E_STATEMENT_NOT_REACHED) -#endif -#endif - - -/*********************************************************************** -// function types -************************************************************************/ - -#if !defined(__LZO_NOEXPORT1) -# define __LZO_NOEXPORT1 /*empty*/ -#endif -#if !defined(__LZO_NOEXPORT2) -# define __LZO_NOEXPORT2 /*empty*/ -#endif - -#if 1 -# define LZO_PUBLIC_DECL(r) LZO_EXTERN(r) -#endif -#if 1 -# define LZO_PUBLIC_IMPL(r) LZO_PUBLIC(r) -#endif -#if !defined(LZO_LOCAL_DECL) -# define LZO_LOCAL_DECL(r) __LZO_EXTERN_C LZO_LOCAL_IMPL(r) -#endif -#if !defined(LZO_LOCAL_IMPL) -# define LZO_LOCAL_IMPL(r) __LZO_NOEXPORT1 r __LZO_NOEXPORT2 __LZO_CDECL -#endif -#if 1 -# define LZO_STATIC_DECL(r) LZO_PRIVATE(r) -#endif -#if 1 -# define LZO_STATIC_IMPL(r) LZO_PRIVATE(r) -#endif - - -/*********************************************************************** -// -************************************************************************/ - -#if defined(__LZO_IN_MINILZO) || (LZO_CFG_FREESTANDING) -#elif 1 -# include -#else -# define LZO_WANT_ACC_INCD_H 1 -#endif -#if defined(LZO_HAVE_CONFIG_H) -# define LZO_CFG_NO_CONFIG_HEADER 1 -#endif -#include "lzo_supp.h" - -/* Integral types */ -#if 1 || defined(lzo_int8_t) || defined(lzo_uint8_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint8_t) == 1) -#endif -#if 1 || defined(lzo_int16_t) || defined(lzo_uint16_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint16_t) == 2) -#endif -#if 1 || defined(lzo_int32_t) || defined(lzo_uint32_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32_t) == 4) -#endif -#if defined(lzo_int64_t) || defined(lzo_uint64_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint64_t) == 8) -#endif - -#if (LZO_CFG_FREESTANDING) -# undef HAVE_MEMCMP -# undef HAVE_MEMCPY -# undef HAVE_MEMMOVE -# undef HAVE_MEMSET -#endif - -#if !(HAVE_MEMCMP) -# undef memcmp -# define memcmp(a,b,c) lzo_memcmp(a,b,c) -#else -# undef lzo_memcmp -# define lzo_memcmp(a,b,c) memcmp(a,b,c) -#endif -#if !(HAVE_MEMCPY) -# undef memcpy -# define memcpy(a,b,c) lzo_memcpy(a,b,c) -#else -# undef lzo_memcpy -# define lzo_memcpy(a,b,c) memcpy(a,b,c) -#endif -#if !(HAVE_MEMMOVE) -# undef memmove -# define memmove(a,b,c) lzo_memmove(a,b,c) -#else -# undef lzo_memmove -# define lzo_memmove(a,b,c) memmove(a,b,c) -#endif -#if !(HAVE_MEMSET) -# undef memset -# define memset(a,b,c) lzo_memset(a,b,c) -#else -# undef lzo_memset -# define lzo_memset(a,b,c) memset(a,b,c) -#endif - -#undef NDEBUG -#if (LZO_CFG_FREESTANDING) -# undef LZO_DEBUG -# define NDEBUG 1 -# undef assert -# define assert(e) ((void)0) -#else -# if !defined(LZO_DEBUG) -# define NDEBUG 1 -# endif -# include -#endif - -#if 0 && defined(__BOUNDS_CHECKING_ON) -# include -#else -# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt -# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) -#endif - -#if (LZO_CFG_PGO) -# undef __lzo_likely -# undef __lzo_unlikely -# define __lzo_likely(e) (e) -# define __lzo_unlikely(e) (e) -#endif - -#undef _ -#undef __ -#undef ___ -#undef ____ -#undef _p0 -#undef _p1 -#undef _p2 -#undef _p3 -#undef _p4 -#undef _s0 -#undef _s1 -#undef _s2 -#undef _s3 -#undef _s4 -#undef _ww - - -/*********************************************************************** -// -************************************************************************/ - -#if 1 -# define LZO_BYTE(x) ((unsigned char) (x)) -#else -# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) -#endif - -#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) -#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) -#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) -#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) - -#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) - -#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) - -/* this always fits into 32 bits */ -#define LZO_SIZE(bits) (1u << (bits)) -#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) - -#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) -#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) - -#if !defined(DMUL) -#if 0 - /* 32*32 multiplies may be faster than 64*64 on some 64-bit machines, - * but then we need extra casts from unsigned<->size_t */ -# define DMUL(a,b) ((lzo_xint) ((lzo_uint32_t)(a) * (lzo_uint32_t)(b))) -#else -# define DMUL(a,b) ((lzo_xint) ((a) * (b))) -#endif -#endif - - -/*********************************************************************** -// compiler and architecture specific stuff -************************************************************************/ - -/* Some defines that indicate if memory can be accessed at unaligned - * memory addresses. You should also test that this is actually faster - * even if it is allowed by your system. - */ - -#include "lzo_func.h" - -#ifndef UA_SET1 -#define UA_SET1 LZO_MEMOPS_SET1 -#endif -#ifndef UA_SET2 -#define UA_SET2 LZO_MEMOPS_SET2 -#endif -#ifndef UA_SET3 -#define UA_SET3 LZO_MEMOPS_SET3 -#endif -#ifndef UA_SET4 -#define UA_SET4 LZO_MEMOPS_SET4 -#endif -#ifndef UA_MOVE1 -#define UA_MOVE1 LZO_MEMOPS_MOVE1 -#endif -#ifndef UA_MOVE2 -#define UA_MOVE2 LZO_MEMOPS_MOVE2 -#endif -#ifndef UA_MOVE3 -#define UA_MOVE3 LZO_MEMOPS_MOVE3 -#endif -#ifndef UA_MOVE4 -#define UA_MOVE4 LZO_MEMOPS_MOVE4 -#endif -#ifndef UA_MOVE8 -#define UA_MOVE8 LZO_MEMOPS_MOVE8 -#endif -#ifndef UA_COPY1 -#define UA_COPY1 LZO_MEMOPS_COPY1 -#endif -#ifndef UA_COPY2 -#define UA_COPY2 LZO_MEMOPS_COPY2 -#endif -#ifndef UA_COPY3 -#define UA_COPY3 LZO_MEMOPS_COPY3 -#endif -#ifndef UA_COPY4 -#define UA_COPY4 LZO_MEMOPS_COPY4 -#endif -#ifndef UA_COPY8 -#define UA_COPY8 LZO_MEMOPS_COPY8 -#endif -#ifndef UA_COPYN -#define UA_COPYN LZO_MEMOPS_COPYN -#endif -#ifndef UA_COPYN_X -#define UA_COPYN_X LZO_MEMOPS_COPYN -#endif -#ifndef UA_GET_LE16 -#define UA_GET_LE16 LZO_MEMOPS_GET_LE16 -#endif -#ifndef UA_GET_LE32 -#define UA_GET_LE32 LZO_MEMOPS_GET_LE32 -#endif -#ifdef LZO_MEMOPS_GET_LE64 -#ifndef UA_GET_LE64 -#define UA_GET_LE64 LZO_MEMOPS_GET_LE64 -#endif -#endif -#ifndef UA_GET_NE16 -#define UA_GET_NE16 LZO_MEMOPS_GET_NE16 -#endif -#ifndef UA_GET_NE32 -#define UA_GET_NE32 LZO_MEMOPS_GET_NE32 -#endif -#ifdef LZO_MEMOPS_GET_NE64 -#ifndef UA_GET_NE64 -#define UA_GET_NE64 LZO_MEMOPS_GET_NE64 -#endif -#endif -#ifndef UA_PUT_LE16 -#define UA_PUT_LE16 LZO_MEMOPS_PUT_LE16 -#endif -#ifndef UA_PUT_LE32 -#define UA_PUT_LE32 LZO_MEMOPS_PUT_LE32 -#endif -#ifndef UA_PUT_NE16 -#define UA_PUT_NE16 LZO_MEMOPS_PUT_NE16 -#endif -#ifndef UA_PUT_NE32 -#define UA_PUT_NE32 LZO_MEMOPS_PUT_NE32 -#endif - - -/* Fast memcpy that copies multiples of 8 byte chunks. - * len is the number of bytes. - * note: all parameters must be lvalues, len >= 8 - * dest and src advance, len is undefined afterwards - */ - -#define MEMCPY8_DS(dest,src,len) \ - lzo_memcpy(dest,src,len); dest += len; src += len - -#define BZERO8_PTR(s,l,n) \ - lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) - -#define MEMCPY_DS(dest,src,len) \ - do *dest++ = *src++; while (--len > 0) - - -/*********************************************************************** -// -************************************************************************/ - -LZO_EXTERN(const lzo_bytep) lzo_copyright(void); - -#include "lzo_ptr.h" - -/* Generate compressed data in a deterministic way. - * This is fully portable, and compression can be faster as well. - * A reason NOT to be deterministic is when the block size is - * very small (e.g. 8kB) or the dictionary is big, because - * then the initialization of the dictionary becomes a relevant - * magnitude for compression speed. - */ -#ifndef LZO_DETERMINISTIC -#define LZO_DETERMINISTIC 1 -#endif - - -#ifndef LZO_DICT_USE_PTR -#define LZO_DICT_USE_PTR 1 -#endif - -#if (LZO_DICT_USE_PTR) -# define lzo_dict_t const lzo_bytep -# define lzo_dict_p lzo_dict_t * -#else -# define lzo_dict_t lzo_uint -# define lzo_dict_p lzo_dict_t * -#endif - - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_dict.h b/tools/z64compress/src/enc/lzo/lzo_dict.h deleted file mode 100644 index e48addb17c..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_dict.h +++ /dev/null @@ -1,307 +0,0 @@ -/* lzo_dict.h -- dictionary definitions for the the LZO library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the library and is subject - to change. - */ - - -#ifndef __LZO_DICT_H -#define __LZO_DICT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - - - -/*********************************************************************** -// dictionary size -************************************************************************/ - -/* dictionary needed for compression */ -#if !defined(D_BITS) && defined(DBITS) -# define D_BITS DBITS -#endif -#if !defined(D_BITS) -# error "D_BITS is not defined" -#endif -#if (D_BITS < 16) -# define D_SIZE LZO_SIZE(D_BITS) -# define D_MASK LZO_MASK(D_BITS) -#else -# define D_SIZE LZO_USIZE(D_BITS) -# define D_MASK LZO_UMASK(D_BITS) -#endif -#define D_HIGH ((D_MASK >> 1) + 1) - - -/* dictionary depth */ -#if !defined(DD_BITS) -# define DD_BITS 0 -#endif -#define DD_SIZE LZO_SIZE(DD_BITS) -#define DD_MASK LZO_MASK(DD_BITS) - -/* dictionary length */ -#if !defined(DL_BITS) -# define DL_BITS (D_BITS - DD_BITS) -#endif -#if (DL_BITS < 16) -# define DL_SIZE LZO_SIZE(DL_BITS) -# define DL_MASK LZO_MASK(DL_BITS) -#else -# define DL_SIZE LZO_USIZE(DL_BITS) -# define DL_MASK LZO_UMASK(DL_BITS) -#endif - - -#if (D_BITS != DL_BITS + DD_BITS) -# error "D_BITS does not match" -#endif -#if (D_BITS < 6 || D_BITS > 18) -# error "invalid D_BITS" -#endif -#if (DL_BITS < 6 || DL_BITS > 20) -# error "invalid DL_BITS" -#endif -#if (DD_BITS < 0 || DD_BITS > 6) -# error "invalid DD_BITS" -#endif - - -#if !defined(DL_MIN_LEN) -# define DL_MIN_LEN 3 -#endif -#if !defined(DL_SHIFT) -# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) -#endif - - - -/*********************************************************************** -// dictionary access -************************************************************************/ - -#define LZO_HASH_GZIP 1 -#define LZO_HASH_GZIP_INCREMENTAL 2 -#define LZO_HASH_LZO_INCREMENTAL_A 3 -#define LZO_HASH_LZO_INCREMENTAL_B 4 - -#if !defined(LZO_HASH) -# error "choose a hashing strategy" -#endif - -#undef DM -#undef DX - -#if (DL_MIN_LEN == 3) -# define _DV2_A(p,shift1,shift2) \ - (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) -# define _DV2_B(p,shift1,shift2) \ - (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) -# define _DV3_B(p,shift1,shift2,shift3) \ - ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) -#elif (DL_MIN_LEN == 2) -# define _DV2_A(p,shift1,shift2) \ - (( (lzo_xint)(p[0]) << shift1) ^ p[1]) -# define _DV2_B(p,shift1,shift2) \ - (( (lzo_xint)(p[1]) << shift1) ^ p[2]) -#else -# error "invalid DL_MIN_LEN" -#endif -#define _DV_A(p,shift) _DV2_A(p,shift,shift) -#define _DV_B(p,shift) _DV2_B(p,shift,shift) -#define DA2(p,s1,s2) \ - (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) -#define DS2(p,s1,s2) \ - (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) -#define DX2(p,s1,s2) \ - (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) -#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) -#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) -#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) -#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) -#define DM(v) DMS(v,0) - - -#if (LZO_HASH == LZO_HASH_GZIP) - /* hash function like in gzip/zlib (deflate) */ -# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) - -#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) - /* incremental hash like in gzip/zlib (deflate) */ -# define __LZO_HASH_INCREMENTAL 1 -# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) -# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) -# define _DINDEX(dv,p) (dv) -# define DVAL_LOOKAHEAD DL_MIN_LEN - -#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) - /* incremental LZO hash version A */ -# define __LZO_HASH_INCREMENTAL 1 -# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) -# define DVAL_NEXT(dv,p) \ - dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) -# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) -# define DVAL_LOOKAHEAD DL_MIN_LEN - -#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) - /* incremental LZO hash version B */ -# define __LZO_HASH_INCREMENTAL 1 -# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) -# define DVAL_NEXT(dv,p) \ - dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) -# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) -# define DVAL_LOOKAHEAD DL_MIN_LEN - -#else -# error "choose a hashing strategy" -#endif - - -#ifndef DINDEX -#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) -#endif -#if !defined(DINDEX1) && defined(D_INDEX1) -#define DINDEX1 D_INDEX1 -#endif -#if !defined(DINDEX2) && defined(D_INDEX2) -#define DINDEX2 D_INDEX2 -#endif - - - -#if !defined(__LZO_HASH_INCREMENTAL) -# define DVAL_FIRST(dv,p) ((void) 0) -# define DVAL_NEXT(dv,p) ((void) 0) -# define DVAL_LOOKAHEAD 0 -#endif - - -#if !defined(DVAL_ASSERT) -#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) -#if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -static void __attribute__((__unused__)) -#else -static void -#endif -DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) -{ - lzo_xint df; - DVAL_FIRST(df,(p)); - assert(DINDEX(dv,p) == DINDEX(df,p)); -} -#else -# define DVAL_ASSERT(dv,p) ((void) 0) -#endif -#endif - - - -/*********************************************************************** -// dictionary updating -************************************************************************/ - -#if (LZO_DICT_USE_PTR) -# define DENTRY(p,in) (p) -# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] -#else -# define DENTRY(p,in) ((lzo_dict_t) pd(p, in)) -# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] -#endif - - -#if (DD_BITS == 0) - -# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) -# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) -# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) - -#else - -# define UPDATE_D(dict,drun,dv,p,in) \ - dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK -# define UPDATE_I(dict,drun,index,p,in) \ - dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK -# define UPDATE_P(ptr,drun,p,in) \ - (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK - -#endif - - -/*********************************************************************** -// test for a match -************************************************************************/ - -#if (LZO_DICT_USE_PTR) - -/* m_pos is either NULL or a valid pointer */ -#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ - (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) - -/* m_pos may point anywhere... */ -#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ - (BOUNDS_CHECKING_OFF_IN_EXPR(( \ - m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ - PTR_LT(m_pos,in) || \ - (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) == 0 || \ - m_off > max_offset ))) - -#else - -#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ - (m_off == 0 || \ - ((m_off = pd(ip, in) - m_off) > max_offset) || \ - (m_pos = (ip) - (m_off), 0) ) - -#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ - (pd(ip, in) <= m_off || \ - ((m_off = pd(ip, in) - m_off) > max_offset) || \ - (m_pos = (ip) - (m_off), 0) ) - -#endif - - -#if (LZO_DETERMINISTIC) -# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET -#else -# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET -#endif - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_func.h b/tools/z64compress/src/enc/lzo/lzo_func.h deleted file mode 100644 index f3ac8e3440..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_func.h +++ /dev/null @@ -1,491 +0,0 @@ -/* lzo_func.h -- functions - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the library and is subject - to change. - */ - - -#ifndef __LZO_FUNC_H -#define __LZO_FUNC_H 1 - - -/*********************************************************************** -// bitops -************************************************************************/ - -#if !defined(LZO_BITOPS_USE_ASM_BITSCAN) && !defined(LZO_BITOPS_USE_GNUC_BITSCAN) && !defined(LZO_BITOPS_USE_MSC_BITSCAN) -#if 1 && (LZO_ARCH_AMD64) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_ASM_SYNTAX_GNUC) -#define LZO_BITOPS_USE_ASM_BITSCAN 1 -#elif (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1000)) || (LZO_CC_LLVM && (!defined(__llvm_tools_version__) || (__llvm_tools_version__+0 >= 0x010500ul)))) -#define LZO_BITOPS_USE_GNUC_BITSCAN 1 -#elif (LZO_OS_WIN32 || LZO_OS_WIN64) && ((LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 1010)) || (LZO_CC_MSC && (_MSC_VER >= 1400))) -#define LZO_BITOPS_USE_MSC_BITSCAN 1 -#if (LZO_CC_MSC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -#include -#endif -#if (LZO_CC_MSC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -#pragma intrinsic(_BitScanReverse) -#pragma intrinsic(_BitScanForward) -#endif -#if (LZO_CC_MSC) && (LZO_ARCH_AMD64) -#pragma intrinsic(_BitScanReverse64) -#pragma intrinsic(_BitScanForward64) -#endif -#endif -#endif - -__lzo_static_forceinline unsigned lzo_bitops_ctlz32_func(lzo_uint32_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) - unsigned long r; (void) _BitScanReverse(&r, v); return (unsigned) r ^ 31; -#define lzo_bitops_ctlz32(v) lzo_bitops_ctlz32_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint32_t r; - __asm__("bsr %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r ^ 31; -#define lzo_bitops_ctlz32(v) lzo_bitops_ctlz32_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_INT == 4) - unsigned r; r = (unsigned) __builtin_clz(v); return r; -#define lzo_bitops_ctlz32(v) ((unsigned) __builtin_clz(v)) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG == 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_clzl(v); return r ^ 32; -#define lzo_bitops_ctlz32(v) (((unsigned) __builtin_clzl(v)) ^ 32) -#else - LZO_UNUSED(v); return 0; -#endif -} - -#if defined(lzo_uint64_t) -__lzo_static_forceinline unsigned lzo_bitops_ctlz64_func(lzo_uint64_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64) - unsigned long r; (void) _BitScanReverse64(&r, v); return (unsigned) r ^ 63; -#define lzo_bitops_ctlz64(v) lzo_bitops_ctlz64_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint64_t r; - __asm__("bsr %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r ^ 63; -#define lzo_bitops_ctlz64(v) lzo_bitops_ctlz64_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG == 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_clzl(v); return r; -#define lzo_bitops_ctlz64(v) ((unsigned) __builtin_clzl(v)) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG_LONG == 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_clzll(v); return r; -#define lzo_bitops_ctlz64(v) ((unsigned) __builtin_clzll(v)) -#else - LZO_UNUSED(v); return 0; -#endif -} -#endif - -__lzo_static_forceinline unsigned lzo_bitops_cttz32_func(lzo_uint32_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) - unsigned long r; (void) _BitScanForward(&r, v); return (unsigned) r; -#define lzo_bitops_cttz32(v) lzo_bitops_cttz32_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint32_t r; - __asm__("bsf %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r; -#define lzo_bitops_cttz32(v) lzo_bitops_cttz32_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_INT >= 4) - unsigned r; r = (unsigned) __builtin_ctz(v); return r; -#define lzo_bitops_cttz32(v) ((unsigned) __builtin_ctz(v)) -#else - LZO_UNUSED(v); return 0; -#endif -} - -#if defined(lzo_uint64_t) -__lzo_static_forceinline unsigned lzo_bitops_cttz64_func(lzo_uint64_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64) - unsigned long r; (void) _BitScanForward64(&r, v); return (unsigned) r; -#define lzo_bitops_cttz64(v) lzo_bitops_cttz64_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint64_t r; - __asm__("bsf %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r; -#define lzo_bitops_cttz64(v) lzo_bitops_cttz64_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG >= 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_ctzl(v); return r; -#define lzo_bitops_cttz64(v) ((unsigned) __builtin_ctzl(v)) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG_LONG >= 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_ctzll(v); return r; -#define lzo_bitops_cttz64(v) ((unsigned) __builtin_ctzll(v)) -#else - LZO_UNUSED(v); return 0; -#endif -} -#endif - -lzo_unused_funcs_impl(void, lzo_bitops_unused_funcs)(void) -{ - LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); - LZO_UNUSED_FUNC(lzo_bitops_ctlz32_func); - LZO_UNUSED_FUNC(lzo_bitops_cttz32_func); -#if defined(lzo_uint64_t) - LZO_UNUSED_FUNC(lzo_bitops_ctlz64_func); - LZO_UNUSED_FUNC(lzo_bitops_cttz64_func); -#endif -} - - -/*********************************************************************** -// memops -************************************************************************/ - -#if defined(__lzo_alignof) && !(LZO_CFG_NO_UNALIGNED) -/* CBUG: disabled because of gcc bug 64516 */ -#if !defined(lzo_memops_tcheck__) && 0 -#define lzo_memops_tcheck__(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b)) -#endif -#endif -#ifndef lzo_memops_TU0p -#define lzo_memops_TU0p void __LZO_MMODEL * -#endif -#ifndef lzo_memops_TU1p -#define lzo_memops_TU1p unsigned char __LZO_MMODEL * -#endif -#ifndef lzo_memops_TU2p -#if (LZO_OPT_UNALIGNED16) -typedef lzo_uint16_t __lzo_may_alias lzo_memops_TU2; -#define lzo_memops_TU2p volatile lzo_memops_TU2 * -#elif defined(__lzo_byte_struct) -__lzo_byte_struct(lzo_memops_TU2_struct,2) -typedef struct lzo_memops_TU2_struct lzo_memops_TU2; -#else -struct lzo_memops_TU2_struct { unsigned char a[2]; } __lzo_may_alias; -typedef struct lzo_memops_TU2_struct lzo_memops_TU2; -#endif -#ifndef lzo_memops_TU2p -#define lzo_memops_TU2p lzo_memops_TU2 * -#endif -#endif -#ifndef lzo_memops_TU4p -#if (LZO_OPT_UNALIGNED32) -typedef lzo_uint32_t __lzo_may_alias lzo_memops_TU4; -#define lzo_memops_TU4p volatile lzo_memops_TU4 __LZO_MMODEL * -#elif defined(__lzo_byte_struct) -__lzo_byte_struct(lzo_memops_TU4_struct,4) -typedef struct lzo_memops_TU4_struct lzo_memops_TU4; -#else -struct lzo_memops_TU4_struct { unsigned char a[4]; } __lzo_may_alias; -typedef struct lzo_memops_TU4_struct lzo_memops_TU4; -#endif -#ifndef lzo_memops_TU4p -#define lzo_memops_TU4p lzo_memops_TU4 __LZO_MMODEL * -#endif -#endif -#ifndef lzo_memops_TU8p -#if (LZO_OPT_UNALIGNED64) -typedef lzo_uint64_t __lzo_may_alias lzo_memops_TU8; -#define lzo_memops_TU8p volatile lzo_memops_TU8 __LZO_MMODEL * -#elif defined(__lzo_byte_struct) -__lzo_byte_struct(lzo_memops_TU8_struct,8) -typedef struct lzo_memops_TU8_struct lzo_memops_TU8; -#else -struct lzo_memops_TU8_struct { unsigned char a[8]; } __lzo_may_alias; -typedef struct lzo_memops_TU8_struct lzo_memops_TU8; -#endif -#ifndef lzo_memops_TU8p -#define lzo_memops_TU8p lzo_memops_TU8 __LZO_MMODEL * -#endif -#endif -#ifndef lzo_memops_set_TU1p -#define lzo_memops_set_TU1p volatile lzo_memops_TU1p -#endif -#ifndef lzo_memops_move_TU1p -#define lzo_memops_move_TU1p lzo_memops_TU1p -#endif -#define LZO_MEMOPS_SET1(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__1 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__1[0] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_SET2(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__2 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__2[0] = LZO_BYTE(cc); d__2[1] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_SET3(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__3 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__3[0] = LZO_BYTE(cc); d__3[1] = LZO_BYTE(cc); d__3[2] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_SET4(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__4 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__4[0] = LZO_BYTE(cc); d__4[1] = LZO_BYTE(cc); d__4[2] = LZO_BYTE(cc); d__4[3] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE1(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__1 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__1 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__1[0] = s__1[0]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE2(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__2 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__2 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__2[0] = s__2[0]; d__2[1] = s__2[1]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE3(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__3 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__3 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__3[0] = s__3[0]; d__3[1] = s__3[1]; d__3[2] = s__3[2]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE4(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__4 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__4 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__4[0] = s__4[0]; d__4[1] = s__4[1]; d__4[2] = s__4[2]; d__4[3] = s__4[3]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE8(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__8 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__8 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__8[0] = s__8[0]; d__8[1] = s__8[1]; d__8[2] = s__8[2]; d__8[3] = s__8[3]; \ - d__8[4] = s__8[4]; d__8[5] = s__8[5]; d__8[6] = s__8[6]; d__8[7] = s__8[7]; \ - LZO_BLOCK_END -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU1p)0)==1) -#define LZO_MEMOPS_COPY1(dd,ss) LZO_MEMOPS_MOVE1(dd,ss) -#if (LZO_OPT_UNALIGNED16) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) -#define LZO_MEMOPS_COPY2(dd,ss) \ - * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) -#elif defined(lzo_memops_tcheck__) -#define LZO_MEMOPS_COPY2(dd,ss) \ - LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU2,2,1)) { \ - * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss); \ - } else { LZO_MEMOPS_MOVE2(dd,ss); } LZO_BLOCK_END -#else -#define LZO_MEMOPS_COPY2(dd,ss) LZO_MEMOPS_MOVE2(dd,ss) -#endif -#if (LZO_OPT_UNALIGNED32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) -#define LZO_MEMOPS_COPY4(dd,ss) \ - * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) -#elif defined(lzo_memops_tcheck__) -#define LZO_MEMOPS_COPY4(dd,ss) \ - LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU4,4,1)) { \ - * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss); \ - } else { LZO_MEMOPS_MOVE4(dd,ss); } LZO_BLOCK_END -#else -#define LZO_MEMOPS_COPY4(dd,ss) LZO_MEMOPS_MOVE4(dd,ss) -#endif -#if (LZO_WORDSIZE != 8) -#define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN LZO_MEMOPS_COPY4(dd,ss); LZO_MEMOPS_COPY4((lzo_memops_TU1p)(lzo_memops_TU0p)(dd)+4,(const lzo_memops_TU1p)(const lzo_memops_TU0p)(ss)+4); LZO_BLOCK_END -#else -#if (LZO_OPT_UNALIGNED64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) -#define LZO_MEMOPS_COPY8(dd,ss) \ - * (lzo_memops_TU8p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss) -#elif (LZO_OPT_UNALIGNED32) -#define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN LZO_MEMOPS_COPY4(dd,ss); LZO_MEMOPS_COPY4((lzo_memops_TU1p)(lzo_memops_TU0p)(dd)+4,(const lzo_memops_TU1p)(const lzo_memops_TU0p)(ss)+4); LZO_BLOCK_END -#elif defined(lzo_memops_tcheck__) -#define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU8,8,1)) { \ - * (lzo_memops_TU8p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss); \ - } else { LZO_MEMOPS_MOVE8(dd,ss); } LZO_BLOCK_END -#else -#define LZO_MEMOPS_COPY8(dd,ss) LZO_MEMOPS_MOVE8(dd,ss) -#endif -#endif -#define LZO_MEMOPS_COPYN(dd,ss,nn) \ - LZO_BLOCK_BEGIN \ - lzo_memops_TU1p d__n = (lzo_memops_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_TU1p s__n = (const lzo_memops_TU1p) (const lzo_memops_TU0p) (ss); \ - lzo_uint n__n = (nn); \ - while ((void)0, n__n >= 8) { LZO_MEMOPS_COPY8(d__n, s__n); d__n += 8; s__n += 8; n__n -= 8; } \ - if ((void)0, n__n >= 4) { LZO_MEMOPS_COPY4(d__n, s__n); d__n += 4; s__n += 4; n__n -= 4; } \ - if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \ - LZO_BLOCK_END - -__lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss) -{ - lzo_uint16_t v; -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY2(&v, ss); -#elif (LZO_OPT_UNALIGNED16 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - const lzo_memops_TU2p s = (const lzo_memops_TU2p) ss; - unsigned long vv; - __asm__("lhbrx %0,0,%1" : "=r" (vv) : "r" (s), "m" (*s)); - v = (lzo_uint16_t) vv; -#else - const lzo_memops_TU1p s = (const lzo_memops_TU1p) ss; - v = (lzo_uint16_t) (((lzo_uint16_t)s[0]) | ((lzo_uint16_t)s[1] << 8)); -#endif - return v; -} -#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_LE16(ss) lzo_memops_get_le16(ss) -#endif - -__lzo_static_forceinline lzo_uint32_t lzo_memops_get_le32(const lzo_voidp ss) -{ - lzo_uint32_t v; -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY4(&v, ss); -#elif (LZO_OPT_UNALIGNED32 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - const lzo_memops_TU4p s = (const lzo_memops_TU4p) ss; - unsigned long vv; - __asm__("lwbrx %0,0,%1" : "=r" (vv) : "r" (s), "m" (*s)); - v = (lzo_uint32_t) vv; -#else - const lzo_memops_TU1p s = (const lzo_memops_TU1p) ss; - v = (lzo_uint32_t) (((lzo_uint32_t)s[0]) | ((lzo_uint32_t)s[1] << 8) | ((lzo_uint32_t)s[2] << 16) | ((lzo_uint32_t)s[3] << 24)); -#endif - return v; -} -#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_LE32(ss) lzo_memops_get_le32(ss) -#endif - -#if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) -#endif - -__lzo_static_forceinline lzo_uint16_t lzo_memops_get_ne16(const lzo_voidp ss) -{ - lzo_uint16_t v; - LZO_MEMOPS_COPY2(&v, ss); - return v; -} -#if (LZO_OPT_UNALIGNED16) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) -#define LZO_MEMOPS_GET_NE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_NE16(ss) lzo_memops_get_ne16(ss) -#endif - -__lzo_static_forceinline lzo_uint32_t lzo_memops_get_ne32(const lzo_voidp ss) -{ - lzo_uint32_t v; - LZO_MEMOPS_COPY4(&v, ss); - return v; -} -#if (LZO_OPT_UNALIGNED32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) -#define LZO_MEMOPS_GET_NE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_NE32(ss) lzo_memops_get_ne32(ss) -#endif - -#if (LZO_OPT_UNALIGNED64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) -#define LZO_MEMOPS_GET_NE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) -#endif - -__lzo_static_forceinline void lzo_memops_put_le16(lzo_voidp dd, lzo_uint16_t vv) -{ -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY2(dd, &vv); -#elif (LZO_OPT_UNALIGNED16 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - lzo_memops_TU2p d = (lzo_memops_TU2p) dd; - unsigned long v = vv; - __asm__("sthbrx %2,0,%1" : "=m" (*d) : "r" (d), "r" (v)); -#else - lzo_memops_TU1p d = (lzo_memops_TU1p) dd; - d[0] = LZO_BYTE((vv ) & 0xff); - d[1] = LZO_BYTE((vv >> 8) & 0xff); -#endif -} -#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_PUT_LE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_LE16(dd,vv) lzo_memops_put_le16(dd,vv) -#endif - -__lzo_static_forceinline void lzo_memops_put_le32(lzo_voidp dd, lzo_uint32_t vv) -{ -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY4(dd, &vv); -#elif (LZO_OPT_UNALIGNED32 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - lzo_memops_TU4p d = (lzo_memops_TU4p) dd; - unsigned long v = vv; - __asm__("stwbrx %2,0,%1" : "=m" (*d) : "r" (d), "r" (v)); -#else - lzo_memops_TU1p d = (lzo_memops_TU1p) dd; - d[0] = LZO_BYTE((vv ) & 0xff); - d[1] = LZO_BYTE((vv >> 8) & 0xff); - d[2] = LZO_BYTE((vv >> 16) & 0xff); - d[3] = LZO_BYTE((vv >> 24) & 0xff); -#endif -} -#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_PUT_LE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_LE32(dd,vv) lzo_memops_put_le32(dd,vv) -#endif - -__lzo_static_forceinline void lzo_memops_put_ne16(lzo_voidp dd, lzo_uint16_t vv) -{ - LZO_MEMOPS_COPY2(dd, &vv); -} -#if (LZO_OPT_UNALIGNED16) -#define LZO_MEMOPS_PUT_NE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_NE16(dd,vv) lzo_memops_put_ne16(dd,vv) -#endif - -__lzo_static_forceinline void lzo_memops_put_ne32(lzo_voidp dd, lzo_uint32_t vv) -{ - LZO_MEMOPS_COPY4(dd, &vv); -} -#if (LZO_OPT_UNALIGNED32) -#define LZO_MEMOPS_PUT_NE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_NE32(dd,vv) lzo_memops_put_ne32(dd,vv) -#endif - -lzo_unused_funcs_impl(void, lzo_memops_unused_funcs)(void) -{ - LZO_UNUSED_FUNC(lzo_memops_unused_funcs); - LZO_UNUSED_FUNC(lzo_memops_get_le16); - LZO_UNUSED_FUNC(lzo_memops_get_le32); - LZO_UNUSED_FUNC(lzo_memops_get_ne16); - LZO_UNUSED_FUNC(lzo_memops_get_ne32); - LZO_UNUSED_FUNC(lzo_memops_put_le16); - LZO_UNUSED_FUNC(lzo_memops_put_le32); - LZO_UNUSED_FUNC(lzo_memops_put_ne16); - LZO_UNUSED_FUNC(lzo_memops_put_ne32); -} - -#endif /* already included */ - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_mchw.ch b/tools/z64compress/src/enc/lzo/lzo_mchw.ch deleted file mode 100644 index 94bedc3d96..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_mchw.ch +++ /dev/null @@ -1,222 +0,0 @@ -/* lzo_mchw.ch -- matching functions using a window - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -/*********************************************************************** -// -************************************************************************/ - -typedef struct -{ - unsigned init; - - lzo_uint look; /* bytes in lookahead buffer */ - - lzo_uint m_len; - lzo_uint m_off; - - lzo_uint last_m_len; - lzo_uint last_m_off; - - const lzo_bytep bp; - const lzo_bytep ip; - const lzo_bytep in; - const lzo_bytep in_end; - lzo_bytep out; - - lzo_callback_p cb; - - lzo_uint textsize; /* text size counter */ - lzo_uint codesize; /* code size counter */ - lzo_uint printcount; /* counter for reporting progress every 1K bytes */ - - /* some stats */ - lzo_uint lit_bytes; - lzo_uint match_bytes; - lzo_uint rep_bytes; - lzo_uint lazy; - -#if defined(LZO1B) - lzo_uint r1_m_len; - - /* some stats */ - lzo_uint r1_r, m3_r, m2_m, m3_m; -#endif - -#if defined(LZO1C) - lzo_uint r1_m_len; - lzo_bytep m3; - - /* some stats */ - lzo_uint r1_r, m3_r, m2_m, m3_m; -#endif - -#if defined(LZO1F) - lzo_uint r1_lit; - lzo_uint r1_m_len; - - /* some stats */ - lzo_uint r1_r, m2_m, m3_m; -#endif - -#if defined(LZO1X) || defined(LZO1Y) || defined(LZO1Z) - lzo_uint r1_lit; - lzo_uint r1_m_len; - - /* some stats */ - lzo_uint m1a_m, m1b_m, m2_m, m3_m, m4_m; - lzo_uint lit1_r, lit2_r, lit3_r; -#endif - -#if defined(LZO2A) - /* some stats */ - lzo_uint m1, m2, m3, m4; -#endif -} -LZO_COMPRESS_T; - - -#define getbyte(c) ((c).ip < (c).in_end ? *((c).ip)++ : (-1)) - -#include "lzo_swd.ch" - - -/*********************************************************************** -// -************************************************************************/ - -static int -init_match ( LZO_COMPRESS_T *c, lzo_swd_p s, - const lzo_bytep dict, lzo_uint dict_len, - lzo_uint32_t flags ) -{ - int r; - - assert(!c->init); - c->init = 1; - - s->c = c; - - c->last_m_len = c->last_m_off = 0; - - c->textsize = c->codesize = c->printcount = 0; - c->lit_bytes = c->match_bytes = c->rep_bytes = 0; - c->lazy = 0; - - r = swd_init(s,dict,dict_len); - if (r != LZO_E_OK) - { - swd_exit(s); - return r; - } - - s->use_best_off = (flags & 1) ? 1 : 0; - return LZO_E_OK; -} - - -/*********************************************************************** -// -************************************************************************/ - -static int -find_match ( LZO_COMPRESS_T *c, lzo_swd_p s, - lzo_uint this_len, lzo_uint skip ) -{ - assert(c->init); - - if (skip > 0) - { - assert(this_len >= skip); - swd_accept(s, this_len - skip); - c->textsize += this_len - skip + 1; - } - else - { - assert(this_len <= 1); - c->textsize += this_len - skip; - } - - s->m_len = SWD_THRESHOLD; - s->m_off = 0; -#ifdef SWD_BEST_OFF - if (s->use_best_off) - lzo_memset(s->best_pos,0,sizeof(s->best_pos)); -#endif - swd_findbest(s); - c->m_len = s->m_len; - c->m_off = s->m_off; - - swd_getbyte(s); - - if (s->b_char < 0) - { - c->look = 0; - c->m_len = 0; - swd_exit(s); - } - else - { - c->look = s->look + 1; - } - c->bp = c->ip - c->look; - -#if 0 - /* brute force match search */ - if (c->m_len > SWD_THRESHOLD && c->m_len + 1 <= c->look) - { - const lzo_bytep ip = c->bp; - const lzo_bytep m = c->bp - c->m_off; - const lzo_bytep in = c->in; - - if (ip - in > s->swd_n) - in = ip - s->swd_n; - for (;;) - { - while (*in != *ip) - in++; - if (in == ip) - break; - if (in != m) - if (lzo_memcmp(in,ip,c->m_len+1) == 0) - printf("%p %p %p %5d\n",in,ip,m,c->m_len); - in++; - } - } -#endif - - if (c->cb && c->cb->nprogress && c->textsize > c->printcount) - { - (*c->cb->nprogress)(c->cb, c->textsize, c->codesize, 0); - c->printcount += 1024; - } - - return LZO_E_OK; -} - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_ptr.c b/tools/z64compress/src/enc/lzo/lzo_ptr.c deleted file mode 100644 index d2def7f637..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_ptr.c +++ /dev/null @@ -1,80 +0,0 @@ -/* lzo_ptr.c -- low-level pointer constructs - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "lzo_conf.h" - - -/*********************************************************************** -// -************************************************************************/ - -LZO_PUBLIC(lzo_uintptr_t) -__lzo_ptr_linear(const lzo_voidp ptr) -{ - lzo_uintptr_t p; - -#if (LZO_ARCH_I086) -#error "LZO_ARCH_I086 is unsupported" -#elif (LZO_MM_PVP) -#error "LZO_MM_PVP is unsupported" -#else - p = (lzo_uintptr_t) PTR_LINEAR(ptr); -#endif - - return p; -} - - -/*********************************************************************** -// -************************************************************************/ - -LZO_PUBLIC(unsigned) -__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) -{ -#if (__LZO_UINTPTR_T_IS_POINTER) -#error "__LZO_UINTPTR_T_IS_POINTER is unsupported" -#else - lzo_uintptr_t p, n; - if (size < 2) return 0; - p = __lzo_ptr_linear(ptr); -#if 0 - n = (((p + size - 1) / size) * size) - p; -#else - if ((size & (size - 1)) != 0) - return 0; - n = size; n = ((p + n - 1) & ~(n - 1)) - p; -#endif -#endif - assert((long)n >= 0); - assert(n <= size); - return (unsigned)n; -} - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_ptr.h b/tools/z64compress/src/enc/lzo/lzo_ptr.h deleted file mode 100644 index 8d7ee44835..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_ptr.h +++ /dev/null @@ -1,123 +0,0 @@ -/* lzo_ptr.h -- low-level pointer constructs - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the library and is subject - to change. - */ - - -#ifndef __LZO_PTR_H -#define __LZO_PTR_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - - -/*********************************************************************** -// -************************************************************************/ - -/* Always use the safe (=integral) version for pointer-comparisons. - * The compiler should optimize away the additional casts anyway. - * - * Note that this only works if the representation and ordering - * of the pointer and the integral is the same (at bit level). - */ - -#if (LZO_ARCH_I086) -#error "LZO_ARCH_I086 is unsupported" -#elif (LZO_MM_PVP) -#error "LZO_MM_PVP is unsupported" -#else -#define PTR(a) ((lzo_uintptr_t) (a)) -#define PTR_LINEAR(a) PTR(a) -#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) -#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) -#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) -#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) -#endif - -#define PTR_LT(a,b) (PTR(a) < PTR(b)) -#define PTR_GE(a,b) (PTR(a) >= PTR(b)) -#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) -#define pd(a,b) ((lzo_uint) ((a)-(b))) - - -LZO_EXTERN(lzo_uintptr_t) -__lzo_ptr_linear(const lzo_voidp ptr); - - -typedef union -{ - char a_char; - unsigned char a_uchar; - short a_short; - unsigned short a_ushort; - int a_int; - unsigned int a_uint; - long a_long; - unsigned long a_ulong; - lzo_int a_lzo_int; - lzo_uint a_lzo_uint; - lzo_xint a_lzo_xint; - lzo_int16_t a_lzo_int16_t; - lzo_uint16_t a_lzo_uint16_t; - lzo_int32_t a_lzo_int32_t; - lzo_uint32_t a_lzo_uint32_t; -#if defined(lzo_uint64_t) - lzo_int64_t a_lzo_int64_t; - lzo_uint64_t a_lzo_uint64_t; -#endif - size_t a_size_t; - ptrdiff_t a_ptrdiff_t; - lzo_uintptr_t a_lzo_uintptr_t; - void * a_void_p; - char * a_char_p; - unsigned char * a_uchar_p; - const void * a_c_void_p; - const char * a_c_char_p; - const unsigned char * a_c_uchar_p; - lzo_voidp a_lzo_voidp; - lzo_bytep a_lzo_bytep; - const lzo_voidp a_c_lzo_voidp; - const lzo_bytep a_c_lzo_bytep; -} -lzo_full_align_t; - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_supp.h b/tools/z64compress/src/enc/lzo/lzo_supp.h deleted file mode 100644 index a2c90210d8..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_supp.h +++ /dev/null @@ -1,3678 +0,0 @@ -/* lzo_supp.h -- architecture, OS and compiler specific defines - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZO_SUPP_H_INCLUDED -#define __LZO_SUPP_H_INCLUDED 1 -#if (LZO_CFG_NO_CONFIG_HEADER) -#elif defined(LZO_CFG_CONFIG_HEADER) -#else -#if !(LZO_CFG_AUTO_NO_HEADERS) -#if (LZO_LIBC_NAKED) -#elif (LZO_LIBC_FREESTANDING) -# define HAVE_LIMITS_H 1 -# define HAVE_STDARG_H 1 -# define HAVE_STDDEF_H 1 -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# define HAVE_LIMITS_H 1 -# define HAVE_SETJMP_H 1 -# define HAVE_STDARG_H 1 -# define HAVE_STDDEF_H 1 -# define HAVE_STDIO_H 1 -# define HAVE_STRING_H 1 -#else -#define STDC_HEADERS 1 -#define HAVE_ASSERT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_DIRENT_H 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_SETJMP_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDIO_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_TIME_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UTIME_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#if (LZO_OS_POSIX) -# if (LZO_OS_POSIX_AIX) -# define HAVE_SYS_RESOURCE_H 1 -# elif (LZO_OS_POSIX_DARWIN || LZO_OS_POSIX_FREEBSD || LZO_OS_POSIX_NETBSD || LZO_OS_POSIX_OPENBSD) -# define HAVE_STRINGS_H 1 -# undef HAVE_MALLOC_H -# elif (LZO_OS_POSIX_HPUX || LZO_OS_POSIX_INTERIX) -# define HAVE_ALLOCA_H 1 -# elif (LZO_OS_POSIX_DARWIN && LZO_LIBC_MSL) -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -# elif (LZO_OS_POSIX_SOLARIS || LZO_OS_POSIX_SUNOS) -# define HAVE_ALLOCA_H 1 -# endif -# if (LZO_LIBC_DIETLIBC || LZO_LIBC_GLIBC || LZO_LIBC_UCLIBC) -# define HAVE_STRINGS_H 1 -# define HAVE_SYS_MMAN_H 1 -# define HAVE_SYS_RESOURCE_H 1 -# define HAVE_SYS_WAIT_H 1 -# endif -# if (LZO_LIBC_NEWLIB) -# undef HAVE_STRINGS_H -# endif -#elif (LZO_OS_CYGWIN) -# define HAVE_IO_H 1 -#elif (LZO_OS_EMX) -# define HAVE_ALLOCA_H 1 -# define HAVE_IO_H 1 -#elif (LZO_ARCH_M68K && LZO_OS_TOS && LZO_CC_GNUC) -# if !defined(__MINT__) -# undef HAVE_MALLOC_H -# endif -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# undef HAVE_DIRENT_H -# undef HAVE_FCNTL_H -# undef HAVE_MALLOC_H -# undef HAVE_MEMORY_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_STAT_H -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -#endif -#if (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) -#define HAVE_CONIO_H 1 -#define HAVE_DIRECT_H 1 -#define HAVE_DOS_H 1 -#define HAVE_IO_H 1 -#define HAVE_SHARE_H 1 -#if (LZO_CC_AZTECC) -# undef HAVE_CONIO_H -# undef HAVE_DIRECT_H -# undef HAVE_DIRENT_H -# undef HAVE_MALLOC_H -# undef HAVE_SHARE_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_STAT_H -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -#elif (LZO_CC_BORLANDC) -# undef HAVE_UNISTD_H -# undef HAVE_SYS_TIME_H -# if (LZO_OS_WIN32 || LZO_OS_WIN64) -# undef HAVE_DIRENT_H -# endif -# if (__BORLANDC__ < 0x0400) -# undef HAVE_DIRENT_H -# undef HAVE_UTIME_H -# endif -#elif (LZO_CC_DMC) -# undef HAVE_DIRENT_H -# undef HAVE_UNISTD_H -# define HAVE_SYS_DIRENT_H 1 -#elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) -#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) -# define HAVE_ALLOCA_H 1 -# undef HAVE_DIRENT_H -# undef HAVE_UNISTD_H -#elif (LZO_CC_IBMC && LZO_OS_OS2) -# undef HAVE_DOS_H -# undef HAVE_DIRENT_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -# define HAVE_SYS_UTIME_H 1 -#elif (LZO_CC_CLANG_C2 || LZO_CC_CLANG_MSC || LZO_CC_GHS || LZO_CC_INTELC_MSC || LZO_CC_MSC) -# undef HAVE_DIRENT_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -# define HAVE_SYS_UTIME_H 1 -#elif (LZO_CC_LCCWIN32) -# undef HAVE_DIRENT_H -# undef HAVE_DOS_H -# undef HAVE_UNISTD_H -# undef HAVE_SYS_TIME_H -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__MINGW32__) -# undef HAVE_UTIME_H -# define HAVE_SYS_UTIME_H 1 -#elif (LZO_OS_WIN32 && LZO_LIBC_MSL) -# define HAVE_ALLOCA_H 1 -# undef HAVE_DOS_H -# undef HAVE_SHARE_H -# undef HAVE_SYS_TIME_H -#elif (LZO_CC_NDPC) -# undef HAVE_DIRENT_H -# undef HAVE_DOS_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -#elif (LZO_CC_PACIFICC) -# undef HAVE_DIRECT_H -# undef HAVE_DIRENT_H -# undef HAVE_FCNTL_H -# undef HAVE_IO_H -# undef HAVE_MALLOC_H -# undef HAVE_MEMORY_H -# undef HAVE_SHARE_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_STAT_H -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -#elif (LZO_OS_WIN32 && LZO_CC_PELLESC) -# undef HAVE_DIRENT_H -# undef HAVE_DOS_H -# undef HAVE_MALLOC_H -# undef HAVE_SHARE_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -# if (__POCC__ < 280) -# else -# define HAVE_SYS_UTIME_H 1 -# endif -#elif (LZO_OS_WIN32 && LZO_CC_PGI) && defined(__MINGW32__) -# undef HAVE_UTIME_H -# define HAVE_SYS_UTIME_H 1 -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) -#elif (LZO_CC_SYMANTECC) -# undef HAVE_DIRENT_H -# undef HAVE_UNISTD_H -# if (__SC__ < 0x700) -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -# endif -#elif (LZO_CC_TOPSPEEDC) -# undef HAVE_DIRENT_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_STAT_H -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -#elif (LZO_CC_TURBOC) -# undef HAVE_UNISTD_H -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -# if (LZO_OS_WIN32 || LZO_OS_WIN64) -# undef HAVE_DIRENT_H -# endif -# if (__TURBOC__ < 0x0200) -# undef HAVE_SIGNAL_H -# endif -# if (__TURBOC__ < 0x0400) -# undef HAVE_DIRECT_H -# undef HAVE_DIRENT_H -# undef HAVE_MALLOC_H -# undef HAVE_MEMORY_H -# undef HAVE_UTIME_H -# endif -#elif (LZO_CC_WATCOMC) -# undef HAVE_DIRENT_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -# define HAVE_SYS_UTIME_H 1 -# if (__WATCOMC__ < 950) -# undef HAVE_UNISTD_H -# endif -#elif (LZO_CC_ZORTECHC) -# undef HAVE_DIRENT_H -# undef HAVE_MEMORY_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_TIME_H -#endif -#endif -#if (LZO_OS_CONSOLE) -# undef HAVE_DIRENT_H -#endif -#if (LZO_OS_EMBEDDED) -# undef HAVE_DIRENT_H -#endif -#if (LZO_LIBC_ISOC90 || LZO_LIBC_ISOC99) -# undef HAVE_DIRENT_H -# undef HAVE_FCNTL_H -# undef HAVE_MALLOC_H -# undef HAVE_UNISTD_H -# undef HAVE_UTIME_H -# undef HAVE_SYS_STAT_H -# undef HAVE_SYS_TIME_H -# undef HAVE_SYS_TYPES_H -#endif -#if (LZO_LIBC_GLIBC >= 0x020100ul) -# define HAVE_STDINT_H 1 -#elif (LZO_LIBC_DIETLIBC) -# undef HAVE_STDINT_H -#elif (LZO_LIBC_UCLIBC) -# define HAVE_STDINT_H 1 -#elif (LZO_CC_BORLANDC) && (__BORLANDC__ >= 0x560) -# undef HAVE_STDINT_H -#elif (LZO_CC_DMC) && (__DMC__ >= 0x825) -# define HAVE_STDINT_H 1 -#endif -#if (HAVE_SYS_TIME_H && HAVE_TIME_H) -# define TIME_WITH_SYS_TIME 1 -#endif -#endif -#endif -#if !(LZO_CFG_AUTO_NO_FUNCTIONS) -#if (LZO_LIBC_NAKED) -#elif (LZO_LIBC_FREESTANDING) -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# define HAVE_LONGJMP 1 -# define HAVE_MEMCMP 1 -# define HAVE_MEMCPY 1 -# define HAVE_MEMMOVE 1 -# define HAVE_MEMSET 1 -# define HAVE_SETJMP 1 -#else -#define HAVE_ACCESS 1 -#define HAVE_ALLOCA 1 -#define HAVE_ATEXIT 1 -#define HAVE_ATOI 1 -#define HAVE_ATOL 1 -#define HAVE_CHMOD 1 -#define HAVE_CHOWN 1 -#define HAVE_CTIME 1 -#define HAVE_DIFFTIME 1 -#define HAVE_FILENO 1 -#define HAVE_FSTAT 1 -#define HAVE_GETENV 1 -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_GMTIME 1 -#define HAVE_ISATTY 1 -#define HAVE_LOCALTIME 1 -#define HAVE_LONGJMP 1 -#define HAVE_LSTAT 1 -#define HAVE_MEMCMP 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMSET 1 -#define HAVE_MKDIR 1 -#define HAVE_MKTIME 1 -#define HAVE_QSORT 1 -#define HAVE_RAISE 1 -#define HAVE_RMDIR 1 -#define HAVE_SETJMP 1 -#define HAVE_SIGNAL 1 -#define HAVE_SNPRINTF 1 -#define HAVE_STAT 1 -#define HAVE_STRCHR 1 -#define HAVE_STRDUP 1 -#define HAVE_STRERROR 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_TIME 1 -#define HAVE_UMASK 1 -#define HAVE_UTIME 1 -#define HAVE_VSNPRINTF 1 -#if (LZO_OS_BEOS || LZO_OS_CYGWIN || LZO_OS_POSIX || LZO_OS_QNX || LZO_OS_VMS) -# define HAVE_STRCASECMP 1 -# define HAVE_STRNCASECMP 1 -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) -# define HAVE_STRCASECMP 1 -# define HAVE_STRNCASECMP 1 -#else -# define HAVE_STRICMP 1 -# define HAVE_STRNICMP 1 -#endif -#if (LZO_OS_POSIX) -# if (LZO_OS_POSIX_AIX) -# define HAVE_GETRUSAGE 1 -# elif (LZO_OS_POSIX_DARWIN && LZO_LIBC_MSL) -# undef HAVE_CHOWN -# undef HAVE_LSTAT -# elif (LZO_OS_POSIX_UNICOS) -# undef HAVE_ALLOCA -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# endif -# if (LZO_CC_TINYC) -# undef HAVE_ALLOCA -# endif -# if (LZO_LIBC_DIETLIBC || LZO_LIBC_GLIBC || LZO_LIBC_UCLIBC) -# define HAVE_GETRUSAGE 1 -# define HAVE_GETPAGESIZE 1 -# define HAVE_MMAP 1 -# define HAVE_MPROTECT 1 -# define HAVE_MUNMAP 1 -# endif -#elif (LZO_OS_CYGWIN) -# if (LZO_CC_GNUC < 0x025a00ul) -# undef HAVE_GETTIMEOFDAY -# undef HAVE_LSTAT -# endif -# if (LZO_CC_GNUC < 0x025f00ul) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# endif -#elif (LZO_OS_EMX) -# undef HAVE_CHOWN -# undef HAVE_LSTAT -#elif (LZO_ARCH_M68K && LZO_OS_TOS && LZO_CC_GNUC) -# if !defined(__MINT__) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# endif -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# undef HAVE_ALLOCA -# undef HAVE_ACCESS -# undef HAVE_CHMOD -# undef HAVE_CHOWN -# undef HAVE_FSTAT -# undef HAVE_GETTIMEOFDAY -# undef HAVE_LSTAT -# undef HAVE_SNPRINTF -# undef HAVE_UMASK -# undef HAVE_UTIME -# undef HAVE_VSNPRINTF -#endif -#if (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) -#undef HAVE_CHOWN -#undef HAVE_GETTIMEOFDAY -#undef HAVE_LSTAT -#undef HAVE_UMASK -#if (LZO_CC_AZTECC) -# undef HAVE_ALLOCA -# undef HAVE_DIFFTIME -# undef HAVE_FSTAT -# undef HAVE_STRDUP -# undef HAVE_SNPRINTF -# undef HAVE_UTIME -# undef HAVE_VSNPRINTF -#elif (LZO_CC_BORLANDC) -# if (__BORLANDC__ < 0x0400) -# undef HAVE_ALLOCA -# undef HAVE_UTIME -# endif -# if ((__BORLANDC__ < 0x0410) && LZO_OS_WIN16) -# undef HAVE_ALLOCA -# endif -# if (__BORLANDC__ < 0x0550) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# endif -#elif (LZO_CC_DMC) -# if (LZO_OS_WIN16) -# undef HAVE_ALLOCA -# endif -# define snprintf _snprintf -# define vsnprintf _vsnprintf -#elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -#elif (LZO_CC_GHS) -# undef HAVE_ALLOCA -# ifndef snprintf -# define snprintf _snprintf -# endif -# ifndef vsnprintf -# define vsnprintf _vsnprintf -# endif -#elif (LZO_CC_IBMC) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -#elif (LZO_CC_CLANG_MSC || LZO_CC_INTELC_MSC) -# ifndef snprintf -# define snprintf _snprintf -# endif -# ifndef vsnprintf -# define vsnprintf _vsnprintf -# endif -#elif (LZO_CC_LCCWIN32) -# define utime _utime -#elif (LZO_CC_CLANG_C2 || LZO_CC_MSC) -# if (_MSC_VER < 600) -# undef HAVE_STRFTIME -# endif -# if (_MSC_VER < 700) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# elif (_MSC_VER < 1500) -# ifndef snprintf -# define snprintf _snprintf -# endif -# ifndef vsnprintf -# define vsnprintf _vsnprintf -# endif -# elif (_MSC_VER < 1900) -# ifndef snprintf -# define snprintf _snprintf -# endif -# endif -# if ((_MSC_VER < 800) && LZO_OS_WIN16) -# undef HAVE_ALLOCA -# endif -# if (LZO_ARCH_I086) && defined(__cplusplus) -# undef HAVE_LONGJMP -# undef HAVE_SETJMP -# endif -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__MINGW32__) -# if (LZO_CC_GNUC < 0x025f00ul) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# else -# define snprintf _snprintf -# define vsnprintf _vsnprintf -# endif -#elif (LZO_OS_WIN32 && LZO_LIBC_MSL) -# if (__MSL__ < 0x8000ul) -# undef HAVE_CHMOD -# endif -#elif (LZO_CC_NDPC) -# undef HAVE_ALLOCA -# undef HAVE_SNPRINTF -# undef HAVE_STRNICMP -# undef HAVE_UTIME -# undef HAVE_VSNPRINTF -# if defined(__cplusplus) -# undef HAVE_STAT -# endif -#elif (LZO_CC_PACIFICC) -# undef HAVE_ACCESS -# undef HAVE_ALLOCA -# undef HAVE_CHMOD -# undef HAVE_DIFFTIME -# undef HAVE_FSTAT -# undef HAVE_MKTIME -# undef HAVE_RAISE -# undef HAVE_SNPRINTF -# undef HAVE_STRFTIME -# undef HAVE_UTIME -# undef HAVE_VSNPRINTF -#elif (LZO_OS_WIN32 && LZO_CC_PELLESC) -# if (__POCC__ < 280) -# define alloca _alloca -# undef HAVE_UTIME -# endif -#elif (LZO_OS_WIN32 && LZO_CC_PGI) && defined(__MINGW32__) -# define snprintf _snprintf -# define vsnprintf _vsnprintf -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -#elif (LZO_CC_SYMANTECC) -# if (LZO_OS_WIN16 && (LZO_MM_MEDIUM || LZO_MM_LARGE || LZO_MM_HUGE)) -# undef HAVE_ALLOCA -# endif -# if (__SC__ < 0x600) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# else -# define snprintf _snprintf -# define vsnprintf _vsnprintf -# endif -# if (__SC__ < 0x700) -# undef HAVE_DIFFTIME -# undef HAVE_UTIME -# endif -#elif (LZO_CC_TOPSPEEDC) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -#elif (LZO_CC_TURBOC) -# undef HAVE_ALLOCA -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# if (__TURBOC__ < 0x0200) -# undef HAVE_RAISE -# undef HAVE_SIGNAL -# endif -# if (__TURBOC__ < 0x0295) -# undef HAVE_MKTIME -# undef HAVE_STRFTIME -# endif -# if (__TURBOC__ < 0x0400) -# undef HAVE_UTIME -# endif -#elif (LZO_CC_WATCOMC) -# if (__WATCOMC__ < 1100) -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# elif (__WATCOMC__ < 1200) -# define snprintf _snprintf -# define vsnprintf _vsnprintf -# endif -#elif (LZO_CC_ZORTECHC) -# if (LZO_OS_WIN16 && (LZO_MM_MEDIUM || LZO_MM_LARGE || LZO_MM_HUGE)) -# undef HAVE_ALLOCA -# endif -# undef HAVE_DIFFTIME -# undef HAVE_SNPRINTF -# undef HAVE_UTIME -# undef HAVE_VSNPRINTF -#endif -#endif -#if (LZO_OS_CONSOLE) -# undef HAVE_ACCESS -# undef HAVE_CHMOD -# undef HAVE_CHOWN -# undef HAVE_GETTIMEOFDAY -# undef HAVE_LSTAT -# undef HAVE_TIME -# undef HAVE_UMASK -# undef HAVE_UTIME -#endif -#if (LZO_LIBC_ISOC90 || LZO_LIBC_ISOC99) -# undef HAVE_ACCESS -# undef HAVE_CHMOD -# undef HAVE_CHOWN -# undef HAVE_FILENO -# undef HAVE_FSTAT -# undef HAVE_GETTIMEOFDAY -# undef HAVE_LSTAT -# undef HAVE_STAT -# undef HAVE_UMASK -# undef HAVE_UTIME -# if 1 -# undef HAVE_ALLOCA -# undef HAVE_ISATTY -# undef HAVE_MKDIR -# undef HAVE_RMDIR -# undef HAVE_STRDUP -# undef HAVE_STRICMP -# undef HAVE_STRNICMP -# endif -#endif -#endif -#endif -#if !(LZO_CFG_AUTO_NO_SIZES) -#if !defined(SIZEOF_SHORT) && defined(LZO_SIZEOF_SHORT) -# define SIZEOF_SHORT LZO_SIZEOF_SHORT -#endif -#if !defined(SIZEOF_INT) && defined(LZO_SIZEOF_INT) -# define SIZEOF_INT LZO_SIZEOF_INT -#endif -#if !defined(SIZEOF_LONG) && defined(LZO_SIZEOF_LONG) -# define SIZEOF_LONG LZO_SIZEOF_LONG -#endif -#if !defined(SIZEOF_LONG_LONG) && defined(LZO_SIZEOF_LONG_LONG) -# define SIZEOF_LONG_LONG LZO_SIZEOF_LONG_LONG -#endif -#if !defined(SIZEOF___INT32) && defined(LZO_SIZEOF___INT32) -# define SIZEOF___INT32 LZO_SIZEOF___INT32 -#endif -#if !defined(SIZEOF___INT64) && defined(LZO_SIZEOF___INT64) -# define SIZEOF___INT64 LZO_SIZEOF___INT64 -#endif -#if !defined(SIZEOF_VOID_P) && defined(LZO_SIZEOF_VOID_P) -# define SIZEOF_VOID_P LZO_SIZEOF_VOID_P -#endif -#if !defined(SIZEOF_SIZE_T) && defined(LZO_SIZEOF_SIZE_T) -# define SIZEOF_SIZE_T LZO_SIZEOF_SIZE_T -#endif -#if !defined(SIZEOF_PTRDIFF_T) && defined(LZO_SIZEOF_PTRDIFF_T) -# define SIZEOF_PTRDIFF_T LZO_SIZEOF_PTRDIFF_T -#endif -#endif -#if (HAVE_SIGNAL) && !defined(RETSIGTYPE) -# define RETSIGTYPE void -#endif -#endif -#if !(LZO_CFG_SKIP_LZO_TYPES) -#if 1 && !defined(lzo_signo_t) && defined(__linux__) && defined(__dietlibc__) && (LZO_SIZEOF_INT != 4) -# define lzo_signo_t lzo_int32e_t -#endif -#if !defined(lzo_signo_t) -# define lzo_signo_t int -#endif -#if defined(__cplusplus) -extern "C" { -#endif -#if (LZO_BROKEN_CDECL_ALT_SYNTAX) -typedef void __lzo_cdecl_sighandler (*lzo_sighandler_t)(lzo_signo_t); -#else -typedef void (__lzo_cdecl_sighandler *lzo_sighandler_t)(lzo_signo_t); -#endif -#if defined(__cplusplus) -} -#endif -#endif -#endif -#if defined(LZO_WANT_ACC_INCD_H) -# undef LZO_WANT_ACC_INCD_H -#ifndef __LZO_INCD_H_INCLUDED -#define __LZO_INCD_H_INCLUDED 1 -#if (LZO_LIBC_NAKED) -#ifndef __LZO_FALLBACK_STDDEF_H_INCLUDED -#define __LZO_FALLBACK_STDDEF_H_INCLUDED 1 -#if defined(__PTRDIFF_TYPE__) -typedef __PTRDIFF_TYPE__ lzo_fallback_ptrdiff_t; -#elif defined(__MIPS_PSX2__) -typedef int lzo_fallback_ptrdiff_t; -#else -typedef long lzo_fallback_ptrdiff_t; -#endif -#if defined(__SIZE_TYPE__) -typedef __SIZE_TYPE__ lzo_fallback_size_t; -#elif defined(__MIPS_PSX2__) -typedef unsigned int lzo_fallback_size_t; -#else -typedef unsigned long lzo_fallback_size_t; -#endif -#if !defined(ptrdiff_t) -typedef lzo_fallback_ptrdiff_t ptrdiff_t; -#ifndef _PTRDIFF_T_DEFINED -#define _PTRDIFF_T_DEFINED 1 -#endif -#endif -#if !defined(size_t) -typedef lzo_fallback_size_t size_t; -#ifndef _SIZE_T_DEFINED -#define _SIZE_T_DEFINED 1 -#endif -#endif -#if !defined(__cplusplus) && !defined(wchar_t) -typedef unsigned short wchar_t; -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED 1 -#endif -#endif -#ifndef NULL -#if defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ >= 4) -#define NULL __null -#elif defined(__cplusplus) -#define NULL 0 -#else -#define NULL ((void*)0) -#endif -#endif -#ifndef offsetof -#define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m))) -#endif -#endif -#elif (LZO_LIBC_FREESTANDING) -# if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0) -# include -# endif -# if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0) -# include -# endif -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# if defined(HAVE_STDIO_H) && (HAVE_STDIO_H+0) -# include -# endif -# if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0) -# include -# endif -# if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0) -# include -# endif -#else -#include -#if defined(HAVE_TIME_H) && (HAVE_TIME_H+0) && defined(__MSL__) && defined(__cplusplus) -# include -#endif -#if defined(HAVE_SYS_TYPES_H) && (HAVE_SYS_TYPES_H+0) -# include -#endif -#if defined(HAVE_SYS_STAT_H) && (HAVE_SYS_STAT_H+0) -# include -#endif -#if defined(STDC_HEADERS) && (STDC_HEADERS+0) -# include -#elif defined(HAVE_STDLIB_H) && (HAVE_STDLIB_H+0) -# include -#endif -#include -#if defined(HAVE_STRING_H) && (HAVE_STRING_H+0) -# if defined(STDC_HEADERS) && (STDC_HEADERS+0) -# elif defined(HAVE_MEMORY_H) && (HAVE_MEMORY_H+0) -# include -# endif -# include -#endif -#if defined(HAVE_STRINGS_H) && (HAVE_STRINGS_H+0) -# include -#endif -#if defined(HAVE_INTTYPES_H) && (HAVE_INTTYPES_H+0) -# include -#endif -#if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0) -# include -#endif -#if defined(HAVE_UNISTD_H) && (HAVE_UNISTD_H+0) -# include -#endif -#endif -#endif -#endif -#if defined(LZO_WANT_ACC_INCE_H) -# undef LZO_WANT_ACC_INCE_H -#ifndef __LZO_INCE_H_INCLUDED -#define __LZO_INCE_H_INCLUDED 1 -#if (LZO_LIBC_NAKED) -#elif (LZO_LIBC_FREESTANDING) -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# if (HAVE_SETJMP_H) -# include -# endif -#else -#if (HAVE_STDARG_H) -# include -#endif -#if (HAVE_CTYPE_H) -# include -#endif -#if (HAVE_ERRNO_H) -# include -#endif -#if (HAVE_MALLOC_H) -# include -#endif -#if (HAVE_ALLOCA_H) -# include -#endif -#if (HAVE_FCNTL_H) -# include -#endif -#if (HAVE_DIRENT_H) -# include -#endif -#if (HAVE_SETJMP_H) -# include -#endif -#if (HAVE_SIGNAL_H) -# include -#endif -#if (HAVE_SYS_TIME_H && HAVE_TIME_H) -# include -# include -#elif (HAVE_TIME_H) -# include -#endif -#if (HAVE_UTIME_H) -# include -#elif (HAVE_SYS_UTIME_H) -# include -#endif -#if (HAVE_IO_H) -# include -#endif -#if (HAVE_DOS_H) -# include -#endif -#if (HAVE_DIRECT_H) -# include -#endif -#if (HAVE_SHARE_H) -# include -#endif -#if (LZO_CC_NDPC) -# include -#endif -#if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__)) -# include -#endif -#endif -#endif -#endif -#if defined(LZO_WANT_ACC_INCI_H) -# undef LZO_WANT_ACC_INCI_H -#ifndef __LZO_INCI_H_INCLUDED -#define __LZO_INCI_H_INCLUDED 1 -#if (LZO_LIBC_NAKED) -#elif (LZO_LIBC_FREESTANDING) -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -#else -#if (LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# include -#elif (LZO_HAVE_WINDOWS_H) -# if 1 && !defined(WIN32_LEAN_AND_MEAN) -# define WIN32_LEAN_AND_MEAN 1 -# endif -# if 1 && !defined(_WIN32_WINNT) -# define _WIN32_WINNT 0x0400 -# endif -# include -# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) -# include -# endif -#elif (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_WIN16) -# if (LZO_CC_AZTECC) -# include -# include -# elif (LZO_CC_BORLANDC || LZO_CC_TURBOC) -# include -# include -# elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) -# include -# elif (LZO_CC_PACIFICC) -# include -# include -# include -# elif (LZO_CC_WATCOMC) -# include -# endif -#elif (LZO_OS_OS216) -# if (LZO_CC_WATCOMC) -# include -# endif -#endif -#if (HAVE_SYS_MMAN_H) -# include -#endif -#if (HAVE_SYS_RESOURCE_H) -# include -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# if defined(FP_OFF) -# define LZO_PTR_FP_OFF(x) FP_OFF(x) -# elif defined(_FP_OFF) -# define LZO_PTR_FP_OFF(x) _FP_OFF(x) -# else -# define LZO_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) -# endif -# if defined(FP_SEG) -# define LZO_PTR_FP_SEG(x) FP_SEG(x) -# elif defined(_FP_SEG) -# define LZO_PTR_FP_SEG(x) _FP_SEG(x) -# else -# define LZO_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) -# endif -# if defined(MK_FP) -# define LZO_PTR_MK_FP(s,o) MK_FP(s,o) -# elif defined(_MK_FP) -# define LZO_PTR_MK_FP(s,o) _MK_FP(s,o) -# else -# define LZO_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) -# endif -# if 0 -# undef LZO_PTR_FP_OFF -# undef LZO_PTR_FP_SEG -# undef LZO_PTR_MK_FP -# define LZO_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) -# define LZO_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) -# define LZO_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) -# endif -#endif -#endif -#endif -#endif -#if defined(LZO_WANT_ACC_LIB_H) -# undef LZO_WANT_ACC_LIB_H -#ifndef __LZO_LIB_H_INCLUDED -#define __LZO_LIB_H_INCLUDED 1 -#if !defined(__LZOLIB_FUNCNAME) -# define __LZOLIB_FUNCNAME(f) f -#endif -#if !defined(LZOLIB_EXTERN) -# define LZOLIB_EXTERN(r,f) extern r __LZOLIB_FUNCNAME(f) -#endif -#if !defined(LZOLIB_EXTERN_NOINLINE) -# if defined(__lzo_noinline) -# define LZOLIB_EXTERN_NOINLINE(r,f) extern __lzo_noinline r __LZOLIB_FUNCNAME(f) -# else -# define LZOLIB_EXTERN_NOINLINE(r,f) extern r __LZOLIB_FUNCNAME(f) -# endif -#endif -#if (LZO_SIZEOF_LONG > LZO_SIZEOF_VOID_P) -# define lzolib_handle_t long -#else -# define lzolib_handle_t lzo_intptr_t -#endif -#if 0 -LZOLIB_EXTERN(int, lzo_ascii_digit) (int); -LZOLIB_EXTERN(int, lzo_ascii_islower) (int); -LZOLIB_EXTERN(int, lzo_ascii_isupper) (int); -LZOLIB_EXTERN(int, lzo_ascii_tolower) (int); -LZOLIB_EXTERN(int, lzo_ascii_toupper) (int); -LZOLIB_EXTERN(int, lzo_ascii_utolower) (int); -LZOLIB_EXTERN(int, lzo_ascii_utoupper) (int); -#endif -#define lzo_ascii_isdigit(c) ((LZO_ICAST(unsigned, c) - 48) < 10) -#define lzo_ascii_islower(c) ((LZO_ICAST(unsigned, c) - 97) < 26) -#define lzo_ascii_isupper(c) ((LZO_ICAST(unsigned, c) - 65) < 26) -#define lzo_ascii_tolower(c) (LZO_ICAST(int, c) + (lzo_ascii_isupper(c) << 5)) -#define lzo_ascii_toupper(c) (LZO_ICAST(int, c) - (lzo_ascii_islower(c) << 5)) -#define lzo_ascii_utolower(c) lzo_ascii_tolower(LZO_ITRUNC(unsigned char, c)) -#define lzo_ascii_utoupper(c) lzo_ascii_toupper(LZO_ITRUNC(unsigned char, c)) -#ifndef lzo_hsize_t -#if (LZO_HAVE_MM_HUGE_PTR) -# define lzo_hsize_t unsigned long -# define lzo_hvoid_p void __huge * -# define lzo_hchar_p char __huge * -# define lzo_hchar_pp char __huge * __huge * -# define lzo_hbyte_p unsigned char __huge * -#else -# define lzo_hsize_t size_t -# define lzo_hvoid_p void * -# define lzo_hchar_p char * -# define lzo_hchar_pp char ** -# define lzo_hbyte_p unsigned char * -#endif -#endif -LZOLIB_EXTERN(lzo_hvoid_p, lzo_halloc) (lzo_hsize_t); -LZOLIB_EXTERN(void, lzo_hfree) (lzo_hvoid_p); -#if (LZO_OS_DOS16 || LZO_OS_OS216) -LZOLIB_EXTERN(void __far*, lzo_dos_alloc) (unsigned long); -LZOLIB_EXTERN(int, lzo_dos_free) (void __far*); -#endif -LZOLIB_EXTERN(int, lzo_hmemcmp) (const lzo_hvoid_p, const lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p, const lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p, const lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p, int, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrlen) (const lzo_hchar_p); -LZOLIB_EXTERN(int, lzo_hstrcmp) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(int, lzo_hstrncmp)(const lzo_hchar_p, const lzo_hchar_p, lzo_hsize_t); -LZOLIB_EXTERN(int, lzo_ascii_hstricmp) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(int, lzo_ascii_hstrnicmp)(const lzo_hchar_p, const lzo_hchar_p, lzo_hsize_t); -LZOLIB_EXTERN(int, lzo_ascii_hmemicmp) (const lzo_hvoid_p, const lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrstr) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_ascii_hstristr) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemmem) (const lzo_hvoid_p, lzo_hsize_t, const lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_ascii_hmemimem) (const lzo_hvoid_p, lzo_hsize_t, const lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrcpy) (lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrcat) (lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrlcpy) (lzo_hchar_p, const lzo_hchar_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrlcat) (lzo_hchar_p, const lzo_hchar_p, lzo_hsize_t); -LZOLIB_EXTERN(int, lzo_hstrscpy) (lzo_hchar_p, const lzo_hchar_p, lzo_hsize_t); -LZOLIB_EXTERN(int, lzo_hstrscat) (lzo_hchar_p, const lzo_hchar_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrccpy) (lzo_hchar_p, const lzo_hchar_p, int); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemccpy) (lzo_hvoid_p, const lzo_hvoid_p, int, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrchr) (const lzo_hchar_p, int); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrrchr) (const lzo_hchar_p, int); -LZOLIB_EXTERN(lzo_hchar_p, lzo_ascii_hstrichr) (const lzo_hchar_p, int); -LZOLIB_EXTERN(lzo_hchar_p, lzo_ascii_hstrrichr) (const lzo_hchar_p, int); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemchr) (const lzo_hvoid_p, int, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_hmemrchr) (const lzo_hvoid_p, int, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_ascii_hmemichr) (const lzo_hvoid_p, int, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_ascii_hmemrichr) (const lzo_hvoid_p, int, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrspn) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrrspn) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrcspn) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hstrrcspn) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrpbrk) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrrpbrk) (const lzo_hchar_p, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrsep) (lzo_hchar_pp, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_hstrrsep) (lzo_hchar_pp, const lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_ascii_hstrlwr) (lzo_hchar_p); -LZOLIB_EXTERN(lzo_hchar_p, lzo_ascii_hstrupr) (lzo_hchar_p); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_ascii_hmemlwr) (lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hvoid_p, lzo_ascii_hmemupr) (lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hfread) (void *, lzo_hvoid_p, lzo_hsize_t); -LZOLIB_EXTERN(lzo_hsize_t, lzo_hfwrite) (void *, const lzo_hvoid_p, lzo_hsize_t); -#if (LZO_HAVE_MM_HUGE_PTR) -LZOLIB_EXTERN(long, lzo_hread) (int, lzo_hvoid_p, long); -LZOLIB_EXTERN(long, lzo_hwrite) (int, const lzo_hvoid_p, long); -#endif -LZOLIB_EXTERN(long, lzo_safe_hread) (int, lzo_hvoid_p, long); -LZOLIB_EXTERN(long, lzo_safe_hwrite) (int, const lzo_hvoid_p, long); -LZOLIB_EXTERN(unsigned, lzo_ua_get_be16) (const lzo_hvoid_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_ua_get_be24) (const lzo_hvoid_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_ua_get_be32) (const lzo_hvoid_p); -LZOLIB_EXTERN(void, lzo_ua_set_be16) (lzo_hvoid_p, unsigned); -LZOLIB_EXTERN(void, lzo_ua_set_be24) (lzo_hvoid_p, lzo_uint32l_t); -LZOLIB_EXTERN(void, lzo_ua_set_be32) (lzo_hvoid_p, lzo_uint32l_t); -LZOLIB_EXTERN(unsigned, lzo_ua_get_le16) (const lzo_hvoid_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_ua_get_le24) (const lzo_hvoid_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_ua_get_le32) (const lzo_hvoid_p); -LZOLIB_EXTERN(void, lzo_ua_set_le16) (lzo_hvoid_p, unsigned); -LZOLIB_EXTERN(void, lzo_ua_set_le24) (lzo_hvoid_p, lzo_uint32l_t); -LZOLIB_EXTERN(void, lzo_ua_set_le32) (lzo_hvoid_p, lzo_uint32l_t); -#if defined(lzo_int64l_t) -LZOLIB_EXTERN(lzo_uint64l_t, lzo_ua_get_be64) (const lzo_hvoid_p); -LZOLIB_EXTERN(void, lzo_ua_set_be64) (lzo_hvoid_p, lzo_uint64l_t); -LZOLIB_EXTERN(lzo_uint64l_t, lzo_ua_get_le64) (const lzo_hvoid_p); -LZOLIB_EXTERN(void, lzo_ua_set_le64) (lzo_hvoid_p, lzo_uint64l_t); -#endif -LZOLIB_EXTERN_NOINLINE(short, lzo_vget_short) (short, int); -LZOLIB_EXTERN_NOINLINE(int, lzo_vget_int) (int, int); -LZOLIB_EXTERN_NOINLINE(long, lzo_vget_long) (long, int); -#if defined(lzo_int64l_t) -LZOLIB_EXTERN_NOINLINE(lzo_int64l_t, lzo_vget_lzo_int64l_t) (lzo_int64l_t, int); -#endif -LZOLIB_EXTERN_NOINLINE(lzo_hsize_t, lzo_vget_lzo_hsize_t) (lzo_hsize_t, int); -#if !(LZO_CFG_NO_FLOAT) -LZOLIB_EXTERN_NOINLINE(float, lzo_vget_float) (float, int); -#endif -#if !(LZO_CFG_NO_DOUBLE) -LZOLIB_EXTERN_NOINLINE(double, lzo_vget_double) (double, int); -#endif -LZOLIB_EXTERN_NOINLINE(lzo_hvoid_p, lzo_vget_lzo_hvoid_p) (lzo_hvoid_p, int); -LZOLIB_EXTERN_NOINLINE(const lzo_hvoid_p, lzo_vget_lzo_hvoid_cp) (const lzo_hvoid_p, int); -#if !defined(LZO_FN_PATH_MAX) -#if (LZO_OS_DOS16 || LZO_OS_WIN16) -# define LZO_FN_PATH_MAX 143 -#elif (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN32 || LZO_OS_WIN64) -# define LZO_FN_PATH_MAX 259 -#elif (LZO_OS_TOS) -# define LZO_FN_PATH_MAX 259 -#endif -#endif -#if !defined(LZO_FN_PATH_MAX) -# define LZO_FN_PATH_MAX 1023 -#endif -#if !defined(LZO_FN_NAME_MAX) -#if (LZO_OS_DOS16 || LZO_OS_WIN16) -# define LZO_FN_NAME_MAX 12 -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# define LZO_FN_NAME_MAX 12 -#elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) -#elif (LZO_OS_DOS32) -# define LZO_FN_NAME_MAX 12 -#endif -#endif -#if !defined(LZO_FN_NAME_MAX) -# define LZO_FN_NAME_MAX LZO_FN_PATH_MAX -#endif -#define LZO_FNMATCH_NOESCAPE 1 -#define LZO_FNMATCH_PATHNAME 2 -#define LZO_FNMATCH_PATHSTAR 4 -#define LZO_FNMATCH_PERIOD 8 -#define LZO_FNMATCH_ASCII_CASEFOLD 16 -LZOLIB_EXTERN(int, lzo_fnmatch) (const lzo_hchar_p, const lzo_hchar_p, int); -#undef __LZOLIB_USE_OPENDIR -#if (HAVE_DIRENT_H || LZO_CC_WATCOMC) -# define __LZOLIB_USE_OPENDIR 1 -# if (LZO_OS_DOS32 && defined(__BORLANDC__)) -# elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) -# elif (LZO_OS_OS2 || LZO_OS_OS216) -# elif (LZO_ARCH_M68K && LZO_OS_TOS && LZO_CC_GNUC) -# elif (LZO_OS_WIN32 && !(LZO_HAVE_WINDOWS_H)) -# elif (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_TOS || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) -# undef __LZOLIB_USE_OPENDIR -# endif -#endif -typedef struct -{ -#if defined(__LZOLIB_USE_OPENDIR) - void* u_dirp; -# if (LZO_CC_WATCOMC) - unsigned short f_time; - unsigned short f_date; - unsigned long f_size; -# endif - char f_name[LZO_FN_NAME_MAX+1]; -#elif (LZO_OS_WIN32 || LZO_OS_WIN64) - lzolib_handle_t u_handle; - unsigned f_attr; - unsigned f_size_low; - unsigned f_size_high; - char f_name[LZO_FN_NAME_MAX+1]; -#elif (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_TOS || LZO_OS_WIN16) - char u_dta[21]; - unsigned char f_attr; - unsigned short f_time; - unsigned short f_date; - unsigned short f_size_low; - unsigned short f_size_high; - char f_name[LZO_FN_NAME_MAX+1]; - char u_dirp; -#else - void* u_dirp; - char f_name[LZO_FN_NAME_MAX+1]; -#endif -} lzo_dir_t; -#ifndef lzo_dir_p -#define lzo_dir_p lzo_dir_t * -#endif -LZOLIB_EXTERN(int, lzo_opendir) (lzo_dir_p, const char*); -LZOLIB_EXTERN(int, lzo_readdir) (lzo_dir_p); -LZOLIB_EXTERN(int, lzo_closedir) (lzo_dir_p); -#if (LZO_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__)) -# define lzo_alloca(x) __builtin_alloca((x)) -#elif (LZO_CC_GNUC) && (LZO_OS_CONSOLE_PS2) -# define lzo_alloca(x) __builtin_alloca((x)) -#elif (LZO_CC_BORLANDC || LZO_CC_LCC) && defined(__linux__) -#elif (HAVE_ALLOCA) -# define lzo_alloca(x) LZO_STATIC_CAST(void *, alloca((x))) -#endif -#if (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) -# define lzo_stackavail() stackavail() -#elif (LZO_ARCH_I086 && LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0410)) -# define lzo_stackavail() stackavail() -#elif (LZO_ARCH_I086 && LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0400)) -# if (LZO_OS_WIN16) && (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) -# else -# define lzo_stackavail() stackavail() -# endif -#elif ((LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define lzo_stackavail() stackavail() -#elif ((LZO_ARCH_I086) && LZO_CC_MSC && (_MSC_VER >= 700)) -# define lzo_stackavail() _stackavail() -#elif ((LZO_ARCH_I086) && LZO_CC_MSC) -# define lzo_stackavail() stackavail() -#elif ((LZO_ARCH_I086 || LZO_ARCH_I386) && LZO_CC_TURBOC && (__TURBOC__ >= 0x0450)) -# define lzo_stackavail() stackavail() -#elif (LZO_ARCH_I086 && LZO_CC_TURBOC && (__TURBOC__ >= 0x0400)) - LZO_EXTERN_C size_t __cdecl stackavail(void); -# define lzo_stackavail() stackavail() -#elif ((LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_CC_WATCOMC)) -# define lzo_stackavail() stackavail() -#elif (LZO_ARCH_I086 && LZO_CC_ZORTECHC) -# define lzo_stackavail() _chkstack() -#endif -LZOLIB_EXTERN(lzo_intptr_t, lzo_get_osfhandle) (int); -LZOLIB_EXTERN(const char *, lzo_getenv) (const char *); -LZOLIB_EXTERN(int, lzo_isatty) (int); -LZOLIB_EXTERN(int, lzo_mkdir) (const char*, unsigned); -LZOLIB_EXTERN(int, lzo_rmdir) (const char*); -LZOLIB_EXTERN(int, lzo_response) (int*, char***); -LZOLIB_EXTERN(int, lzo_set_binmode) (int, int); -#if defined(lzo_int32e_t) -LZOLIB_EXTERN(lzo_int32e_t, lzo_muldiv32s) (lzo_int32e_t, lzo_int32e_t, lzo_int32e_t); -LZOLIB_EXTERN(lzo_uint32e_t, lzo_muldiv32u) (lzo_uint32e_t, lzo_uint32e_t, lzo_uint32e_t); -#endif -LZOLIB_EXTERN(void, lzo_wildargv) (int*, char***); -LZOLIB_EXTERN_NOINLINE(void, lzo_debug_break) (void); -LZOLIB_EXTERN_NOINLINE(void, lzo_debug_nop) (void); -LZOLIB_EXTERN_NOINLINE(int, lzo_debug_align_check_query) (void); -LZOLIB_EXTERN_NOINLINE(int, lzo_debug_align_check_enable) (int); -LZOLIB_EXTERN_NOINLINE(unsigned, lzo_debug_running_on_qemu) (void); -LZOLIB_EXTERN_NOINLINE(unsigned, lzo_debug_running_on_valgrind) (void); -#if defined(lzo_int32e_t) -LZOLIB_EXTERN(int, lzo_tsc_read) (lzo_uint32e_t*); -#endif -struct lzo_pclock_handle_t; -struct lzo_pclock_t; -typedef struct lzo_pclock_handle_t lzo_pclock_handle_t; -typedef struct lzo_pclock_t lzo_pclock_t; -#ifndef lzo_pclock_handle_p -#define lzo_pclock_handle_p lzo_pclock_handle_t * -#endif -#ifndef lzo_pclock_p -#define lzo_pclock_p lzo_pclock_t * -#endif -#define LZO_PCLOCK_REALTIME 0 -#define LZO_PCLOCK_MONOTONIC 1 -#define LZO_PCLOCK_PROCESS_CPUTIME_ID 2 -#define LZO_PCLOCK_THREAD_CPUTIME_ID 3 -typedef int (*lzo_pclock_gettime_t) (lzo_pclock_handle_p, lzo_pclock_p); -struct lzo_pclock_handle_t { - lzolib_handle_t h; - int mode; - int read_error; - const char* name; - lzo_pclock_gettime_t gettime; -#if defined(lzo_int64l_t) - lzo_uint64l_t ticks_base; -#endif -}; -struct lzo_pclock_t { -#if defined(lzo_int64l_t) - lzo_int64l_t tv_sec; -#else - lzo_int32l_t tv_sec_high; - lzo_uint32l_t tv_sec_low; -#endif - lzo_uint32l_t tv_nsec; -}; -LZOLIB_EXTERN(int, lzo_pclock_open) (lzo_pclock_handle_p, int); -LZOLIB_EXTERN(int, lzo_pclock_open_default) (lzo_pclock_handle_p); -LZOLIB_EXTERN(int, lzo_pclock_close) (lzo_pclock_handle_p); -LZOLIB_EXTERN(void, lzo_pclock_read) (lzo_pclock_handle_p, lzo_pclock_p); -#if !(LZO_CFG_NO_DOUBLE) -LZOLIB_EXTERN(double, lzo_pclock_get_elapsed) (lzo_pclock_handle_p, const lzo_pclock_p, const lzo_pclock_p); -#endif -LZOLIB_EXTERN(int, lzo_pclock_flush_cpu_cache) (lzo_pclock_handle_p, unsigned); -struct lzo_getopt_t; -typedef struct lzo_getopt_t lzo_getopt_t; -#ifndef lzo_getopt_p -#define lzo_getopt_p lzo_getopt_t * -#endif -struct lzo_getopt_longopt_t; -typedef struct lzo_getopt_longopt_t lzo_getopt_longopt_t; -#ifndef lzo_getopt_longopt_p -#define lzo_getopt_longopt_p lzo_getopt_longopt_t * -#endif -struct lzo_getopt_longopt_t { - const char* name; - int has_arg; - int* flag; - int val; -}; -typedef void (*lzo_getopt_opterr_t)(lzo_getopt_p, const char*, void *); -struct lzo_getopt_t { - void *user; - const char *progname; - int bad_option; - char *optarg; - lzo_getopt_opterr_t opterr; - int optind; - int optopt; - int errcount; - int argc; char** argv; - int eof; int shortpos; - int pending_rotate_first, pending_rotate_middle; -}; -enum { LZO_GETOPT_NO_ARG, LZO_GETOPT_REQUIRED_ARG, LZO_GETOPT_OPTIONAL_ARG, LZO_GETOPT_EXACT_ARG = 0x10 }; -enum { LZO_GETOPT_PERMUTE, LZO_GETOPT_RETURN_IN_ORDER, LZO_GETOPT_REQUIRE_ORDER }; -LZOLIB_EXTERN(void, lzo_getopt_init) (lzo_getopt_p g, - int start_argc, int argc, char** argv); -LZOLIB_EXTERN(int, lzo_getopt) (lzo_getopt_p g, - const char* shortopts, - const lzo_getopt_longopt_p longopts, - int* longind); -typedef struct { - lzo_uint32l_t seed; -} lzo_rand31_t; -#ifndef lzo_rand31_p -#define lzo_rand31_p lzo_rand31_t * -#endif -LZOLIB_EXTERN(void, lzo_srand31) (lzo_rand31_p, lzo_uint32l_t); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_rand31) (lzo_rand31_p); -#if defined(lzo_int64l_t) -typedef struct { - lzo_uint64l_t seed; -} lzo_rand48_t; -#ifndef lzo_rand48_p -#define lzo_rand48_p lzo_rand48_t * -#endif -LZOLIB_EXTERN(void, lzo_srand48) (lzo_rand48_p, lzo_uint32l_t); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_rand48) (lzo_rand48_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_rand48_r32) (lzo_rand48_p); -#endif -#if defined(lzo_int64l_t) -typedef struct { - lzo_uint64l_t seed; -} lzo_rand64_t; -#ifndef lzo_rand64_p -#define lzo_rand64_p lzo_rand64_t * -#endif -LZOLIB_EXTERN(void, lzo_srand64) (lzo_rand64_p, lzo_uint64l_t); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_rand64) (lzo_rand64_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_rand64_r32) (lzo_rand64_p); -#endif -typedef struct { - unsigned n; - lzo_uint32l_t s[624]; -} lzo_randmt_t; -#ifndef lzo_randmt_p -#define lzo_randmt_p lzo_randmt_t * -#endif -LZOLIB_EXTERN(void, lzo_srandmt) (lzo_randmt_p, lzo_uint32l_t); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_randmt) (lzo_randmt_p); -LZOLIB_EXTERN(lzo_uint32l_t, lzo_randmt_r32) (lzo_randmt_p); -#if defined(lzo_int64l_t) -typedef struct { - unsigned n; - lzo_uint64l_t s[312]; -} lzo_randmt64_t; -#ifndef lzo_randmt64_p -#define lzo_randmt64_p lzo_randmt64_t * -#endif -LZOLIB_EXTERN(void, lzo_srandmt64) (lzo_randmt64_p, lzo_uint64l_t); -LZOLIB_EXTERN(lzo_uint64l_t, lzo_randmt64_r64) (lzo_randmt64_p); -#endif -#define LZO_SPAWN_P_WAIT 0 -#define LZO_SPAWN_P_NOWAIT 1 -LZOLIB_EXTERN(int, lzo_spawnv) (int mode, const char* fn, const char* const * argv); -LZOLIB_EXTERN(int, lzo_spawnvp) (int mode, const char* fn, const char* const * argv); -LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * argv, const char * const envp); -#endif -#endif -#if defined(LZO_WANT_ACC_CXX_H) -# undef LZO_WANT_ACC_CXX_H -#ifndef __LZO_CXX_H_INCLUDED -#define __LZO_CXX_H_INCLUDED 1 -#if defined(__cplusplus) -#if defined(LZO_CXX_NOTHROW) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) -#elif (LZO_CC_BORLANDC && (__BORLANDC__ < 0x0450)) -#elif (LZO_CC_GHS && !defined(__EXCEPTIONS)) -#elif (LZO_CC_HIGHC) -#elif (LZO_CC_MSC && (_MSC_VER < 1100)) -#elif (LZO_CC_NDPC) -#elif (LZO_CC_TURBOC) -#elif (LZO_CC_WATCOMC && !defined(_CPPUNWIND)) -#elif (LZO_CC_ZORTECHC) -#else -# define LZO_CXX_NOTHROW throw() -#endif -#if !defined(LZO_CXX_NOTHROW) -# define LZO_CXX_NOTHROW /*empty*/ -#endif -#if defined(__LZO_CXX_DO_NEW) -#elif (LZO_CC_GHS || LZO_CC_NDPC || LZO_CC_PGI) -# define __LZO_CXX_DO_NEW { return 0; } -#elif ((LZO_CC_BORLANDC || LZO_CC_TURBOC) && LZO_ARCH_I086) -# define __LZO_CXX_DO_NEW { return 0; } -#else -# define __LZO_CXX_DO_NEW ; -#endif -#if defined(__LZO_CXX_DO_DELETE) -#elif (LZO_CC_BORLANDC || LZO_CC_TURBOC) -# define __LZO_CXX_DO_DELETE { } -#else -# define __LZO_CXX_DO_DELETE LZO_CXX_NOTHROW { } -#endif -#if (LZO_CC_BORLANDC && (__BORLANDC__ < 0x0450)) -#elif (LZO_CC_MSC && LZO_MM_HUGE) -# define LZO_CXX_DISABLE_NEW_DELETE private: -#elif (LZO_CC_MSC && (_MSC_VER < 1100)) -#elif (LZO_CC_NDPC) -#elif (LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -#elif (LZO_CC_TURBOC) -#elif (LZO_CC_WATCOMC && (__WATCOMC__ < 1100)) -#else -# define __LZO_CXX_HAVE_ARRAY_NEW 1 -#endif -#if (__LZO_CXX_HAVE_ARRAY_NEW) -# define __LZO_CXX_HAVE_PLACEMENT_NEW 1 -#endif -#if (__LZO_CXX_HAVE_PLACEMENT_NEW) -# if (LZO_CC_GNUC >= 0x030000ul) -# define __LZO_CXX_HAVE_PLACEMENT_DELETE 1 -# elif (LZO_CC_INTELC) -# define __LZO_CXX_HAVE_PLACEMENT_DELETE 1 -# elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __LZO_CXX_HAVE_PLACEMENT_DELETE 1 -# elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __LZO_CXX_HAVE_PLACEMENT_DELETE 1 -# elif (LZO_CC_PGI) -# define __LZO_CXX_HAVE_PLACEMENT_DELETE 1 -# endif -#endif -#if defined(LZO_CXX_DISABLE_NEW_DELETE) -#elif defined(new) || defined(delete) -# define LZO_CXX_DISABLE_NEW_DELETE private: -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025b00ul)) -# define LZO_CXX_DISABLE_NEW_DELETE private: -#elif (LZO_CC_HIGHC) -# define LZO_CXX_DISABLE_NEW_DELETE private: -#elif !(__LZO_CXX_HAVE_ARRAY_NEW) -# define LZO_CXX_DISABLE_NEW_DELETE \ - protected: static void operator delete(void*) __LZO_CXX_DO_DELETE \ - protected: static void* operator new(size_t) __LZO_CXX_DO_NEW \ - private: -#else -# define LZO_CXX_DISABLE_NEW_DELETE \ - protected: static void operator delete(void*) __LZO_CXX_DO_DELETE \ - static void operator delete[](void*) __LZO_CXX_DO_DELETE \ - private: static void* operator new(size_t) __LZO_CXX_DO_NEW \ - static void* operator new[](size_t) __LZO_CXX_DO_NEW -#endif -#if defined(LZO_CXX_TRIGGER_FUNCTION) -#else -# define LZO_CXX_TRIGGER_FUNCTION \ - protected: virtual const void* lzo_cxx_trigger_function() const; \ - private: -#endif -#if defined(LZO_CXX_TRIGGER_FUNCTION_IMPL) -#else -# define LZO_CXX_TRIGGER_FUNCTION_IMPL(klass) \ - const void* klass::lzo_cxx_trigger_function() const { return LZO_STATIC_CAST(const void *, 0); } -#endif -#endif -#endif -#endif -#if defined(LZO_WANT_ACC_CHK_CH) -# undef LZO_WANT_ACC_CHK_CH -#if !defined(LZOCHK_ASSERT) -# define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT_HEADER(expr) -#endif -#if !defined(LZOCHK_ASSERT_SIGN_T) -# define LZOCHK_ASSERT_SIGN_T(type,relop) \ - LZOCHK_ASSERT( LZO_STATIC_CAST(type, -1) relop LZO_STATIC_CAST(type, 0)) \ - LZOCHK_ASSERT( LZO_STATIC_CAST(type, ~LZO_STATIC_CAST(type, 0)) relop LZO_STATIC_CAST(type, 0)) \ - LZOCHK_ASSERT( LZO_STATIC_CAST(type, ~LZO_STATIC_CAST(type, 0)) == LZO_STATIC_CAST(type, -1)) -#endif -#if !defined(LZOCHK_ASSERT_IS_SIGNED_T) -# define LZOCHK_ASSERT_IS_SIGNED_T(type) LZOCHK_ASSERT_SIGN_T(type,<) -#endif -#if !defined(LZOCHK_ASSERT_IS_UNSIGNED_T) -# if (LZO_BROKEN_INTEGRAL_PROMOTION) -# define LZOCHK_ASSERT_IS_UNSIGNED_T(type) \ - LZOCHK_ASSERT( LZO_STATIC_CAST(type, -1) > LZO_STATIC_CAST(type, 0) ) -# else -# define LZOCHK_ASSERT_IS_UNSIGNED_T(type) LZOCHK_ASSERT_SIGN_T(type,>) -# endif -#endif -#if defined(LZOCHK_CFG_PEDANTIC) -#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550) && (__BORLANDC__ < 0x0560)) -# pragma option push -w-8055 -#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0550)) -# pragma option push -w-osh -#endif -#endif -#if (LZO_0xffffffffL - LZO_UINT32_C(4294967294) != 1) -# error "preprocessor error" -#endif -#if (LZO_0xffffffffL - LZO_UINT32_C(0xfffffffd) != 2) -# error "preprocessor error" -#endif -#if +0 -# error "preprocessor error" -#endif -#if -0 -# error "preprocessor error" -#endif -#if +0 != 0 -# error "preprocessor error" -#endif -#if -0 != 0 -# error "preprocessor error" -#endif -#define LZOCHK_VAL 1 -#define LZOCHK_TMP1 LZOCHK_VAL -#undef LZOCHK_VAL -#define LZOCHK_VAL 2 -#define LZOCHK_TMP2 LZOCHK_VAL -#if (LZOCHK_TMP1 != 2) -# error "preprocessor error 3a" -#endif -#if (LZOCHK_TMP2 != 2) -# error "preprocessor error 3b" -#endif -#undef LZOCHK_VAL -#if (LZOCHK_TMP2) -# error "preprocessor error 3c" -#endif -#if (LZOCHK_TMP2 + 0 != 0) -# error "preprocessor error 3d" -#endif -#undef LZOCHK_TMP1 -#undef LZOCHK_TMP2 -#if 0 || defined(LZOCHK_CFG_PEDANTIC) -# if (LZO_ARCH_MIPS) && defined(_MIPS_SZINT) - LZOCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int)) -# endif -# if (LZO_ARCH_MIPS) && defined(_MIPS_SZLONG) - LZOCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long)) -# endif -# if (LZO_ARCH_MIPS) && defined(_MIPS_SZPTR) - LZOCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *)) -# endif -#endif - LZOCHK_ASSERT(1 == 1) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,1) == 1u) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,2) == 3u) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,3) == 7u) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,8) == 255u) -#if (LZO_SIZEOF_INT >= 2) - LZOCHK_ASSERT(__LZO_MASK_GEN(1,15) == 32767) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,16) == 0xffffU) - LZOCHK_ASSERT(__LZO_MASK_GEN(0u,16) == 0u) -#endif - LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,16) == 0xffffUL) - LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,16) == 0ul) -#if (LZO_SIZEOF_INT >= 4) - LZOCHK_ASSERT(__LZO_MASK_GEN(1,31) == 2147483647) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,32) == 0xffffffffU) - LZOCHK_ASSERT(__LZO_MASK_GEN(0u,32) == 0u) -#endif -#if (LZO_SIZEOF_LONG >= 4) - LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,32) == 0xffffffffUL) - LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,32) == 0ul) -#endif -#if (LZO_SIZEOF_LONG >= 8) - LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,64) == 0xffffffffffffffffUL) - LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,64) == 0ul) -#endif -#if !(LZO_BROKEN_INTEGRAL_PROMOTION) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,LZO_SIZEOF_INT*8) == ~0u) - LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,LZO_SIZEOF_LONG*8) == ~0ul) -#endif -#if 1 - LZOCHK_ASSERT(__LZO_MASK_GEN(0,0) == 0) - LZOCHK_ASSERT(__LZO_MASK_GEN(1,0) == 0) - LZOCHK_ASSERT(__LZO_MASK_GEN(2,0) == 0) - LZOCHK_ASSERT(__LZO_MASK_GEN(4,0) == 0) -#endif -#if 1 - LZOCHK_ASSERT(__LZO_MASK_GEN(2,1) == 2) - LZOCHK_ASSERT(__LZO_MASK_GEN(4,1) == 4) - LZOCHK_ASSERT(__LZO_MASK_GEN(8,1) == 8) - LZOCHK_ASSERT(__LZO_MASK_GEN(2,2) == 2+4) - LZOCHK_ASSERT(__LZO_MASK_GEN(4,2) == 4+8) - LZOCHK_ASSERT(__LZO_MASK_GEN(8,2) == 8+16) - LZOCHK_ASSERT(__LZO_MASK_GEN(2,3) == 2+4+8) - LZOCHK_ASSERT(__LZO_MASK_GEN(4,3) == 4+8+16) - LZOCHK_ASSERT(__LZO_MASK_GEN(8,3) == 8+16+32) - LZOCHK_ASSERT(__LZO_MASK_GEN(7,1) == 7) - LZOCHK_ASSERT(__LZO_MASK_GEN(7,2) == 7+14) - LZOCHK_ASSERT(__LZO_MASK_GEN(7,3) == 7+14+28) -#endif -#if !(LZO_BROKEN_SIGNED_RIGHT_SHIFT) - LZOCHK_ASSERT(((-1) >> 7) == -1) -#endif - LZOCHK_ASSERT(((1) >> 7) == 0) -#if (LZO_CC_INTELC && (__INTEL_COMPILER >= 900)) -# pragma warning(push) -# pragma warning(disable: 1025) -#endif - LZOCHK_ASSERT((~0l & ~0) == ~0l) - LZOCHK_ASSERT((~0l & ~0u) == ~0u) - LZOCHK_ASSERT((~0ul & ~0) == ~0ul) - LZOCHK_ASSERT((~0ul & ~0u) == ~0u) -#if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) -#elif (LZO_SIZEOF_INT == 2) - LZOCHK_ASSERT((~0l & ~0u) == 0xffffU) - LZOCHK_ASSERT((~0ul & ~0u) == 0xffffU) -#elif (LZO_SIZEOF_INT == 4) - LZOCHK_ASSERT((~0l & ~0u) == 0xffffffffU) - LZOCHK_ASSERT((~0ul & ~0u) == 0xffffffffU) -#endif -#if (LZO_CC_INTELC && (__INTEL_COMPILER >= 900)) -# pragma warning(pop) -#endif - LZOCHK_ASSERT_IS_SIGNED_T(signed char) - LZOCHK_ASSERT_IS_UNSIGNED_T(unsigned char) - LZOCHK_ASSERT(sizeof(signed char) == sizeof(char)) - LZOCHK_ASSERT(sizeof(unsigned char) == sizeof(char)) - LZOCHK_ASSERT(sizeof(char) == 1) -#if (LZO_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L)) -#else - LZOCHK_ASSERT(sizeof(char) == sizeof(LZO_STATIC_CAST(char, 0))) -#endif -#if defined(__cplusplus) - LZOCHK_ASSERT(sizeof('\0') == sizeof(char)) -#else -# if (LZO_CC_DMC) -# else - LZOCHK_ASSERT(sizeof('\0') == sizeof(int)) -# endif -#endif -#if defined(__lzo_alignof) - LZOCHK_ASSERT(__lzo_alignof(char) == 1) - LZOCHK_ASSERT(__lzo_alignof(signed char) == 1) - LZOCHK_ASSERT(__lzo_alignof(unsigned char) == 1) -#if defined(lzo_int16e_t) - LZOCHK_ASSERT(__lzo_alignof(lzo_int16e_t) >= 1) - LZOCHK_ASSERT(__lzo_alignof(lzo_int16e_t) <= 2) -#endif -#if defined(lzo_int32e_t) - LZOCHK_ASSERT(__lzo_alignof(lzo_int32e_t) >= 1) - LZOCHK_ASSERT(__lzo_alignof(lzo_int32e_t) <= 4) -#endif -#endif - LZOCHK_ASSERT_IS_SIGNED_T(short) - LZOCHK_ASSERT_IS_UNSIGNED_T(unsigned short) - LZOCHK_ASSERT(sizeof(short) == sizeof(unsigned short)) -#if !(LZO_ABI_I8LP16) - LZOCHK_ASSERT(sizeof(short) >= 2) -#endif - LZOCHK_ASSERT(sizeof(short) >= sizeof(char)) -#if (LZO_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L)) -#else - LZOCHK_ASSERT(sizeof(short) == sizeof(LZO_STATIC_CAST(short, 0))) -#endif -#if (LZO_SIZEOF_SHORT > 0) - LZOCHK_ASSERT(sizeof(short) == LZO_SIZEOF_SHORT) -#endif - LZOCHK_ASSERT_IS_SIGNED_T(int) - LZOCHK_ASSERT_IS_UNSIGNED_T(unsigned int) - LZOCHK_ASSERT(sizeof(int) == sizeof(unsigned int)) -#if !(LZO_ABI_I8LP16) - LZOCHK_ASSERT(sizeof(int) >= 2) -#endif - LZOCHK_ASSERT(sizeof(int) >= sizeof(short)) - LZOCHK_ASSERT(sizeof(int) == sizeof(0)) - LZOCHK_ASSERT(sizeof(int) == sizeof(LZO_STATIC_CAST(int, 0))) -#if (LZO_SIZEOF_INT > 0) - LZOCHK_ASSERT(sizeof(int) == LZO_SIZEOF_INT) -#endif - LZOCHK_ASSERT(sizeof(0) == sizeof(int)) - LZOCHK_ASSERT_IS_SIGNED_T(long) - LZOCHK_ASSERT_IS_UNSIGNED_T(unsigned long) - LZOCHK_ASSERT(sizeof(long) == sizeof(unsigned long)) -#if !(LZO_ABI_I8LP16) - LZOCHK_ASSERT(sizeof(long) >= 4) -#endif - LZOCHK_ASSERT(sizeof(long) >= sizeof(int)) - LZOCHK_ASSERT(sizeof(long) == sizeof(0L)) - LZOCHK_ASSERT(sizeof(long) == sizeof(LZO_STATIC_CAST(long, 0))) -#if (LZO_SIZEOF_LONG > 0) - LZOCHK_ASSERT(sizeof(long) == LZO_SIZEOF_LONG) -#endif - LZOCHK_ASSERT(sizeof(0L) == sizeof(long)) - LZOCHK_ASSERT_IS_UNSIGNED_T(size_t) - LZOCHK_ASSERT(sizeof(size_t) >= sizeof(int)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0))) -#if (LZO_SIZEOF_SIZE_T > 0) - LZOCHK_ASSERT(sizeof(size_t) == LZO_SIZEOF_SIZE_T) -#endif - LZOCHK_ASSERT_IS_SIGNED_T(ptrdiff_t) - LZOCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int)) - LZOCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t)) -#if !(LZO_BROKEN_SIZEOF) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(LZO_STATIC_CAST(char*, 0) - LZO_STATIC_CAST(char*, 0))) -# if (LZO_HAVE_MM_HUGE_PTR) - LZOCHK_ASSERT(4 == sizeof(LZO_STATIC_CAST(char __huge*, 0) - LZO_STATIC_CAST(char __huge*, 0))) -# endif -#endif -#if (LZO_SIZEOF_PTRDIFF_T > 0) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == LZO_SIZEOF_PTRDIFF_T) -#endif - LZOCHK_ASSERT(sizeof(void*) >= sizeof(char*)) -#if (LZO_SIZEOF_VOID_P > 0) - LZOCHK_ASSERT(sizeof(void*) == LZO_SIZEOF_VOID_P) - LZOCHK_ASSERT(sizeof(char*) == LZO_SIZEOF_VOID_P) -#endif -#if (LZO_HAVE_MM_HUGE_PTR) - LZOCHK_ASSERT(4 == sizeof(void __huge*)) - LZOCHK_ASSERT(4 == sizeof(char __huge*)) -#endif -#if (LZO_ABI_I8LP16) - LZOCHK_ASSERT((((1u << 7) + 1) >> 7) == 1) - LZOCHK_ASSERT((((1ul << 15) + 1) >> 15) == 1) -#else - LZOCHK_ASSERT((((1u << 15) + 1) >> 15) == 1) - LZOCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1) -#endif -#if defined(LZOCHK_CFG_PEDANTIC) -#if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) -#else - LZOCHK_ASSERT((1 << (8*LZO_SIZEOF_INT-1)) < 0) -#endif -#endif - LZOCHK_ASSERT((1u << (8*LZO_SIZEOF_INT-1)) > 0) -#if defined(LZOCHK_CFG_PEDANTIC) - LZOCHK_ASSERT((1l << (8*LZO_SIZEOF_LONG-1)) < 0) -#endif - LZOCHK_ASSERT((1ul << (8*LZO_SIZEOF_LONG-1)) > 0) -#if defined(lzo_int16e_t) - LZOCHK_ASSERT(sizeof(lzo_int16e_t) == 2) - LZOCHK_ASSERT(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T) - LZOCHK_ASSERT(sizeof(lzo_uint16e_t) == 2) - LZOCHK_ASSERT(sizeof(lzo_int16e_t) == sizeof(lzo_uint16e_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int16e_t) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint16e_t) -#if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) -#else - LZOCHK_ASSERT((LZO_STATIC_CAST(lzo_uint16e_t, (~LZO_STATIC_CAST(lzo_uint16e_t,0ul))) >> 15) == 1) -#endif - LZOCHK_ASSERT( LZO_STATIC_CAST(lzo_int16e_t, (1 + ~LZO_STATIC_CAST(lzo_int16e_t, 0))) == 0) -#if defined(LZOCHK_CFG_PEDANTIC) - LZOCHK_ASSERT( LZO_STATIC_CAST(lzo_uint16e_t, (1 + ~LZO_STATIC_CAST(lzo_uint16e_t, 0))) == 0) -#endif -#endif -#if defined(lzo_int32e_t) - LZOCHK_ASSERT(sizeof(lzo_int32e_t) == 4) - LZOCHK_ASSERT(sizeof(lzo_int32e_t) == LZO_SIZEOF_LZO_INT32E_T) - LZOCHK_ASSERT(sizeof(lzo_uint32e_t) == 4) - LZOCHK_ASSERT(sizeof(lzo_int32e_t) == sizeof(lzo_uint32e_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int32e_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_int32e_t, 1) << 30) + 1) >> 30) == 1) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32e_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_uint32e_t, 1) << 31) + 1) >> 31) == 1) - LZOCHK_ASSERT((LZO_STATIC_CAST(lzo_uint32e_t, (~LZO_STATIC_CAST(lzo_uint32e_t, 0ul))) >> 31) == 1) - LZOCHK_ASSERT( LZO_STATIC_CAST(lzo_int32e_t, (1 + ~LZO_STATIC_CAST(lzo_int32e_t, 0))) == 0) -#if defined(LZOCHK_CFG_PEDANTIC) - LZOCHK_ASSERT( LZO_STATIC_CAST(lzo_uint32e_t, (1 + ~LZO_STATIC_CAST(lzo_uint32e_t, 0))) == 0) -#endif -#endif -#if defined(lzo_int32e_t) - LZOCHK_ASSERT(sizeof(lzo_int32l_t) >= sizeof(lzo_int32e_t)) -#endif - LZOCHK_ASSERT(sizeof(lzo_int32l_t) >= 4) - LZOCHK_ASSERT(sizeof(lzo_int32l_t) == LZO_SIZEOF_LZO_INT32L_T) - LZOCHK_ASSERT(sizeof(lzo_uint32l_t) >= 4) - LZOCHK_ASSERT(sizeof(lzo_int32l_t) == sizeof(lzo_uint32l_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int32l_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_int32l_t, 1) << 30) + 1) >> 30) == 1) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32l_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_uint32l_t, 1) << 31) + 1) >> 31) == 1) - LZOCHK_ASSERT(sizeof(lzo_int32f_t) >= sizeof(int)) -#if defined(lzo_int32e_t) - LZOCHK_ASSERT(sizeof(lzo_int32f_t) >= sizeof(lzo_int32e_t)) -#endif - LZOCHK_ASSERT(sizeof(lzo_int32f_t) >= sizeof(lzo_int32l_t)) - LZOCHK_ASSERT(sizeof(lzo_int32f_t) >= 4) - LZOCHK_ASSERT(sizeof(lzo_int32f_t) >= sizeof(lzo_int32l_t)) - LZOCHK_ASSERT(sizeof(lzo_int32f_t) == LZO_SIZEOF_LZO_INT32F_T) - LZOCHK_ASSERT(sizeof(lzo_uint32f_t) >= 4) - LZOCHK_ASSERT(sizeof(lzo_uint32f_t) >= sizeof(lzo_uint32l_t)) - LZOCHK_ASSERT(sizeof(lzo_int32f_t) == sizeof(lzo_uint32f_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int32f_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_int32f_t, 1) << 30) + 1) >> 30) == 1) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32f_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_uint32f_t, 1) << 31) + 1) >> 31) == 1) -#if defined(lzo_int64e_t) - LZOCHK_ASSERT(sizeof(lzo_int64e_t) == 8) - LZOCHK_ASSERT(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) - LZOCHK_ASSERT(sizeof(lzo_uint64e_t) == 8) - LZOCHK_ASSERT(sizeof(lzo_int64e_t) == sizeof(lzo_uint64e_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int64e_t) -#if (LZO_CC_BORLANDC && (__BORLANDC__ < 0x0530)) -#else - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint64e_t) -#endif -#endif -#if defined(lzo_int64l_t) -#if defined(lzo_int64e_t) - LZOCHK_ASSERT(sizeof(lzo_int64l_t) >= sizeof(lzo_int64e_t)) -#endif - LZOCHK_ASSERT(sizeof(lzo_int64l_t) >= 8) - LZOCHK_ASSERT(sizeof(lzo_int64l_t) == LZO_SIZEOF_LZO_INT64L_T) - LZOCHK_ASSERT(sizeof(lzo_uint64l_t) >= 8) - LZOCHK_ASSERT(sizeof(lzo_int64l_t) == sizeof(lzo_uint64l_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int64l_t) - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_int64l_t, 1) << 62) + 1) >> 62) == 1) - LZOCHK_ASSERT(((( LZO_INT64_C(1) << 62) + 1) >> 62) == 1) -#if (LZO_CC_BORLANDC && (__BORLANDC__ < 0x0530)) -#else - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint64l_t) - LZOCHK_ASSERT(LZO_UINT64_C(18446744073709551615) > 0) -#endif - LZOCHK_ASSERT(((( LZO_STATIC_CAST(lzo_uint64l_t, 1) << 63) + 1) >> 63) == 1) - LZOCHK_ASSERT(((( LZO_UINT64_C(1) << 63) + 1) >> 63) == 1) -#if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020600ul)) - LZOCHK_ASSERT(LZO_INT64_C(9223372036854775807) > LZO_INT64_C(0)) -#else - LZOCHK_ASSERT(LZO_INT64_C(9223372036854775807) > 0) -#endif - LZOCHK_ASSERT(LZO_INT64_C(-9223372036854775807) - 1 < 0) - LZOCHK_ASSERT( LZO_INT64_C(9223372036854775807) % LZO_INT32_C(2147483629) == 721) - LZOCHK_ASSERT( LZO_INT64_C(9223372036854775807) % LZO_INT32_C(2147483647) == 1) - LZOCHK_ASSERT(LZO_UINT64_C(9223372036854775807) % LZO_UINT32_C(2147483629) == 721) - LZOCHK_ASSERT(LZO_UINT64_C(9223372036854775807) % LZO_UINT32_C(2147483647) == 1) -#endif -#if defined(lzo_int64f_t) -#if defined(lzo_int64e_t) - LZOCHK_ASSERT(sizeof(lzo_int64f_t) >= sizeof(lzo_int64e_t)) -#endif - LZOCHK_ASSERT(sizeof(lzo_int64f_t) >= sizeof(lzo_int64l_t)) - LZOCHK_ASSERT(sizeof(lzo_int64f_t) >= 8) - LZOCHK_ASSERT(sizeof(lzo_int64f_t) >= sizeof(lzo_int64l_t)) - LZOCHK_ASSERT(sizeof(lzo_int64f_t) == LZO_SIZEOF_LZO_INT64F_T) - LZOCHK_ASSERT(sizeof(lzo_uint64f_t) >= 8) - LZOCHK_ASSERT(sizeof(lzo_uint64f_t) >= sizeof(lzo_uint64l_t)) - LZOCHK_ASSERT(sizeof(lzo_int64f_t) == sizeof(lzo_uint64f_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int64f_t) -#if (LZO_CC_BORLANDC && (__BORLANDC__ < 0x0530)) -#else - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint64f_t) -#endif -#endif -#if !defined(__LZO_INTPTR_T_IS_POINTER) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_intptr_t) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) -#endif - LZOCHK_ASSERT(sizeof(lzo_intptr_t) >= sizeof(void *)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == LZO_SIZEOF_LZO_INTPTR_T) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(lzo_uintptr_t)) -#if defined(lzo_word_t) - LZOCHK_ASSERT(LZO_WORDSIZE == LZO_SIZEOF_LZO_WORD_T) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_word_t) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_sword_t) - LZOCHK_ASSERT(sizeof(lzo_word_t) == LZO_SIZEOF_LZO_WORD_T) - LZOCHK_ASSERT(sizeof(lzo_word_t) == sizeof(lzo_sword_t)) -#endif - LZOCHK_ASSERT(sizeof(lzo_int8_t) == 1) - LZOCHK_ASSERT(sizeof(lzo_uint8_t) == 1) - LZOCHK_ASSERT(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int8_t) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint8_t) -#if defined(LZO_INT16_C) - LZOCHK_ASSERT(sizeof(LZO_INT16_C(0)) >= 2) - LZOCHK_ASSERT(sizeof(LZO_UINT16_C(0)) >= 2) - LZOCHK_ASSERT((LZO_UINT16_C(0xffff) >> 15) == 1) -#endif -#if defined(LZO_INT32_C) - LZOCHK_ASSERT(sizeof(LZO_INT32_C(0)) >= 4) - LZOCHK_ASSERT(sizeof(LZO_UINT32_C(0)) >= 4) - LZOCHK_ASSERT((LZO_UINT32_C(0xffffffff) >> 31) == 1) -#endif -#if defined(LZO_INT64_C) -#if (LZO_CC_BORLANDC && (__BORLANDC__ < 0x0560)) -#else - LZOCHK_ASSERT(sizeof(LZO_INT64_C(0)) >= 8) - LZOCHK_ASSERT(sizeof(LZO_UINT64_C(0)) >= 8) -#endif - LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) >> 63) == 1) - LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & ~0) == LZO_UINT64_C(0xffffffffffffffff)) - LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & ~0l) == LZO_UINT64_C(0xffffffffffffffff)) -#if (LZO_SIZEOF_INT == 4) -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) -# else - LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & (~0u+0u)) == 0xffffffffu) -# endif -#endif -#if (LZO_SIZEOF_LONG == 4) -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) -# else - LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & (~0ul+0ul)) == 0xfffffffful) -# endif -#endif -#endif -#if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) - LZOCHK_ASSERT(sizeof(void*) == 2) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == 2) -#elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) - LZOCHK_ASSERT(sizeof(void*) == 4) -#endif -#if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_COMPACT) - LZOCHK_ASSERT(sizeof(void (*)(void)) == 2) -#elif (LZO_MM_MEDIUM || LZO_MM_LARGE || LZO_MM_HUGE) - LZOCHK_ASSERT(sizeof(void (*)(void)) == 4) -#endif -#if (LZO_ABI_ILP32) - LZOCHK_ASSERT(sizeof(int) == 4) - LZOCHK_ASSERT(sizeof(long) == 4) - LZOCHK_ASSERT(sizeof(void*) == 4) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_ABI_ILP64) - LZOCHK_ASSERT(sizeof(int) == 8) - LZOCHK_ASSERT(sizeof(long) == 8) - LZOCHK_ASSERT(sizeof(void*) == 8) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_ABI_IP32L64) - LZOCHK_ASSERT(sizeof(int) == 4) - LZOCHK_ASSERT(sizeof(long) == 8) - LZOCHK_ASSERT(sizeof(void*) == 4) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_ABI_LLP64) - LZOCHK_ASSERT(sizeof(int) == 4) - LZOCHK_ASSERT(sizeof(long) == 4) - LZOCHK_ASSERT(sizeof(void*) == 8) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_ABI_LP32) - LZOCHK_ASSERT(sizeof(int) == 2) - LZOCHK_ASSERT(sizeof(long) == 4) - LZOCHK_ASSERT(sizeof(void*) == 4) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_ABI_LP64) - LZOCHK_ASSERT(sizeof(int) == 4) - LZOCHK_ASSERT(sizeof(long) == 8) - LZOCHK_ASSERT(sizeof(void*) == 8) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_ABI_IP32W64) - LZOCHK_ASSERT(sizeof(int) == 4) - LZOCHK_ASSERT(sizeof(void*) == 4) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) - LZOCHK_ASSERT(LZO_WORDSIZE == 8) -#endif -#if (LZO_ARCH_I086) - LZOCHK_ASSERT(sizeof(size_t) == 2) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#elif (LZO_ARCH_I386 || LZO_ARCH_M68K) - LZOCHK_ASSERT(sizeof(size_t) == 4) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == 4) - LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) -#endif -#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32) - LZOCHK_ASSERT(sizeof(size_t) == 4) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == 4) - LZOCHK_ASSERT(sizeof(void (*)(void)) == 4) -#elif (LZO_OS_WIN64) - LZOCHK_ASSERT(sizeof(size_t) == 8) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == 8) - LZOCHK_ASSERT(sizeof(void (*)(void)) == 8) -#endif -#if (LZO_CC_NDPC) -#elif (LZO_SIZEOF_INT > 1) - LZOCHK_ASSERT( LZO_STATIC_CAST(int, LZO_STATIC_CAST(unsigned char, LZO_STATIC_CAST(signed char, -1))) == 255) -#endif -#if defined(LZOCHK_CFG_PEDANTIC) -#if (LZO_CC_KEILC) -#elif (LZO_CC_NDPC) -#elif !(LZO_BROKEN_INTEGRAL_PROMOTION) && (LZO_SIZEOF_INT > 1) - LZOCHK_ASSERT( ((LZO_STATIC_CAST(unsigned char, 128)) << LZO_STATIC_CAST(int, (8*sizeof(int)-8))) < 0) -#endif -#endif -#if defined(LZOCHK_CFG_PEDANTIC) -#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560)) -# pragma option pop -#endif -#endif -#endif -#if defined(LZO_WANT_ACCLIB_VGET) -# undef LZO_WANT_ACCLIB_VGET -#define __LZOLIB_VGET_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if !defined(LZOLIB_PUBLIC_NOINLINE) -# if !defined(__lzo_noinline) -# define LZOLIB_PUBLIC_NOINLINE(r,f) r __LZOLIB_FUNCNAME(f) -# elif (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || LZO_CC_LLVM) -# define LZOLIB_PUBLIC_NOINLINE(r,f) __lzo_noinline __attribute__((__used__)) r __LZOLIB_FUNCNAME(f) -# else -# define LZOLIB_PUBLIC_NOINLINE(r,f) __lzo_noinline r __LZOLIB_FUNCNAME(f) -# endif -#endif -extern void* volatile lzo_vget_ptr__; -#if (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || LZO_CC_LLVM) -void* volatile __attribute__((__used__)) lzo_vget_ptr__ = LZO_STATIC_CAST(void *, 0); -#else -void* volatile lzo_vget_ptr__ = LZO_STATIC_CAST(void *, 0); -#endif -#ifndef __LZOLIB_VGET_BODY -#define __LZOLIB_VGET_BODY(T) \ - if __lzo_unlikely(lzo_vget_ptr__) { \ - typedef T __lzo_may_alias TT; \ - unsigned char e; expr &= 255; e = LZO_STATIC_CAST(unsigned char, expr); \ - * LZO_STATIC_CAST(TT *, lzo_vget_ptr__) = v; \ - * LZO_STATIC_CAST(unsigned char *, lzo_vget_ptr__) = e; \ - v = * LZO_STATIC_CAST(TT *, lzo_vget_ptr__); \ - } \ - return v; -#endif -LZOLIB_PUBLIC_NOINLINE(short, lzo_vget_short) (short v, int expr) -{ - __LZOLIB_VGET_BODY(short) -} -LZOLIB_PUBLIC_NOINLINE(int, lzo_vget_int) (int v, int expr) -{ - __LZOLIB_VGET_BODY(int) -} -LZOLIB_PUBLIC_NOINLINE(long, lzo_vget_long) (long v, int expr) -{ - __LZOLIB_VGET_BODY(long) -} -#if defined(lzo_int64l_t) -LZOLIB_PUBLIC_NOINLINE(lzo_int64l_t, lzo_vget_lzo_int64l_t) (lzo_int64l_t v, int expr) -{ - __LZOLIB_VGET_BODY(lzo_int64l_t) -} -#endif -LZOLIB_PUBLIC_NOINLINE(lzo_hsize_t, lzo_vget_lzo_hsize_t) (lzo_hsize_t v, int expr) -{ - __LZOLIB_VGET_BODY(lzo_hsize_t) -} -#if !(LZO_CFG_NO_DOUBLE) -LZOLIB_PUBLIC_NOINLINE(double, lzo_vget_double) (double v, int expr) -{ - __LZOLIB_VGET_BODY(double) -} -#endif -LZOLIB_PUBLIC_NOINLINE(lzo_hvoid_p, lzo_vget_lzo_hvoid_p) (lzo_hvoid_p v, int expr) -{ - __LZOLIB_VGET_BODY(lzo_hvoid_p) -} -#if (LZO_ARCH_I086 && LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) && !defined(__cplusplus) -LZOLIB_PUBLIC_NOINLINE(lzo_hvoid_p, lzo_vget_lzo_hvoid_cp) (const lzo_hvoid_p vv, int expr) -{ - lzo_hvoid_p v = (lzo_hvoid_p) vv; - __LZOLIB_VGET_BODY(lzo_hvoid_p) -} -#else -LZOLIB_PUBLIC_NOINLINE(const lzo_hvoid_p, lzo_vget_lzo_hvoid_cp) (const lzo_hvoid_p v, int expr) -{ - __LZOLIB_VGET_BODY(const lzo_hvoid_p) -} -#endif -#endif -#if defined(LZO_WANT_ACCLIB_HMEMCPY) -# undef LZO_WANT_ACCLIB_HMEMCPY -#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP) - const lzo_hbyte_p p1 = LZO_STATIC_CAST(const lzo_hbyte_p, s1); - const lzo_hbyte_p p2 = LZO_STATIC_CAST(const lzo_hbyte_p, s2); - if __lzo_likely(len > 0) do - { - int d = *p1 - *p2; - if (d != 0) - return d; - p1++; p2++; - } while __lzo_likely(--len > 0); - return 0; -#else - return memcmp(s1, s2, len); -#endif -} -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY) - lzo_hbyte_p p1 = LZO_STATIC_CAST(lzo_hbyte_p, dest); - const lzo_hbyte_p p2 = LZO_STATIC_CAST(const lzo_hbyte_p, src); - if (!(len > 0) || p1 == p2) - return dest; - do - *p1++ = *p2++; - while __lzo_likely(--len > 0); - return dest; -#else - return memcpy(dest, src, len); -#endif -} -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE) - lzo_hbyte_p p1 = LZO_STATIC_CAST(lzo_hbyte_p, dest); - const lzo_hbyte_p p2 = LZO_STATIC_CAST(const lzo_hbyte_p, src); - if (!(len > 0) || p1 == p2) - return dest; - if (p1 < p2) - { - do - *p1++ = *p2++; - while __lzo_likely(--len > 0); - } - else - { - p1 += len; - p2 += len; - do - *--p1 = *--p2; - while __lzo_likely(--len > 0); - } - return dest; -#else - return memmove(dest, src, len); -#endif -} -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int cc, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET) - lzo_hbyte_p p = LZO_STATIC_CAST(lzo_hbyte_p, s); - unsigned char c = LZO_ITRUNC(unsigned char, cc); - if __lzo_likely(len > 0) do - *p++ = c; - while __lzo_likely(--len > 0); - return s; -#else - return memset(s, cc, len); -#endif -} -#endif -#if defined(LZO_WANT_ACCLIB_RAND) -# undef LZO_WANT_ACCLIB_RAND -#define __LZOLIB_RAND_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -LZOLIB_PUBLIC(void, lzo_srand31) (lzo_rand31_p r, lzo_uint32l_t seed) -{ - r->seed = seed & LZO_UINT32_C(0xffffffff); -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_rand31) (lzo_rand31_p r) -{ - r->seed = r->seed * LZO_UINT32_C(1103515245) + 12345; - r->seed &= LZO_UINT32_C(0x7fffffff); - return r->seed; -} -#if defined(lzo_int64l_t) -LZOLIB_PUBLIC(void, lzo_srand48) (lzo_rand48_p r, lzo_uint32l_t seed) -{ - r->seed = seed & LZO_UINT32_C(0xffffffff); - r->seed <<= 16; r->seed |= 0x330e; -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_rand48) (lzo_rand48_p r) -{ - lzo_uint64l_t a; - r->seed = r->seed * LZO_UINT64_C(25214903917) + 11; - r->seed &= LZO_UINT64_C(0xffffffffffff); - a = r->seed >> 17; - return LZO_STATIC_CAST(lzo_uint32l_t, a); -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_rand48_r32) (lzo_rand48_p r) -{ - lzo_uint64l_t a; - r->seed = r->seed * LZO_UINT64_C(25214903917) + 11; - r->seed &= LZO_UINT64_C(0xffffffffffff); - a = r->seed >> 16; - return LZO_STATIC_CAST(lzo_uint32l_t, a); -} -#endif -#if defined(lzo_int64l_t) -LZOLIB_PUBLIC(void, lzo_srand64) (lzo_rand64_p r, lzo_uint64l_t seed) -{ - r->seed = seed & LZO_UINT64_C(0xffffffffffffffff); -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_rand64) (lzo_rand64_p r) -{ - lzo_uint64l_t a; - r->seed = r->seed * LZO_UINT64_C(6364136223846793005) + 1; -#if (LZO_SIZEOF_LZO_INT64L_T > 8) - r->seed &= LZO_UINT64_C(0xffffffffffffffff); -#endif - a = r->seed >> 33; - return LZO_STATIC_CAST(lzo_uint32l_t, a); -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_rand64_r32) (lzo_rand64_p r) -{ - lzo_uint64l_t a; - r->seed = r->seed * LZO_UINT64_C(6364136223846793005) + 1; -#if (LZO_SIZEOF_LZO_INT64L_T > 8) - r->seed &= LZO_UINT64_C(0xffffffffffffffff); -#endif - a = r->seed >> 32; - return LZO_STATIC_CAST(lzo_uint32l_t, a); -} -#endif -LZOLIB_PUBLIC(void, lzo_srandmt) (lzo_randmt_p r, lzo_uint32l_t seed) -{ - unsigned i = 0; - do { - r->s[i++] = (seed &= LZO_UINT32_C(0xffffffff)); - seed ^= seed >> 30; - seed = seed * LZO_UINT32_C(0x6c078965) + i; - } while (i != 624); - r->n = i; -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_randmt) (lzo_randmt_p r) -{ - return (__LZOLIB_FUNCNAME(lzo_randmt_r32)(r)) >> 1; -} -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_randmt_r32) (lzo_randmt_p r) -{ - lzo_uint32l_t v; - if __lzo_unlikely(r->n == 624) { - unsigned i = 0, j; - r->n = 0; - do { - j = i - 623; if (LZO_STATIC_CAST(int, j) < 0) j += 624; - v = (r->s[i] & LZO_UINT32_C(0x80000000)) ^ (r->s[j] & LZO_UINT32_C(0x7fffffff)); - j = i - 227; if (LZO_STATIC_CAST(int, j) < 0) j += 624; - r->s[i] = r->s[j] ^ (v >> 1); - if (v & 1) r->s[i] ^= LZO_UINT32_C(0x9908b0df); - } while (++i != 624); - } - { unsigned i = r->n++; v = r->s[i]; } - v ^= v >> 11; v ^= (v & LZO_UINT32_C(0x013a58ad)) << 7; - v ^= (v & LZO_UINT32_C(0x0001df8c)) << 15; v ^= v >> 18; - return v; -} -#if defined(lzo_int64l_t) -LZOLIB_PUBLIC(void, lzo_srandmt64) (lzo_randmt64_p r, lzo_uint64l_t seed) -{ - unsigned i = 0; - do { - r->s[i++] = (seed &= LZO_UINT64_C(0xffffffffffffffff)); - seed ^= seed >> 62; - seed = seed * LZO_UINT64_C(0x5851f42d4c957f2d) + i; - } while (i != 312); - r->n = i; -} -#if 0 -LZOLIB_PUBLIC(lzo_uint32l_t, lzo_randmt64) (lzo_randmt64_p r) -{ - lzo_uint64l_t v; - v = (__LZOLIB_FUNCNAME(lzo_randmt64_r64)(r)) >> 33; - return LZO_STATIC_CAST(lzo_uint32l_t, v); -} -#endif -LZOLIB_PUBLIC(lzo_uint64l_t, lzo_randmt64_r64) (lzo_randmt64_p r) -{ - lzo_uint64l_t v; - if __lzo_unlikely(r->n == 312) { - unsigned i = 0, j; - r->n = 0; - do { - j = i - 311; if (LZO_STATIC_CAST(int, j) < 0) j += 312; - v = (r->s[i] & LZO_UINT64_C(0xffffffff80000000)) ^ (r->s[j] & LZO_UINT64_C(0x7fffffff)); - j = i - 156; if (LZO_STATIC_CAST(int, j) < 0) j += 312; - r->s[i] = r->s[j] ^ (v >> 1); - if (v & 1) r->s[i] ^= LZO_UINT64_C(0xb5026f5aa96619e9); - } while (++i != 312); - } - { unsigned i = r->n++; v = r->s[i]; } - v ^= (v & LZO_UINT64_C(0xaaaaaaaaa0000000)) >> 29; - v ^= (v & LZO_UINT64_C(0x38eb3ffff6d3)) << 17; - v ^= (v & LZO_UINT64_C(0x7ffbf77)) << 37; - return v ^ (v >> 43); -} -#endif -#endif -#if defined(LZO_WANT_ACCLIB_RDTSC) -# undef LZO_WANT_ACCLIB_RDTSC -#define __LZOLIB_RDTSC_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if defined(lzo_int32e_t) -#if (LZO_OS_WIN32 && LZO_CC_PELLESC && (__POCC__ >= 290)) -# pragma warn(push) -# pragma warn(disable:2007) -#endif -#if (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) -#if (LZO_ARCH_AMD64 && LZO_CC_INTELC) -# define __LZOLIB_RDTSC_REGS : : "c" (t) : "memory", "rax", "rdx" -#elif (LZO_ARCH_AMD64) -# define __LZOLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "rax", "rdx" -#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) -# define __LZOLIB_RDTSC_REGS : : "c" (t) : "ax", "dx" -#elif (LZO_ARCH_I386 && LZO_CC_INTELC) -# define __LZOLIB_RDTSC_REGS : : "c" (t) : "memory", "eax", "edx" -#else -# define __LZOLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "eax", "edx" -#endif -#endif -LZOLIB_PUBLIC(int, lzo_tsc_read) (lzo_uint32e_t* t) -{ -#if (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - __asm__ __volatile__( - "clc \n" ".byte 0x0f,0x31\n" - "movl %%eax,(%0)\n" "movl %%edx,4(%0)\n" - __LZOLIB_RDTSC_REGS - ); - return 0; -#elif (LZO_ARCH_I386) && (LZO_ASM_SYNTAX_MSC) - LZO_UNUSED(t); - __asm { - mov ecx, t - clc -# if (LZO_CC_MSC && (_MSC_VER < 1200)) - _emit 0x0f - _emit 0x31 -# else - rdtsc -# endif - mov [ecx], eax - mov [ecx+4], edx - } - return 0; -#else - t[0] = t[1] = 0; return -1; -#endif -} -#if (LZO_OS_WIN32 && LZO_CC_PELLESC && (__POCC__ >= 290)) -# pragma warn(pop) -#endif -#endif -#endif -#if defined(LZO_WANT_ACCLIB_DOSALLOC) -# undef LZO_WANT_ACCLIB_DOSALLOC -#define __LZOLIB_DOSALLOC_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if (LZO_OS_OS216) -LZO_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short); -LZO_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short); -#endif -#if (LZO_OS_DOS16 || LZO_OS_WIN16) -#if !(LZO_CC_AZTECC) -LZOLIB_PUBLIC(void __far*, lzo_dos_alloc) (unsigned long size) -{ - void __far* p = 0; - union REGS ri, ro; - if ((long)size <= 0) - return p; - size = (size + 15) >> 4; - if (size > 0xffffu) - return p; - ri.x.ax = 0x4800; - ri.x.bx = (unsigned short) size; - int86(0x21, &ri, &ro); - if ((ro.x.cflag & 1) == 0) - p = (void __far*) LZO_PTR_MK_FP(ro.x.ax, 0); - return p; -} -LZOLIB_PUBLIC(int, lzo_dos_free) (void __far* p) -{ - union REGS ri, ro; - struct SREGS rs; - if (!p) - return 0; - if (LZO_PTR_FP_OFF(p) != 0) - return -1; - segread(&rs); - ri.x.ax = 0x4900; - rs.es = LZO_PTR_FP_SEG(p); - int86x(0x21, &ri, &ro, &rs); - if (ro.x.cflag & 1) - return -1; - return 0; -} -#endif -#endif -#if (LZO_OS_OS216) -LZOLIB_PUBLIC(void __far*, lzo_dos_alloc) (unsigned long size) -{ - void __far* p = 0; - unsigned short sel = 0; - if ((long)size <= 0) - return p; - if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0) - p = (void __far*) LZO_PTR_MK_FP(sel, 0); - return p; -} -LZOLIB_PUBLIC(int, lzo_dos_free) (void __far* p) -{ - if (!p) - return 0; - if (LZO_PTR_FP_OFF(p) != 0) - return -1; - if (DosFreeSeg(LZO_PTR_FP_SEG(p)) != 0) - return -1; - return 0; -} -#endif -#endif -#if defined(LZO_WANT_ACCLIB_GETOPT) -# undef LZO_WANT_ACCLIB_GETOPT -#define __LZOLIB_GETOPT_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -LZOLIB_PUBLIC(void, lzo_getopt_init) (lzo_getopt_p g, - int start_argc, int argc, char** argv) -{ - memset(g, 0, sizeof(*g)); - g->optind = start_argc; - g->argc = argc; g->argv = argv; - g->optopt = -1; -} -static int __LZOLIB_FUNCNAME(lzo_getopt_rotate) (char** p, int first, int middle, int last) -{ - int i = middle, n = middle - first; - if (first >= middle || middle >= last) return 0; - for (;;) - { - char* t = p[first]; p[first] = p[i]; p[i] = t; - if (++first == middle) - { - if (++i == last) break; - middle = i; - } - else if (++i == last) - i = middle; - } - return n; -} -static int __LZOLIB_FUNCNAME(lzo_getopt_perror) (lzo_getopt_p g, int ret, const char* f, ...) -{ - if (g->opterr) - { -#if (HAVE_STDARG_H) - struct { va_list ap; } s; - va_start(s.ap, f); - g->opterr(g, f, &s); - va_end(s.ap); -#else - g->opterr(g, f, NULL); -#endif - } - ++g->errcount; - return ret; -} -LZOLIB_PUBLIC(int, lzo_getopt) (lzo_getopt_p g, - const char* shortopts, - const lzo_getopt_longopt_p longopts, - int* longind) -{ -#define pe __LZOLIB_FUNCNAME(lzo_getopt_perror) - int ordering = LZO_GETOPT_PERMUTE; - int missing_arg_ret = g->bad_option; - char* a; - if (shortopts) - { - if (*shortopts == '-' || *shortopts == '+') - ordering = *shortopts++ == '-' ? LZO_GETOPT_RETURN_IN_ORDER : LZO_GETOPT_REQUIRE_ORDER; - if (*shortopts == ':') - missing_arg_ret = *shortopts++; - } - g->optarg = NULL; - if (g->optopt == -1) - g->optopt = g->bad_option; - if (longind) - *longind = -1; - if (g->eof) - return -1; - if (g->shortpos) - goto lzo_label_next_shortopt; - g->optind -= __LZOLIB_FUNCNAME(lzo_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind); - g->pending_rotate_first = g->pending_rotate_middle = g->optind; - if (ordering == LZO_GETOPT_PERMUTE) - { - while (g->optind < g->argc && !(g->argv[g->optind][0] == '-' && g->argv[g->optind][1])) - ++g->optind; - g->pending_rotate_middle = g->optind; - } - if (g->optind >= g->argc) - { - g->optind = g->pending_rotate_first; - goto lzo_label_eof; - } - a = g->argv[g->optind]; - if (a[0] == '-' && a[1] == '-') - { - size_t l = 0; - const lzo_getopt_longopt_p o; - const lzo_getopt_longopt_p o1 = NULL; - const lzo_getopt_longopt_p o2 = NULL; - int need_exact = 0; - ++g->optind; - if (!a[2]) - goto lzo_label_eof; - for (a += 2; a[l] && a[l] != '=' && a[l] != '#'; ) - ++l; - for (o = longopts; l && o && o->name; ++o) - { - if (strncmp(a, o->name, l) != 0) - continue; - if (!o->name[l]) - goto lzo_label_found_o; - need_exact |= o->has_arg & LZO_GETOPT_EXACT_ARG; - if (o1) o2 = o; - else o1 = o; - } - if (!o1 || need_exact) - return pe(g, g->bad_option, "unrecognized option '--%s'", a); - if (o2) - return pe(g, g->bad_option, "option '--%s' is ambiguous (could be '--%s' or '--%s')", a, o1->name, o2->name); - o = o1; - lzo_label_found_o: - a += l; - switch (o->has_arg & 0x2f) - { - case LZO_GETOPT_OPTIONAL_ARG: - if (a[0]) - g->optarg = a + 1; - break; - case LZO_GETOPT_REQUIRED_ARG: - if (a[0]) - g->optarg = a + 1; - else if (g->optind < g->argc) - g->optarg = g->argv[g->optind++]; - if (!g->optarg) - return pe(g, missing_arg_ret, "option '--%s' requires an argument", o->name); - break; - case LZO_GETOPT_REQUIRED_ARG | 0x20: - if (a[0] && a[1]) - g->optarg = a + 1; - if (!g->optarg) - return pe(g, missing_arg_ret, "option '--%s=' requires an argument", o->name); - break; - default: - if (a[0]) - return pe(g, g->bad_option, "option '--%s' doesn't allow an argument", o->name); - break; - } - if (longind) - *longind = (int) (o - longopts); - if (o->flag) - { - *o->flag = o->val; - return 0; - } - return o->val; - } - if (a[0] == '-' && a[1]) - { - unsigned char c; - const char* s; - lzo_label_next_shortopt: - a = g->argv[g->optind] + ++g->shortpos; - c = (unsigned char) *a++; s = NULL; - if (c != ':' && shortopts) - s = strchr(shortopts, c); - if (!s || s[1] != ':') - { - if (!a[0]) - { ++g->optind; g->shortpos = 0; } - if (!s) - { - g->optopt = c; - return pe(g, g->bad_option, "invalid option '-%c'", c); - } - } - else - { - ++g->optind; g->shortpos = 0; - if (a[0]) - g->optarg = a; - else if (s[2] != ':') - { - if (g->optind < g->argc) - g->optarg = g->argv[g->optind++]; - else - { - g->optopt = c; - return pe(g, missing_arg_ret, "option '-%c' requires an argument", c); - } - } - } - return c; - } - if (ordering == LZO_GETOPT_RETURN_IN_ORDER) - { - ++g->optind; - g->optarg = a; - return 1; - } -lzo_label_eof: - g->optind -= __LZOLIB_FUNCNAME(lzo_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind); - g->pending_rotate_first = g->pending_rotate_middle = g->optind; - g->eof = 1; - return -1; -#undef pe -} -#endif -#if defined(LZO_WANT_ACCLIB_HALLOC) -# undef LZO_WANT_ACCLIB_HALLOC -#define __LZOLIB_HALLOC_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if (LZO_HAVE_MM_HUGE_PTR) -#if 1 && (LZO_OS_DOS16 && defined(BLX286)) -# define __LZOLIB_HALLOC_USE_DAH 1 -#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) -# define __LZOLIB_HALLOC_USE_DAH 1 -#elif 1 && (LZO_OS_OS216) -# define __LZOLIB_HALLOC_USE_DAH 1 -#elif 1 && (LZO_OS_WIN16) -# define __LZOLIB_HALLOC_USE_GA 1 -#elif 1 && (LZO_OS_DOS16) && (LZO_CC_BORLANDC) && defined(__DPMI16__) -# define __LZOLIB_HALLOC_USE_GA 1 -#endif -#endif -#if (__LZOLIB_HALLOC_USE_DAH) -#if 0 && (LZO_OS_OS216) -#include -#else -LZO_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short); -LZO_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short); -#endif -#endif -#if (__LZOLIB_HALLOC_USE_GA) -#if 0 -#define STRICT 1 -#include -#else -LZO_EXTERN_C const void __near* __far __pascal GlobalAlloc(unsigned, unsigned long); -LZO_EXTERN_C const void __near* __far __pascal GlobalFree(const void __near*); -LZO_EXTERN_C unsigned long __far __pascal GlobalHandle(unsigned); -LZO_EXTERN_C void __far* __far __pascal GlobalLock(const void __near*); -LZO_EXTERN_C int __far __pascal GlobalUnlock(const void __near*); -#endif -#endif -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_halloc) (lzo_hsize_t size) -{ - lzo_hvoid_p p = LZO_STATIC_CAST(lzo_hvoid_p, 0); - if (!(size > 0)) - return p; -#if 0 && defined(__palmos__) - p = MemPtrNew(size); -#elif !(LZO_HAVE_MM_HUGE_PTR) - if (size < LZO_STATIC_CAST(size_t, -1)) - p = malloc(LZO_STATIC_CAST(size_t, size)); -#else - if (LZO_STATIC_CAST(long, size) <= 0) - return p; -{ -#if (__LZOLIB_HALLOC_USE_DAH) - unsigned short sel = 0; - if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0) - p = (lzo_hvoid_p) LZO_PTR_MK_FP(sel, 0); -#elif (__LZOLIB_HALLOC_USE_GA) - const void __near* h = GlobalAlloc(2, size); - if (h) { - p = GlobalLock(h); - if (p && LZO_PTR_FP_OFF(p) != 0) { - GlobalUnlock(h); - p = 0; - } - if (!p) - GlobalFree(h); - } -#elif (LZO_CC_MSC && (_MSC_VER >= 700)) - p = _halloc(size, 1); -#elif (LZO_CC_MSC || LZO_CC_WATCOMC) - p = halloc(size, 1); -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) - p = farmalloc(size); -#elif (LZO_CC_BORLANDC || LZO_CC_TURBOC) - p = farmalloc(size); -#elif (LZO_CC_AZTECC) - p = lmalloc(size); -#else - if (size < LZO_STATIC_CAST(size_t, -1)) - p = malloc(LZO_STATIC_CAST(size_t, size)); -#endif -} -#endif - return p; -} -LZOLIB_PUBLIC(void, lzo_hfree) (lzo_hvoid_p p) -{ - if (!p) - return; -#if 0 && defined(__palmos__) - MemPtrFree(p); -#elif !(LZO_HAVE_MM_HUGE_PTR) - free(p); -#else -#if (__LZOLIB_HALLOC_USE_DAH) - if (LZO_PTR_FP_OFF(p) == 0) - DosFreeSeg((unsigned short) LZO_PTR_FP_SEG(p)); -#elif (__LZOLIB_HALLOC_USE_GA) - if (LZO_PTR_FP_OFF(p) == 0) { - const void __near* h = (const void __near*) (unsigned) GlobalHandle(LZO_PTR_FP_SEG(p)); - if (h) { - GlobalUnlock(h); - GlobalFree(h); - } - } -#elif (LZO_CC_MSC && (_MSC_VER >= 700)) - _hfree(p); -#elif (LZO_CC_MSC || LZO_CC_WATCOMC) - hfree(p); -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) - farfree((void __far*) p); -#elif (LZO_CC_BORLANDC || LZO_CC_TURBOC) - farfree((void __far*) p); -#elif (LZO_CC_AZTECC) - lfree(p); -#else - free(p); -#endif -#endif -} -#endif -#if defined(LZO_WANT_ACCLIB_HFREAD) -# undef LZO_WANT_ACCLIB_HFREAD -#define __LZOLIB_HFREAD_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -LZOLIB_PUBLIC(lzo_hsize_t, lzo_hfread) (void* vfp, lzo_hvoid_p buf, lzo_hsize_t size) -{ - FILE* fp = LZO_STATIC_CAST(FILE *, vfp); -#if (LZO_HAVE_MM_HUGE_PTR) -#if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) -#define __LZOLIB_REQUIRE_HMEMCPY_CH 1 - unsigned char tmp[512]; - lzo_hsize_t l = 0; - while (l < size) - { - size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l); - n = fread(tmp, 1, n, fp); - if (n == 0) - break; - __LZOLIB_FUNCNAME(lzo_hmemcpy)((lzo_hbyte_p)buf + l, tmp, (lzo_hsize_t)n); - l += n; - } - return l; -#elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) - lzo_hbyte_p b = (lzo_hbyte_p) buf; - lzo_hsize_t l = 0; - while (l < size) - { - size_t n; - n = LZO_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n); - if ((lzo_hsize_t) n > size - l) - n = (size_t) (size - l); - n = fread((void __far*)b, 1, n, fp); - if (n == 0) - break; - b += n; l += n; - } - return l; -#else -# error "unknown memory model" -#endif -#else - return fread(buf, 1, size, fp); -#endif -} -LZOLIB_PUBLIC(lzo_hsize_t, lzo_hfwrite) (void* vfp, const lzo_hvoid_p buf, lzo_hsize_t size) -{ - FILE* fp = LZO_STATIC_CAST(FILE *, vfp); -#if (LZO_HAVE_MM_HUGE_PTR) -#if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) -#define __LZOLIB_REQUIRE_HMEMCPY_CH 1 - unsigned char tmp[512]; - lzo_hsize_t l = 0; - while (l < size) - { - size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l); - __LZOLIB_FUNCNAME(lzo_hmemcpy)(tmp, (const lzo_hbyte_p)buf + l, (lzo_hsize_t)n); - n = fwrite(tmp, 1, n, fp); - if (n == 0) - break; - l += n; - } - return l; -#elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) - const lzo_hbyte_p b = (const lzo_hbyte_p) buf; - lzo_hsize_t l = 0; - while (l < size) - { - size_t n; - n = LZO_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n); - if ((lzo_hsize_t) n > size - l) - n = (size_t) (size - l); - n = fwrite((void __far*)b, 1, n, fp); - if (n == 0) - break; - b += n; l += n; - } - return l; -#else -# error "unknown memory model" -#endif -#else - return fwrite(buf, 1, size, fp); -#endif -} -#endif -#if defined(LZO_WANT_ACCLIB_HSREAD) -# undef LZO_WANT_ACCLIB_HSREAD -#define __LZOLIB_HSREAD_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -LZOLIB_PUBLIC(long, lzo_safe_hread) (int fd, lzo_hvoid_p buf, long size) -{ - lzo_hbyte_p b = (lzo_hbyte_p) buf; - long l = 0; - int saved_errno; - saved_errno = errno; - while (l < size) - { - long n = size - l; -#if (LZO_HAVE_MM_HUGE_PTR) -# define __LZOLIB_REQUIRE_HREAD_CH 1 - errno = 0; n = lzo_hread(fd, b, n); -#elif (LZO_OS_DOS32) && defined(__DJGPP__) - errno = 0; n = _read(fd, b, n); -#else - errno = 0; n = read(fd, b, n); -#endif - if (n == 0) - break; - if (n < 0) { -#if defined(EAGAIN) - if (errno == (EAGAIN)) continue; -#endif -#if defined(EINTR) - if (errno == (EINTR)) continue; -#endif - if (errno == 0) errno = 1; - return l; - } - b += n; l += n; - } - errno = saved_errno; - return l; -} -LZOLIB_PUBLIC(long, lzo_safe_hwrite) (int fd, const lzo_hvoid_p buf, long size) -{ - const lzo_hbyte_p b = (const lzo_hbyte_p) buf; - long l = 0; - int saved_errno; - saved_errno = errno; - while (l < size) - { - long n = size - l; -#if (LZO_HAVE_MM_HUGE_PTR) -# define __LZOLIB_REQUIRE_HREAD_CH 1 - errno = 0; n = lzo_hwrite(fd, b, n); -#elif (LZO_OS_DOS32) && defined(__DJGPP__) - errno = 0; n = _write(fd, b, n); -#else - errno = 0; n = write(fd, b, n); -#endif - if (n == 0) - break; - if (n < 0) { -#if defined(EAGAIN) - if (errno == (EAGAIN)) continue; -#endif -#if defined(EINTR) - if (errno == (EINTR)) continue; -#endif - if (errno == 0) errno = 1; - return l; - } - b += n; l += n; - } - errno = saved_errno; - return l; -} -#endif -#if defined(LZO_WANT_ACCLIB_PCLOCK) -# undef LZO_WANT_ACCLIB_PCLOCK -#define __LZOLIB_PCLOCK_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if 1 && (LZO_OS_POSIX_LINUX && LZO_ARCH_AMD64 && LZO_ASM_SYNTAX_GNUC && !LZO_CFG_NO_SYSCALL) -#ifndef lzo_pclock_syscall_clock_gettime -#define lzo_pclock_syscall_clock_gettime lzo_pclock_syscall_clock_gettime -#endif -__lzo_static_noinline long lzo_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) -{ - unsigned long r = 228; - __asm__ __volatile__("syscall\n" : "=a" (r), "=m" (*ts) : "0" (r), "D" (clockid), "S" (ts) __LZO_ASM_CLOBBER_LIST_CC); - return LZO_ICAST(long, r); -} -#endif -#if 1 && (LZO_OS_POSIX_LINUX && LZO_ARCH_I386 && LZO_ASM_SYNTAX_GNUC && !LZO_CFG_NO_SYSCALL) && defined(lzo_int64l_t) -#ifndef lzo_pclock_syscall_clock_gettime -#define lzo_pclock_syscall_clock_gettime lzo_pclock_syscall_clock_gettime -#endif -__lzo_static_noinline long lzo_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) -{ - unsigned long r = 265; - __asm__ __volatile__("pushl %%ebx\n pushl %%edx\n popl %%ebx\n int $0x80\n popl %%ebx\n": "=a" (r), "=m" (*ts) : "0" (r), "d" (clockid), "c" (ts) __LZO_ASM_CLOBBER_LIST_CC); - return LZO_ICAST(long, r); -} -#endif -#if 0 && defined(lzo_pclock_syscall_clock_gettime) -#ifndef lzo_pclock_read_clock_gettime_r_syscall -#define lzo_pclock_read_clock_gettime_r_syscall lzo_pclock_read_clock_gettime_r_syscall -#endif -static int lzo_pclock_read_clock_gettime_r_syscall(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timespec ts; - if (lzo_pclock_syscall_clock_gettime(0, &ts) != 0) - return -1; - c->tv_sec = ts.tv_sec; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ts.tv_nsec); - LZO_UNUSED(h); return 0; -} -#endif -#if (HAVE_GETTIMEOFDAY) -#ifndef lzo_pclock_read_gettimeofday -#define lzo_pclock_read_gettimeofday lzo_pclock_read_gettimeofday -#endif -static int lzo_pclock_read_gettimeofday(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timeval tv; - if (gettimeofday(&tv, NULL) != 0) - return -1; -#if defined(lzo_int64l_t) - c->tv_sec = tv.tv_sec; -#else - c->tv_sec_high = 0; - c->tv_sec_low = tv.tv_sec; -#endif - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, (tv.tv_usec * 1000u)); - LZO_UNUSED(h); return 0; -} -#endif -#if defined(CLOCKS_PER_SEC) && !(LZO_CFG_NO_DOUBLE) -#ifndef lzo_pclock_read_clock -#define lzo_pclock_read_clock lzo_pclock_read_clock -#endif -static int lzo_pclock_read_clock(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - clock_t ticks; - double secs; -#if defined(lzo_int64l_t) - lzo_uint64l_t nsecs; - ticks = clock(); - secs = LZO_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC); - nsecs = LZO_STATIC_CAST(lzo_uint64l_t, (secs * 1000000000.0)); - c->tv_sec = LZO_STATIC_CAST(lzo_int64l_t, (nsecs / 1000000000ul)); - nsecs = (nsecs % 1000000000ul); - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, nsecs); -#else - ticks = clock(); - secs = LZO_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC); - c->tv_sec_high = 0; - c->tv_sec_low = LZO_STATIC_CAST(lzo_uint32l_t, (secs + 0.5)); - c->tv_nsec = 0; -#endif - LZO_UNUSED(h); return 0; -} -#endif -#if 1 && defined(lzo_pclock_syscall_clock_gettime) -#ifndef lzo_pclock_read_clock_gettime_m_syscall -#define lzo_pclock_read_clock_gettime_m_syscall lzo_pclock_read_clock_gettime_m_syscall -#endif -static int lzo_pclock_read_clock_gettime_m_syscall(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timespec ts; - if (lzo_pclock_syscall_clock_gettime(1, &ts) != 0) - return -1; - c->tv_sec = ts.tv_sec; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ts.tv_nsec); - LZO_UNUSED(h); return 0; -} -#endif -#if (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC) && !(LZO_CFG_NO_DOUBLE) -#ifndef lzo_pclock_read_uclock -#define lzo_pclock_read_uclock lzo_pclock_read_uclock -#endif -static int lzo_pclock_read_uclock(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - lzo_uint64l_t ticks; - double secs; - lzo_uint64l_t nsecs; - ticks = uclock(); - secs = LZO_STATIC_CAST(double, ticks) / (UCLOCKS_PER_SEC); - nsecs = LZO_STATIC_CAST(lzo_uint64l_t, (secs * 1000000000.0)); - c->tv_sec = nsecs / 1000000000ul; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, (nsecs % 1000000000ul)); - LZO_UNUSED(h); return 0; -} -#endif -#if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) && defined(lzo_int64l_t) -#ifndef lzo_pclock_read_clock_gettime_p_libc -#define lzo_pclock_read_clock_gettime_p_libc lzo_pclock_read_clock_gettime_p_libc -#endif -static int lzo_pclock_read_clock_gettime_p_libc(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timespec ts; - if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0) - return -1; - c->tv_sec = ts.tv_sec; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ts.tv_nsec); - LZO_UNUSED(h); return 0; -} -#endif -#if 1 && defined(lzo_pclock_syscall_clock_gettime) -#ifndef lzo_pclock_read_clock_gettime_p_syscall -#define lzo_pclock_read_clock_gettime_p_syscall lzo_pclock_read_clock_gettime_p_syscall -#endif -static int lzo_pclock_read_clock_gettime_p_syscall(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timespec ts; - if (lzo_pclock_syscall_clock_gettime(2, &ts) != 0) - return -1; - c->tv_sec = ts.tv_sec; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ts.tv_nsec); - LZO_UNUSED(h); return 0; -} -#endif -#if (LZO_OS_CYGWIN || LZO_OS_WIN32 || LZO_OS_WIN64) && (LZO_HAVE_WINDOWS_H) && defined(lzo_int64l_t) -#ifndef lzo_pclock_read_getprocesstimes -#define lzo_pclock_read_getprocesstimes lzo_pclock_read_getprocesstimes -#endif -static int lzo_pclock_read_getprocesstimes(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - FILETIME ct, et, kt, ut; - lzo_uint64l_t ticks; - if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut) == 0) - return -1; - ticks = (LZO_STATIC_CAST(lzo_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime; - if __lzo_unlikely(h->ticks_base == 0) - h->ticks_base = ticks; - else - ticks -= h->ticks_base; - c->tv_sec = LZO_STATIC_CAST(lzo_int64l_t, (ticks / 10000000ul)); - ticks = (ticks % 10000000ul) * 100u; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ticks); - LZO_UNUSED(h); return 0; -} -#endif -#if (HAVE_GETRUSAGE) && defined(RUSAGE_SELF) -#ifndef lzo_pclock_read_getrusage -#define lzo_pclock_read_getrusage lzo_pclock_read_getrusage -#endif -static int lzo_pclock_read_getrusage(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct rusage ru; - if (getrusage(RUSAGE_SELF, &ru) != 0) - return -1; -#if defined(lzo_int64l_t) - c->tv_sec = ru.ru_utime.tv_sec; -#else - c->tv_sec_high = 0; - c->tv_sec_low = ru.ru_utime.tv_sec; -#endif - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, (ru.ru_utime.tv_usec * 1000u)); - LZO_UNUSED(h); return 0; -} -#endif -#if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(lzo_int64l_t) -#ifndef lzo_pclock_read_clock_gettime_t_libc -#define lzo_pclock_read_clock_gettime_t_libc lzo_pclock_read_clock_gettime_t_libc -#endif -static int lzo_pclock_read_clock_gettime_t_libc(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timespec ts; - if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0) - return -1; - c->tv_sec = ts.tv_sec; - c->tv_nsec = (lzo_uint32l_t) ts.tv_nsec; - LZO_UNUSED(h); return 0; -} -#endif -#if 1 && defined(lzo_pclock_syscall_clock_gettime) -#ifndef lzo_pclock_read_clock_gettime_t_syscall -#define lzo_pclock_read_clock_gettime_t_syscall lzo_pclock_read_clock_gettime_t_syscall -#endif -static int lzo_pclock_read_clock_gettime_t_syscall(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - struct timespec ts; - if (lzo_pclock_syscall_clock_gettime(3, &ts) != 0) - return -1; - c->tv_sec = ts.tv_sec; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ts.tv_nsec); - LZO_UNUSED(h); return 0; -} -#endif -#if (LZO_OS_CYGWIN || LZO_OS_WIN32 || LZO_OS_WIN64) && (LZO_HAVE_WINDOWS_H) && defined(lzo_int64l_t) -#ifndef lzo_pclock_read_getthreadtimes -#define lzo_pclock_read_getthreadtimes lzo_pclock_read_getthreadtimes -#endif -static int lzo_pclock_read_getthreadtimes(lzo_pclock_handle_p h, lzo_pclock_p c) -{ - FILETIME ct, et, kt, ut; - lzo_uint64l_t ticks; - if (GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut) == 0) - return -1; - ticks = (LZO_STATIC_CAST(lzo_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime; - if __lzo_unlikely(h->ticks_base == 0) - h->ticks_base = ticks; - else - ticks -= h->ticks_base; - c->tv_sec = LZO_STATIC_CAST(lzo_int64l_t, (ticks / 10000000ul)); - ticks = (ticks % 10000000ul) * 100u; - c->tv_nsec = LZO_STATIC_CAST(lzo_uint32l_t, ticks); - LZO_UNUSED(h); return 0; -} -#endif -LZOLIB_PUBLIC(int, lzo_pclock_open) (lzo_pclock_handle_p h, int mode) -{ - lzo_pclock_t c; - int i; - h->h = LZO_STATIC_CAST(lzolib_handle_t, 0); - h->mode = -1; - h->read_error = 2; - h->name = NULL; - h->gettime = LZO_STATIC_CAST(lzo_pclock_gettime_t, 0); -#if defined(lzo_int64l_t) - h->ticks_base = 0; -#endif - switch (mode) - { - case LZO_PCLOCK_REALTIME: -# if defined(lzo_pclock_read_clock_gettime_r_syscall) - if (lzo_pclock_read_clock_gettime_r_syscall(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock_gettime_r_syscall; - h->name = "CLOCK_REALTIME/syscall"; - break; - } -# endif -# if defined(lzo_pclock_read_gettimeofday) - if (lzo_pclock_read_gettimeofday(h, &c) == 0) { - h->gettime = lzo_pclock_read_gettimeofday; - h->name = "gettimeofday"; - break; - } -# endif - break; - case LZO_PCLOCK_MONOTONIC: -# if defined(lzo_pclock_read_clock_gettime_m_syscall) - if (lzo_pclock_read_clock_gettime_m_syscall(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock_gettime_m_syscall; - h->name = "CLOCK_MONOTONIC/syscall"; - break; - } -# endif -# if defined(lzo_pclock_read_uclock) - if (lzo_pclock_read_uclock(h, &c) == 0) { - h->gettime = lzo_pclock_read_uclock; - h->name = "uclock"; - break; - } -# endif -# if defined(lzo_pclock_read_clock) - if (lzo_pclock_read_clock(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock; - h->name = "clock"; - break; - } -# endif - break; - case LZO_PCLOCK_PROCESS_CPUTIME_ID: -# if defined(lzo_pclock_read_getprocesstimes) - if (lzo_pclock_read_getprocesstimes(h, &c) == 0) { - h->gettime = lzo_pclock_read_getprocesstimes; - h->name = "GetProcessTimes"; - break; - } -# endif -# if defined(lzo_pclock_read_clock_gettime_p_syscall) - if (lzo_pclock_read_clock_gettime_p_syscall(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock_gettime_p_syscall; - h->name = "CLOCK_PROCESS_CPUTIME_ID/syscall"; - break; - } -# endif -# if defined(lzo_pclock_read_clock_gettime_p_libc) - if (lzo_pclock_read_clock_gettime_p_libc(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock_gettime_p_libc; - h->name = "CLOCK_PROCESS_CPUTIME_ID/libc"; - break; - } -# endif -# if defined(lzo_pclock_read_getrusage) - if (lzo_pclock_read_getrusage(h, &c) == 0) { - h->gettime = lzo_pclock_read_getrusage; - h->name = "getrusage"; - break; - } -# endif - break; - case LZO_PCLOCK_THREAD_CPUTIME_ID: -# if defined(lzo_pclock_read_getthreadtimes) - if (lzo_pclock_read_getthreadtimes(h, &c) == 0) { - h->gettime = lzo_pclock_read_getthreadtimes; - h->name = "GetThreadTimes"; - } -# endif -# if defined(lzo_pclock_read_clock_gettime_t_syscall) - if (lzo_pclock_read_clock_gettime_t_syscall(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock_gettime_t_syscall; - h->name = "CLOCK_THREAD_CPUTIME_ID/syscall"; - break; - } -# endif -# if defined(lzo_pclock_read_clock_gettime_t_libc) - if (lzo_pclock_read_clock_gettime_t_libc(h, &c) == 0) { - h->gettime = lzo_pclock_read_clock_gettime_t_libc; - h->name = "CLOCK_THREAD_CPUTIME_ID/libc"; - break; - } -# endif - break; - } - if (!h->gettime) - return -1; - if (!h->h) - h->h = LZO_STATIC_CAST(lzolib_handle_t, 1); - h->mode = mode; - h->read_error = 0; - if (!h->name) - h->name = "unknown"; - for (i = 0; i < 10; i++) { - __LZOLIB_FUNCNAME(lzo_pclock_read)(h, &c); - } - return 0; -} -LZOLIB_PUBLIC(int, lzo_pclock_open_default) (lzo_pclock_handle_p h) -{ - if (__LZOLIB_FUNCNAME(lzo_pclock_open)(h, LZO_PCLOCK_PROCESS_CPUTIME_ID) == 0) - return 0; - if (__LZOLIB_FUNCNAME(lzo_pclock_open)(h, LZO_PCLOCK_MONOTONIC) == 0) - return 0; - if (__LZOLIB_FUNCNAME(lzo_pclock_open)(h, LZO_PCLOCK_REALTIME) == 0) - return 0; - if (__LZOLIB_FUNCNAME(lzo_pclock_open)(h, LZO_PCLOCK_THREAD_CPUTIME_ID) == 0) - return 0; - return -1; -} -LZOLIB_PUBLIC(int, lzo_pclock_close) (lzo_pclock_handle_p h) -{ - h->h = LZO_STATIC_CAST(lzolib_handle_t, 0); - h->mode = -1; - h->name = NULL; - h->gettime = LZO_STATIC_CAST(lzo_pclock_gettime_t, 0); - return 0; -} -LZOLIB_PUBLIC(void, lzo_pclock_read) (lzo_pclock_handle_p h, lzo_pclock_p c) -{ - if (h->gettime) { - if (h->gettime(h, c) == 0) - return; - } - h->read_error = 1; -#if defined(lzo_int64l_t) - c->tv_sec = 0; -#else - c->tv_sec_high = 0; - c->tv_sec_low = 0; -#endif - c->tv_nsec = 0; -} -#if !(LZO_CFG_NO_DOUBLE) -LZOLIB_PUBLIC(double, lzo_pclock_get_elapsed) (lzo_pclock_handle_p h, const lzo_pclock_p start, const lzo_pclock_p stop) -{ - if (!h->h) { h->mode = -1; return 0.0; } - { -#if 1 && (LZO_ARCH_I386 && LZO_CC_GNUC) && defined(__STRICT_ALIGNMENT__) - float tstop, tstart; - tstop = LZO_STATIC_CAST(float, (stop->tv_sec + stop->tv_nsec / 1000000000.0)); - tstart = LZO_STATIC_CAST(float, (start->tv_sec + start->tv_nsec / 1000000000.0)); -#elif defined(lzo_int64l_t) - double tstop, tstart; -#if 1 && (LZO_CC_INTELC) - { lzo_int64l_t a = stop->tv_sec; lzo_uint32l_t b = stop->tv_nsec; - tstop = a + b / 1000000000.0; } - { lzo_int64l_t a = start->tv_sec; lzo_uint32l_t b = start->tv_nsec; - tstart = a + b / 1000000000.0; } -#else - tstop = stop->tv_sec + stop->tv_nsec / 1000000000.0; - tstart = start->tv_sec + start->tv_nsec / 1000000000.0; -#endif -#else - double tstop, tstart; - tstop = stop->tv_sec_low + stop->tv_nsec / 1000000000.0; - tstart = start->tv_sec_low + start->tv_nsec / 1000000000.0; -#endif - return tstop - tstart; - } -} -#endif -LZOLIB_PUBLIC(int, lzo_pclock_flush_cpu_cache) (lzo_pclock_handle_p h, unsigned flags) -{ - LZO_UNUSED(h); LZO_UNUSED(flags); - return -1; -} -#endif -#if defined(LZO_WANT_ACCLIB_MISC) -# undef LZO_WANT_ACCLIB_MISC -#define __LZOLIB_MISC_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if !defined(LZOLIB_PUBLIC_NOINLINE) -# if !defined(__lzo_noinline) -# define LZOLIB_PUBLIC_NOINLINE(r,f) r __LZOLIB_FUNCNAME(f) -# elif (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || LZO_CC_LLVM) -# define LZOLIB_PUBLIC_NOINLINE(r,f) __lzo_noinline __attribute__((__used__)) r __LZOLIB_FUNCNAME(f) -# else -# define LZOLIB_PUBLIC_NOINLINE(r,f) __lzo_noinline r __LZOLIB_FUNCNAME(f) -# endif -#endif -#if (LZO_OS_WIN32 && LZO_CC_PELLESC && (__POCC__ >= 290)) -# pragma warn(push) -# pragma warn(disable:2007) -#endif -LZOLIB_PUBLIC(const char *, lzo_getenv) (const char *s) -{ -#if (HAVE_GETENV) - return getenv(s); -#else - LZO_UNUSED(s); return LZO_STATIC_CAST(const char *, 0); -#endif -} -LZOLIB_PUBLIC(lzo_intptr_t, lzo_get_osfhandle) (int fd) -{ - if (fd < 0) - return -1; -#if (LZO_OS_CYGWIN) - return get_osfhandle(fd); -#elif (LZO_OS_EMX && defined(__RSXNT__)) - return -1; -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) - return -1; -#elif (LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_PELLESC && (__POCC__ < 280)) - return -1; -# elif (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) - return -1; -# elif (LZO_CC_WATCOMC && (__WATCOMC__ < 1100)) - return _os_handle(fd); -# else - return _get_osfhandle(fd); -# endif -#else - return fd; -#endif -} -LZOLIB_PUBLIC(int, lzo_set_binmode) (int fd, int binary) -{ -#if (LZO_ARCH_M68K && LZO_OS_TOS && LZO_CC_GNUC) && defined(__MINT__) - FILE* fp; int old_binary; - if (fd == STDIN_FILENO) fp = stdin; - else if (fd == STDOUT_FILENO) fp = stdout; - else if (fd == STDERR_FILENO) fp = stderr; - else return -1; - old_binary = fp->__mode.__binary; - __set_binmode(fp, binary ? 1 : 0); - return old_binary ? 1 : 0; -#elif (LZO_ARCH_M68K && LZO_OS_TOS) - LZO_UNUSED(fd); LZO_UNUSED(binary); - return -1; -#elif (LZO_OS_DOS16 && (LZO_CC_AZTECC || LZO_CC_PACIFICC)) - LZO_UNUSED(fd); LZO_UNUSED(binary); - return -1; -#elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) - int r; unsigned old_flags = __djgpp_hwint_flags; - LZO_COMPILE_TIME_ASSERT(O_BINARY > 0) - LZO_COMPILE_TIME_ASSERT(O_TEXT > 0) - if (fd < 0) return -1; - r = setmode(fd, binary ? O_BINARY : O_TEXT); - if ((old_flags & 1u) != (__djgpp_hwint_flags & 1u)) - __djgpp_set_ctrl_c(!(old_flags & 1)); - if (r == -1) return -1; - return (r & O_TEXT) ? 0 : 1; -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) - if (fd < 0) return -1; - LZO_UNUSED(binary); - return 1; -#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) - FILE* fp; int r; - if (fd == fileno(stdin)) fp = stdin; - else if (fd == fileno(stdout)) fp = stdout; - else if (fd == fileno(stderr)) fp = stderr; - else return -1; - r = _setmode(fp, binary ? _BINARY : _TEXT); - if (r == -1) return -1; - return (r & _BINARY) ? 1 : 0; -#elif (LZO_OS_WIN32 && LZO_CC_MWERKS) && defined(__MSL__) - LZO_UNUSED(fd); LZO_UNUSED(binary); - return -1; -#elif (LZO_OS_CYGWIN && (LZO_CC_GNUC < 0x025a00ul)) - LZO_UNUSED(fd); LZO_UNUSED(binary); - return -1; -#elif (LZO_OS_CYGWIN || LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_EMX || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) - int r; -#if !(LZO_CC_ZORTECHC) - LZO_COMPILE_TIME_ASSERT(O_BINARY > 0) -#endif - LZO_COMPILE_TIME_ASSERT(O_TEXT > 0) - if (fd < 0) return -1; - r = setmode(fd, binary ? O_BINARY : O_TEXT); - if (r == -1) return -1; - return (r & O_TEXT) ? 0 : 1; -#else - if (fd < 0) return -1; - LZO_UNUSED(binary); - return 1; -#endif -} -LZOLIB_PUBLIC(int, lzo_isatty) (int fd) -{ - if (fd < 0) - return 0; -#if (LZO_OS_DOS16 && !(LZO_CC_AZTECC)) - { - union REGS ri, ro; - ri.x.ax = 0x4400; ri.x.bx = fd; - int86(0x21, &ri, &ro); - if ((ro.x.cflag & 1) == 0) - if ((ro.x.ax & 0x83) != 0x83) - return 0; - } -#elif (LZO_OS_DOS32 && LZO_CC_WATCOMC) - { - union REGS ri, ro; - ri.w.ax = 0x4400; ri.w.bx = LZO_STATIC_CAST(unsigned short, fd); - int386(0x21, &ri, &ro); - if ((ro.w.cflag & 1) == 0) - if ((ro.w.ax & 0x83) != 0x83) - return 0; - } -#elif (LZO_HAVE_WINDOWS_H) - { - lzo_intptr_t h = __LZOLIB_FUNCNAME(lzo_get_osfhandle)(fd); - LZO_COMPILE_TIME_ASSERT(sizeof(h) == sizeof(HANDLE)) - if (h != -1) - { - DWORD d = 0; - if (GetConsoleMode(LZO_REINTERPRET_CAST(HANDLE, h), &d) == 0) - return 0; - } - } -#endif -#if (HAVE_ISATTY) - return (isatty(fd)) ? 1 : 0; -#else - return 0; -#endif -} -LZOLIB_PUBLIC(int, lzo_mkdir) (const char* name, unsigned mode) -{ -#if !(HAVE_MKDIR) - LZO_UNUSED(name); LZO_UNUSED(mode); - return -1; -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) - LZO_UNUSED(mode); - return Dcreate(name); -#elif (LZO_OS_DOS32 && LZO_CC_GNUC) && defined(__DJGPP__) - return mkdir(name, mode); -#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) - return mkdir(name, mode); -#elif ((LZO_OS_DOS16 || LZO_OS_DOS32) && (LZO_CC_HIGHC || LZO_CC_PACIFICC)) - LZO_UNUSED(mode); - return mkdir(LZO_UNCONST_CAST(char *, name)); -#elif (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) - LZO_UNUSED(mode); - return mkdir(name); -#elif (LZO_CC_WATCOMC) - return mkdir(name, LZO_STATIC_CAST(mode_t, mode)); -#else - return mkdir(name, mode); -#endif -} -LZOLIB_PUBLIC(int, lzo_rmdir) (const char* name) -{ -#if !(HAVE_RMDIR) - LZO_UNUSED(name); - return -1; -#elif ((LZO_OS_DOS16 || LZO_OS_DOS32) && (LZO_CC_HIGHC || LZO_CC_PACIFICC)) - return rmdir(LZO_UNCONST_CAST(char *, name)); -#else - return rmdir(name); -#endif -} -#if defined(lzo_int32e_t) -LZOLIB_PUBLIC(lzo_int32e_t, lzo_muldiv32s) (lzo_int32e_t a, lzo_int32e_t b, lzo_int32e_t x) -{ - lzo_int32e_t r = 0; - if __lzo_likely(x != 0) - { -#if defined(lzo_int64l_t) - lzo_int64l_t rr = (LZO_ICONV(lzo_int64l_t, a) * b) / x; - r = LZO_ITRUNC(lzo_int32e_t, rr); -#else - LZO_UNUSED(a); LZO_UNUSED(b); -#endif - } - return r; -} -LZOLIB_PUBLIC(lzo_uint32e_t, lzo_muldiv32u) (lzo_uint32e_t a, lzo_uint32e_t b, lzo_uint32e_t x) -{ - lzo_uint32e_t r = 0; - if __lzo_likely(x != 0) - { -#if defined(lzo_int64l_t) - lzo_uint64l_t rr = (LZO_ICONV(lzo_uint64l_t, a) * b) / x; - r = LZO_ITRUNC(lzo_uint32e_t, rr); -#else - LZO_UNUSED(a); LZO_UNUSED(b); -#endif - } - return r; -} -#endif -#if (LZO_OS_WIN16) -LZO_EXTERN_C void __far __pascal DebugBreak(void); -#endif -LZOLIB_PUBLIC_NOINLINE(void, lzo_debug_break) (void) -{ -#if (LZO_OS_WIN16) - DebugBreak(); -#elif (LZO_ARCH_I086) -#elif (LZO_OS_WIN64) && (LZO_HAVE_WINDOWS_H) - DebugBreak(); -#elif (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - __asm__ __volatile__("int $3\n" : : __LZO_ASM_CLOBBER_LIST_CC_MEMORY); -#elif (LZO_ARCH_I386) && (LZO_ASM_SYNTAX_MSC) - __asm { int 3 } -#elif (LZO_OS_WIN32) && (LZO_HAVE_WINDOWS_H) - DebugBreak(); -#else - volatile lzo_intptr_t a = -1; - * LZO_STATIC_CAST(volatile unsigned long *, LZO_REINTERPRET_CAST(volatile void *, a)) = ~0ul; -#endif -} -LZOLIB_PUBLIC_NOINLINE(void, lzo_debug_nop) (void) -{ -} -LZOLIB_PUBLIC_NOINLINE(int, lzo_debug_align_check_query) (void) -{ -#if (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) -# if (LZO_ARCH_AMD64) - lzo_uint64e_t r = 0; -# else - size_t r = 0; -# endif - __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : __LZO_ASM_CLOBBER_LIST_CC_MEMORY); - return LZO_ICONV(int, (r >> 18) & 1); -#elif (LZO_ARCH_I386) && (LZO_ASM_SYNTAX_MSC) - unsigned long r; - __asm { - pushf - pop eax - mov r,eax - } - return LZO_ICONV(int, (r >> 18) & 1); -#else - return -1; -#endif -} -LZOLIB_PUBLIC_NOINLINE(int, lzo_debug_align_check_enable) (int v) -{ -#if (LZO_ARCH_AMD64) && (LZO_ASM_SYNTAX_GNUC) - if (v) { - __asm__ __volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : __LZO_ASM_CLOBBER_LIST_CC_MEMORY); - } else { - __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : __LZO_ASM_CLOBBER_LIST_CC_MEMORY); - } - return 0; -#elif (LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - if (v) { - __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : __LZO_ASM_CLOBBER_LIST_CC_MEMORY); - } else { - __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : __LZO_ASM_CLOBBER_LIST_CC_MEMORY); - } - return 0; -#elif (LZO_ARCH_I386) && (LZO_ASM_SYNTAX_MSC) - if (v) { __asm { - pushf - or dword ptr [esp],262144 - popf - }} else { __asm { - pushf - and dword ptr [esp],-262145 - popf - }} - return 0; -#else - LZO_UNUSED(v); return -1; -#endif -} -LZOLIB_PUBLIC_NOINLINE(unsigned, lzo_debug_running_on_qemu) (void) -{ - unsigned r = 0; -#if (LZO_OS_POSIX_LINUX || LZO_OS_WIN32 || LZO_OS_WIN64) - const char* p; - p = __LZOLIB_FUNCNAME(lzo_getenv)(LZO_PP_STRINGIZE(LZO_ENV_RUNNING_ON_QEMU)); - if (p) { - if (p[0] == 0) r = 0; - else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = LZO_ICAST(unsigned, p[0]) - '0'; - else r = 1; - } -#endif - return r; -} -LZOLIB_PUBLIC_NOINLINE(unsigned, lzo_debug_running_on_valgrind) (void) -{ -#if (LZO_ARCH_AMD64 && LZO_ABI_ILP32) - return 0; -#elif (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - volatile size_t a[6]; - size_t r = 0; - a[0] = 0x1001; a[1] = 0; a[2] = 0; a[3] = 0; a[4] = 0; a[5] = 0; -# if (LZO_ARCH_AMD64) - __asm__ __volatile__(".byte 0x48,0xc1,0xc7,0x03,0x48,0xc1,0xc7,0x0d,0x48,0xc1,0xc7,0x3d,0x48,0xc1,0xc7,0x33,0x48,0x87,0xdb\n" : "=d" (r) : "a" (&a[0]), "d" (r) __LZO_ASM_CLOBBER_LIST_CC_MEMORY); -# elif (LZO_ARCH_I386) - __asm__ __volatile__(".byte 0xc1,0xc7,0x03,0xc1,0xc7,0x0d,0xc1,0xc7,0x1d,0xc1,0xc7,0x13,0x87,0xdb\n" : "=d" (r) : "a" (&a[0]), "d" (r) __LZO_ASM_CLOBBER_LIST_CC_MEMORY); -# endif - return LZO_ITRUNC(unsigned, r); -#else - return 0; -#endif -} -#if (LZO_OS_WIN32 && LZO_CC_PELLESC && (__POCC__ >= 290)) -# pragma warn(pop) -#endif -#endif -#if defined(LZO_WANT_ACCLIB_WILDARGV) -# undef LZO_WANT_ACCLIB_WILDARGV -#define __LZOLIB_WILDARGV_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -#if 0 && (LZO_CC_MSC) -LZO_EXTERN_C int __lzo_cdecl __setargv(void); -LZO_EXTERN_C int __lzo_cdecl _setargv(void); -LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); } -#endif -#endif -#if (LZO_OS_WIN32 || LZO_OS_WIN64) -#if (LZO_CC_MSC && (_MSC_VER >= 1900)) -#elif (LZO_CC_INTELC || LZO_CC_MSC) -LZO_EXTERN_C int __lzo_cdecl __setargv(void); -LZO_EXTERN_C int __lzo_cdecl _setargv(void); -LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); } -#endif -#endif -#if (LZO_OS_EMX) -#define __LZOLIB_HAVE_LZO_WILDARGV 1 -LZOLIB_PUBLIC(void, lzo_wildargv) (int* argc, char*** argv) -{ - if (argc && argv) { - _response(argc, argv); - _wildcard(argc, argv); - } -} -#endif -#if (LZO_OS_CONSOLE_PSP) && defined(__PSPSDK_DEBUG__) -#define __LZOLIB_HAVE_LZO_WILDARGV 1 -LZO_EXTERN_C int lzo_psp_init_module(int*, char***, int); -LZOLIB_PUBLIC(void, lzo_wildargv) (int* argc, char*** argv) -{ - lzo_psp_init_module(argc, argv, -1); -} -#endif -#if !(__LZOLIB_HAVE_LZO_WILDARGV) -#define __LZOLIB_HAVE_LZO_WILDARGV 1 -LZOLIB_PUBLIC(void, lzo_wildargv) (int* argc, char*** argv) -{ -#if 1 && (LZO_ARCH_I086PM) - if (LZO_MM_AHSHIFT != 3) { exit(1); } -#elif 1 && (LZO_ARCH_M68K && LZO_OS_TOS && LZO_CC_GNUC) && defined(__MINT__) - __binmode(1); - if (isatty(1)) __set_binmode(stdout, 0); - if (isatty(2)) __set_binmode(stderr, 0); -#endif - LZO_UNUSED(argc); LZO_UNUSED(argv); -} -#endif -#endif - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzo_swd.ch b/tools/z64compress/src/enc/lzo/lzo_swd.ch deleted file mode 100644 index 20bc46175d..0000000000 --- a/tools/z64compress/src/enc/lzo/lzo_swd.ch +++ /dev/null @@ -1,700 +0,0 @@ -/* lzo_swd.ch -- sliding window dictionary - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#if (LZO_UINT_MAX < LZO_0xffffffffL) -# error "LZO_UINT_MAX" -#endif -#if defined(LZO_DEBUG) -# include -#endif -#if defined(__LZO_CHECKER) -# include -#endif - - -/*********************************************************************** -// -************************************************************************/ - -/* unsigned type for dictionary access - don't waste memory here */ -#if (0UL + SWD_N + SWD_F + SWD_F < 65535UL) - typedef lzo_uint16_t swd_uint; -# define SWD_UINT_MAX 0xffffu -#else - typedef lzo_uint32_t swd_uint; -# define SWD_UINT_MAX 0xffffffffu -#endif -#define swd_uintp swd_uint * -#define SWD_UINT(x) ((swd_uint)(x)) - - -#ifndef SWD_HSIZE -# define SWD_HSIZE 16384 -#endif -#ifndef SWD_MAX_CHAIN -# define SWD_MAX_CHAIN 2048 -#endif - -#if !defined(HEAD3) -#if 1 -# define HEAD3(b,p) \ - ((DMUL(0x9f5f,(((((lzo_xint)b[p]<<5)^b[p+1])<<5)^b[p+2]))>>5) & (SWD_HSIZE-1)) -#else -# define HEAD3(b,p) \ - ((DMUL(0x9f5f,(((((lzo_xint)b[p+2]<<5)^b[p+1])<<5)^b[p]))>>5) & (SWD_HSIZE-1)) -#endif -#endif - -#if !(SWD_NO_HEAD2) && (SWD_THRESHOLD == 1) && !defined(HEAD2) -# if 1 && (LZO_OPT_UNALIGNED16) -# define HEAD2(b,p) UA_GET_NE16((b)+(p)) -# else -# define HEAD2(b,p) (b[p] ^ ((unsigned)b[(p)+1]<<8)) -# endif -# define NIL2 SWD_UINT_MAX -#endif -#ifndef IF_HEAD2 -#define IF_HEAD2(s) /*empty*/ -#endif - - -typedef struct -{ -/* public - "built-in" */ - lzo_uint swd_n; - lzo_uint swd_f; - lzo_uint swd_threshold; - -/* public - configuration */ - lzo_uint max_chain; - lzo_uint nice_length; - lzo_bool use_best_off; - lzo_uint lazy_insert; - -/* public - output */ - lzo_uint m_len; - lzo_uint m_off; - lzo_uint look; - int b_char; -#if defined(SWD_BEST_OFF) - lzo_uint best_off[ SWD_BEST_OFF ]; -#endif - -/* semi public */ - LZO_COMPRESS_T *c; - lzo_uint m_pos; -#if defined(SWD_BEST_OFF) - lzo_uint best_pos[ SWD_BEST_OFF ]; -#endif - -/* private */ - const lzo_bytep dict; - const lzo_bytep dict_end; - lzo_uint dict_len; - -/* private */ - lzo_uint ip; /* input pointer (lookahead) */ - lzo_uint bp; /* buffer pointer */ - lzo_uint rp; /* remove pointer */ - lzo_uint b_size; - - lzo_bytep b_wrap; - - lzo_uint node_count; - lzo_uint first_rp; - -#if defined(__LZO_CHECKER) - /* malloc arrays of the exact size to detect any overrun */ - unsigned char *b; - swd_uint *head3; - swd_uint *succ3; - swd_uint *best3; - swd_uint *llen3; -# ifdef HEAD2 - swd_uint *head2; -# endif - -#else - unsigned char b [ SWD_N + SWD_F + SWD_F ]; - swd_uint head3 [ SWD_HSIZE ]; - swd_uint succ3 [ SWD_N + SWD_F ]; - swd_uint best3 [ SWD_N + SWD_F ]; - swd_uint llen3 [ SWD_HSIZE ]; -# ifdef HEAD2 - swd_uint head2 [ 65536L ]; -# endif -#endif -} -lzo_swd_t; -#define lzo_swd_p lzo_swd_t * - - -#define s_b(s) s->b -#define s_head3(s) s->head3 -#define s_succ3(s) s->succ3 -#define s_best3(s) s->best3 -#define s_llen3(s) s->llen3 -#ifdef HEAD2 -#define s_head2(s) s->head2 -#endif -#define SIZEOF_LZO_SWD_T (sizeof(lzo_swd_t)) - - -/* Access macro for head3. - * head3[key] may be uninitialized if the list is emtpy, - * but then its value will never be used. - */ -#if 1 || defined(__LZO_CHECKER) -# define s_get_head3(s,key) \ - ((swd_uint)((s_llen3(s)[key] == 0) ? SWD_UINT_MAX : s_head3(s)[key])) -#else -# define s_get_head3(s,key) (s_head3(s)[key]) -#endif - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_initdict(lzo_swd_p s, const lzo_bytep dict, lzo_uint dict_len) -{ - s->dict = s->dict_end = NULL; - s->dict_len = 0; - - if (!dict || dict_len == 0) - return; - if (dict_len > s->swd_n) - { - dict += dict_len - s->swd_n; - dict_len = s->swd_n; - } - - s->dict = dict; - s->dict_len = dict_len; - s->dict_end = dict + dict_len; - lzo_memcpy(s_b(s),dict,dict_len); - s->ip = dict_len; -} - - -static -void swd_insertdict(lzo_swd_p s, lzo_uint node, lzo_uint len) -{ - lzo_uint key; - - s->node_count = s->swd_n - len; - s->first_rp = node; - - if (len) do - { - key = HEAD3(s_b(s),node); - s_succ3(s)[node] = s_get_head3(s,key); - s_head3(s)[key] = SWD_UINT(node); - s_best3(s)[node] = SWD_UINT(s->swd_f + 1); - s_llen3(s)[key]++; - assert(s_llen3(s)[key] <= s->swd_n); - -#ifdef HEAD2 - IF_HEAD2(s) { - key = HEAD2(s_b(s),node); - s_head2(s)[key] = SWD_UINT(node); - } -#endif - - node++; - } - while (--len != 0); -} - - -/*********************************************************************** -// -************************************************************************/ - -static void swd_exit(lzo_swd_p s); - -static -int swd_init(lzo_swd_p s, const lzo_bytep dict, lzo_uint dict_len) -{ -#if defined(__LZO_CHECKER) - unsigned r = 1; - s->b = (lzo_bytep) malloc(SWD_N + SWD_F + SWD_F); - s->head3 = (swd_uintp) malloc(sizeof(swd_uint) * SWD_HSIZE); - s->succ3 = (swd_uintp) malloc(sizeof(swd_uint) * (SWD_N + SWD_F)); - s->best3 = (swd_uintp) malloc(sizeof(swd_uint) * (SWD_N + SWD_F)); - s->llen3 = (swd_uintp) malloc(sizeof(swd_uint) * SWD_HSIZE); - r &= s->b != NULL; - r &= s->head3 != NULL; - r &= s->succ3 != NULL; - r &= s->best3 != NULL; - r &= s->llen3 != NULL; -#ifdef HEAD2 - IF_HEAD2(s) { - s->head2 = (swd_uintp) malloc(sizeof(swd_uint) * 65536L); - r &= s->head2 != NULL; - } -#endif - if (r != 1) { - swd_exit(s); - return LZO_E_OUT_OF_MEMORY; - } -#endif - - s->m_len = 0; - s->m_off = 0; -#if defined(SWD_BEST_OFF) - { - unsigned i; - for (i = 0; i < SWD_BEST_OFF; i++) - s->best_off[i] = s->best_pos[i] = 0; - } -#endif - - s->swd_n = SWD_N; - s->swd_f = SWD_F; - s->swd_threshold = SWD_THRESHOLD; - - /* defaults */ - s->max_chain = SWD_MAX_CHAIN; - s->nice_length = s->swd_f; - s->use_best_off = 0; - s->lazy_insert = 0; - - s->b_size = s->swd_n + s->swd_f; -#if 0 - if (2 * s->swd_f >= s->swd_n || s->b_size + s->swd_f >= SWD_UINT_MAX) - return LZO_E_ERROR; -#else - LZO_COMPILE_TIME_ASSERT(!(0ul + 2 * SWD_F >= SWD_N)) - LZO_COMPILE_TIME_ASSERT(!(0ul + SWD_N + SWD_F + SWD_F >= SWD_UINT_MAX)) -#endif - s->b_wrap = s_b(s) + s->b_size; - s->node_count = s->swd_n; - - lzo_memset(s_llen3(s), 0, (lzo_uint)sizeof(s_llen3(s)[0]) * (lzo_uint)SWD_HSIZE); -#ifdef HEAD2 - IF_HEAD2(s) { -#if 1 - lzo_memset(s_head2(s), 0xff, (lzo_uint)sizeof(s_head2(s)[0]) * 65536L); - assert(s_head2(s)[0] == NIL2); -#else - lzo_xint i; - for (i = 0; i < 65536L; i++) - s_head2(s)[i] = NIL2; -#endif - } -#endif - - s->ip = 0; - swd_initdict(s,dict,dict_len); - s->bp = s->ip; - s->first_rp = s->ip; - - assert(s->ip + s->swd_f <= s->b_size); -#if 1 - s->look = (lzo_uint) (s->c->in_end - s->c->ip); - if (s->look > 0) - { - if (s->look > s->swd_f) - s->look = s->swd_f; - lzo_memcpy(&s_b(s)[s->ip],s->c->ip,s->look); - s->c->ip += s->look; - s->ip += s->look; - } -#else - s->look = 0; - while (s->look < s->swd_f) - { - int c; - if ((c = getbyte(*(s->c))) < 0) - break; - s_b(s)[s->ip] = LZO_BYTE(c); - s->ip++; - s->look++; - } -#endif - if (s->ip == s->b_size) - s->ip = 0; - - if (s->look >= 2 && s->dict_len > 0) - swd_insertdict(s,0,s->dict_len); - - s->rp = s->first_rp; - if (s->rp >= s->node_count) - s->rp -= s->node_count; - else - s->rp += s->b_size - s->node_count; - -#if 1 || defined(__LZO_CHECKER) - /* initialize memory for the first few HEAD3 (if s->ip is not far - * enough ahead to do this job for us). The value doesn't matter. */ - if (s->look < 3) { - lzo_bytep p = &s_b(s)[s->bp+s->look]; - p[0] = p[1] = p[2] = 0; - } -#endif - - return LZO_E_OK; -} - - -static -void swd_exit(lzo_swd_p s) -{ -#if defined(__LZO_CHECKER) - /* free in reverse order of allocations */ -#ifdef HEAD2 - free(s->head2); s->head2 = NULL; -#endif - free(s->llen3); s->llen3 = NULL; - free(s->best3); s->best3 = NULL; - free(s->succ3); s->succ3 = NULL; - free(s->head3); s->head3 = NULL; - free(s->b); s->b = NULL; -#else - LZO_UNUSED(s); -#endif -} - - -#define swd_pos2off(s,pos) \ - (s->bp > (pos) ? s->bp - (pos) : s->b_size - ((pos) - s->bp)) - - -/*********************************************************************** -// -************************************************************************/ - -static __lzo_inline -void swd_getbyte(lzo_swd_p s) -{ - int c; - - if ((c = getbyte(*(s->c))) < 0) - { - if (s->look > 0) - --s->look; -#if 1 || defined(__LZO_CHECKER) - /* initialize memory - value doesn't matter */ - s_b(s)[s->ip] = 0; - if (s->ip < s->swd_f) - s->b_wrap[s->ip] = 0; -#endif - } - else - { - s_b(s)[s->ip] = LZO_BYTE(c); - if (s->ip < s->swd_f) - s->b_wrap[s->ip] = LZO_BYTE(c); - } - if (++s->ip == s->b_size) - s->ip = 0; - if (++s->bp == s->b_size) - s->bp = 0; - if (++s->rp == s->b_size) - s->rp = 0; -} - - -/*********************************************************************** -// remove node from lists -************************************************************************/ - -static __lzo_inline -void swd_remove_node(lzo_swd_p s, lzo_uint node) -{ - if (s->node_count == 0) - { - lzo_uint key; - -#ifdef LZO_DEBUG - if (s->first_rp != LZO_UINT_MAX) - { - if (node != s->first_rp) - printf("Remove %5ld: %5ld %5ld %5ld %5ld %6ld %6ld\n", - (long)node, (long)s->rp, (long)s->ip, (long)s->bp, - (long)s->first_rp, (long)(s->ip - node), - (long)(s->ip - s->bp)); - assert(node == s->first_rp); - s->first_rp = LZO_UINT_MAX; - } -#endif - - key = HEAD3(s_b(s),node); - assert(s_llen3(s)[key] > 0); - --s_llen3(s)[key]; - -#ifdef HEAD2 - IF_HEAD2(s) { - key = HEAD2(s_b(s),node); - assert(s_head2(s)[key] != NIL2); - if ((lzo_uint) s_head2(s)[key] == node) - s_head2(s)[key] = NIL2; - } -#endif - } - else - --s->node_count; -} - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_accept(lzo_swd_p s, lzo_uint n) -{ - assert(n <= s->look); - - if (n) do - { - lzo_uint key; - - swd_remove_node(s,s->rp); - - /* add bp into HEAD3 */ - key = HEAD3(s_b(s),s->bp); - s_succ3(s)[s->bp] = s_get_head3(s,key); - s_head3(s)[key] = SWD_UINT(s->bp); - s_best3(s)[s->bp] = SWD_UINT(s->swd_f + 1); - s_llen3(s)[key]++; - assert(s_llen3(s)[key] <= s->swd_n); - -#ifdef HEAD2 - /* add bp into HEAD2 */ - IF_HEAD2(s) { - key = HEAD2(s_b(s),s->bp); - s_head2(s)[key] = SWD_UINT(s->bp); - } -#endif - - swd_getbyte(s); - } while (--n != 0); -} - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_search(lzo_swd_p s, lzo_uint node, lzo_uint cnt) -{ - const lzo_bytep p1; - const lzo_bytep p2; - const lzo_bytep px; - lzo_uint m_len = s->m_len; - const lzo_bytep b = s_b(s); - const lzo_bytep bp = s_b(s) + s->bp; - const lzo_bytep bx = s_b(s) + s->bp + s->look; - swd_uintp succ3 = s_succ3(s); - unsigned char scan_end1; - - assert(s->m_len > 0); - - scan_end1 = bp[m_len - 1]; - for ( ; cnt-- > 0; node = succ3[node]) - { - p1 = bp; - p2 = b + node; - px = bx; - - assert(m_len < s->look); - - if ( -#if 1 - p2[m_len - 1] == scan_end1 && - p2[m_len] == p1[m_len] && -#endif - p2[0] == p1[0] && - p2[1] == p1[1]) - { - lzo_uint i; - assert(lzo_memcmp(bp,&b[node],3) == 0); - -#if 0 && (LZO_OPT_UNALIGNED32) - p1 += 3; p2 += 3; - while (p1 + 4 <= px && UA_GET_NE32(p1) == UA_GET_NE32(p2)) - p1 += 4, p2 += 4; - while (p1 < px && *p1 == *p2) - p1 += 1, p2 += 1; -#else - p1 += 2; p2 += 2; - do {} while (++p1 < px && *p1 == *++p2); -#endif - i = pd(p1, bp); - -#ifdef LZO_DEBUG - if (lzo_memcmp(bp,&b[node],i) != 0) - printf("%5ld %5ld %5ld %02x/%02x %02x/%02x\n", - (long)s->bp, (long) node, (long) i, - bp[0], bp[1], b[node], b[node+1]); -#endif - assert(lzo_memcmp(bp,&b[node],i) == 0); - -#if defined(SWD_BEST_OFF) - if (i < SWD_BEST_OFF) - { - if (s->best_pos[i] == 0) - s->best_pos[i] = node + 1; - } -#endif - if (i > m_len) - { - s->m_len = m_len = i; - s->m_pos = node; - if (m_len == s->look) - return; - if (m_len >= s->nice_length) - return; - if (m_len > (lzo_uint) s_best3(s)[node]) - return; - scan_end1 = bp[m_len - 1]; - } - } - } -} - - -/*********************************************************************** -// -************************************************************************/ - -#ifdef HEAD2 - -static -lzo_bool swd_search2(lzo_swd_p s) -{ - lzo_uint key; - - assert(s->look >= 2); - assert(s->m_len > 0); - - key = s_head2(s)[ HEAD2(s_b(s),s->bp) ]; - if (key == NIL2) - return 0; -#ifdef LZO_DEBUG - if (lzo_memcmp(&s_b(s)[s->bp],&s_b(s)[key],2) != 0) - printf("%5ld %5ld %02x/%02x %02x/%02x\n", (long)s->bp, (long)key, - s_b(s)[s->bp], s_b(s)[s->bp+1], s_b(s)[key], s_b(s)[key+1]); -#endif - assert(lzo_memcmp(&s_b(s)[s->bp],&s_b(s)[key],2) == 0); -#if defined(SWD_BEST_OFF) - if (s->best_pos[2] == 0) - s->best_pos[2] = key + 1; -#endif - - if (s->m_len < 2) - { - s->m_len = 2; - s->m_pos = key; - } - return 1; -} - -#endif - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_findbest(lzo_swd_p s) -{ - lzo_uint key; - lzo_uint cnt, node; - lzo_uint len; - - assert(s->m_len > 0); - - /* get current head, add bp into HEAD3 */ - key = HEAD3(s_b(s),s->bp); - node = s_succ3(s)[s->bp] = s_get_head3(s,key); - cnt = s_llen3(s)[key]++; - assert(s_llen3(s)[key] <= s->swd_n + s->swd_f); - if (cnt > s->max_chain && s->max_chain > 0) - cnt = s->max_chain; - s_head3(s)[key] = SWD_UINT(s->bp); - - s->b_char = s_b(s)[s->bp]; - len = s->m_len; - if (s->m_len >= s->look) - { - if (s->look == 0) - s->b_char = -1; - s->m_off = 0; - s_best3(s)[s->bp] = SWD_UINT(s->swd_f + 1); - } - else - { -#if defined(HEAD2) - if (swd_search2(s) && s->look >= 3) - swd_search(s,node,cnt); -#else - if (s->look >= 3) - swd_search(s,node,cnt); -#endif - if (s->m_len > len) - s->m_off = swd_pos2off(s,s->m_pos); - s_best3(s)[s->bp] = SWD_UINT(s->m_len); - -#if defined(SWD_BEST_OFF) - if (s->use_best_off) - { - unsigned i; - for (i = 2; i < SWD_BEST_OFF; i++) - if (s->best_pos[i] > 0) - s->best_off[i] = swd_pos2off(s,s->best_pos[i]-1); - else - s->best_off[i] = 0; - } -#endif - } - - swd_remove_node(s,s->rp); - -#ifdef HEAD2 - /* add bp into HEAD2 */ - IF_HEAD2(s) { - key = HEAD2(s_b(s),s->bp); - s_head2(s)[key] = SWD_UINT(s->bp); - } -#endif -} - - -#undef HEAD3 -#undef HEAD2 -#undef IF_HEAD2 -#undef s_get_head3 - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzoconf.h b/tools/z64compress/src/enc/lzo/lzoconf.h deleted file mode 100644 index 1a1dd98c23..0000000000 --- a/tools/z64compress/src/enc/lzo/lzoconf.h +++ /dev/null @@ -1,453 +0,0 @@ -/* lzoconf.h -- configuration of the LZO data compression library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZOCONF_H_INCLUDED -#define __LZOCONF_H_INCLUDED 1 - -#define LZO_VERSION 0x20a0 /* 2.10 */ -#define LZO_VERSION_STRING "2.10" -#define LZO_VERSION_DATE "Mar 01 2017" - -/* internal Autoconf configuration file - only used when building LZO */ -#if defined(LZO_HAVE_CONFIG_H) -# include -#endif -#include -#include - - -/*********************************************************************** -// LZO requires a conforming -************************************************************************/ - -#if !defined(CHAR_BIT) || (CHAR_BIT != 8) -# error "invalid CHAR_BIT" -#endif -#if !defined(UCHAR_MAX) || !defined(USHRT_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) -# error "check your compiler installation" -#endif -#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) -# error "your limits.h macros are broken" -#endif - -/* get OS and architecture defines */ -#ifndef __LZODEFS_H_INCLUDED -#include "lzodefs.h" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -/*********************************************************************** -// some core defines -************************************************************************/ - -/* memory checkers */ -#if !defined(__LZO_CHECKER) -# if defined(__BOUNDS_CHECKING_ON) -# define __LZO_CHECKER 1 -# elif defined(__CHECKER__) -# define __LZO_CHECKER 1 -# elif defined(__INSURE__) -# define __LZO_CHECKER 1 -# elif defined(__PURIFY__) -# define __LZO_CHECKER 1 -# endif -#endif - - -/*********************************************************************** -// integral and pointer types -************************************************************************/ - -/* lzo_uint must match size_t */ -#if !defined(LZO_UINT_MAX) -# if (LZO_ABI_LLP64) -# if (LZO_OS_WIN64) - typedef unsigned __int64 lzo_uint; - typedef __int64 lzo_int; -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF___INT64 -# else - typedef lzo_ullong_t lzo_uint; - typedef lzo_llong_t lzo_int; -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG_LONG -# endif -# define LZO_SIZEOF_LZO_INT 8 -# define LZO_UINT_MAX 0xffffffffffffffffull -# define LZO_INT_MAX 9223372036854775807LL -# define LZO_INT_MIN (-1LL - LZO_INT_MAX) -# elif (LZO_ABI_IP32L64) /* MIPS R5900 */ - typedef unsigned int lzo_uint; - typedef int lzo_int; -# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_INT -# define LZO_UINT_MAX UINT_MAX -# define LZO_INT_MAX INT_MAX -# define LZO_INT_MIN INT_MIN -# elif (ULONG_MAX >= LZO_0xffffffffL) - typedef unsigned long lzo_uint; - typedef long lzo_int; -# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG -# define LZO_UINT_MAX ULONG_MAX -# define LZO_INT_MAX LONG_MAX -# define LZO_INT_MIN LONG_MIN -# else -# error "lzo_uint" -# endif -#endif - -/* The larger type of lzo_uint and lzo_uint32_t. */ -#if (LZO_SIZEOF_LZO_INT >= 4) -# define lzo_xint lzo_uint -#else -# define lzo_xint lzo_uint32_t -#endif - -typedef int lzo_bool; - -/* sanity checks */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int) == LZO_SIZEOF_LZO_INT) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_INT) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t)) - -#ifndef __LZO_MMODEL -#define __LZO_MMODEL /*empty*/ -#endif - -/* no typedef here because of const-pointer issues */ -#define lzo_bytep unsigned char __LZO_MMODEL * -#define lzo_charp char __LZO_MMODEL * -#define lzo_voidp void __LZO_MMODEL * -#define lzo_shortp short __LZO_MMODEL * -#define lzo_ushortp unsigned short __LZO_MMODEL * -#define lzo_intp lzo_int __LZO_MMODEL * -#define lzo_uintp lzo_uint __LZO_MMODEL * -#define lzo_xintp lzo_xint __LZO_MMODEL * -#define lzo_voidpp lzo_voidp __LZO_MMODEL * -#define lzo_bytepp lzo_bytep __LZO_MMODEL * - -#define lzo_int8_tp lzo_int8_t __LZO_MMODEL * -#define lzo_uint8_tp lzo_uint8_t __LZO_MMODEL * -#define lzo_int16_tp lzo_int16_t __LZO_MMODEL * -#define lzo_uint16_tp lzo_uint16_t __LZO_MMODEL * -#define lzo_int32_tp lzo_int32_t __LZO_MMODEL * -#define lzo_uint32_tp lzo_uint32_t __LZO_MMODEL * -#if defined(lzo_int64_t) -#define lzo_int64_tp lzo_int64_t __LZO_MMODEL * -#define lzo_uint64_tp lzo_uint64_t __LZO_MMODEL * -#endif - -/* Older LZO versions used to support ancient systems and memory models - * such as 16-bit MSDOS with __huge pointers or Cray PVP, but these - * obsolete configurations are not supported any longer. - */ -#if defined(__LZO_MMODEL_HUGE) -#error "__LZO_MMODEL_HUGE memory model is unsupported" -#endif -#if (LZO_MM_PVP) -#error "LZO_MM_PVP memory model is unsupported" -#endif -#if (LZO_SIZEOF_INT < 4) -#error "LZO_SIZEOF_INT < 4 is unsupported" -#endif -#if (__LZO_UINTPTR_T_IS_POINTER) -#error "__LZO_UINTPTR_T_IS_POINTER is unsupported" -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) >= 4) -/* Strange configurations where sizeof(lzo_uint) != sizeof(size_t) should - * work but have not received much testing lately, so be strict here. - */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(size_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(ptrdiff_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(void *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(void *) == sizeof(lzo_voidp)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_bytep)) - - -/*********************************************************************** -// function types -************************************************************************/ - -/* name mangling */ -#if !defined(__LZO_EXTERN_C) -# ifdef __cplusplus -# define __LZO_EXTERN_C extern "C" -# else -# define __LZO_EXTERN_C extern -# endif -#endif - -/* calling convention */ -#if !defined(__LZO_CDECL) -# define __LZO_CDECL __lzo_cdecl -#endif - -/* DLL export information */ -#if !defined(__LZO_EXPORT1) -# define __LZO_EXPORT1 /*empty*/ -#endif -#if !defined(__LZO_EXPORT2) -# define __LZO_EXPORT2 /*empty*/ -#endif - -/* __cdecl calling convention for public C and assembly functions */ -#if !defined(LZO_PUBLIC) -# define LZO_PUBLIC(r) __LZO_EXPORT1 r __LZO_EXPORT2 __LZO_CDECL -#endif -#if !defined(LZO_EXTERN) -# define LZO_EXTERN(r) __LZO_EXTERN_C LZO_PUBLIC(r) -#endif -#if !defined(LZO_PRIVATE) -# define LZO_PRIVATE(r) static r __LZO_CDECL -#endif - -/* function types */ -typedef int -(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -typedef int -(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -typedef int -(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -typedef int -(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); - -typedef int -(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); - - -/* Callback interface. Currently only the progress indicator ("nprogress") - * is used, but this may change in a future release. */ - -struct lzo_callback_t; -typedef struct lzo_callback_t lzo_callback_t; -#define lzo_callback_p lzo_callback_t __LZO_MMODEL * - -/* malloc & free function types */ -typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) - (lzo_callback_p self, lzo_uint items, lzo_uint size); -typedef void (__LZO_CDECL *lzo_free_func_t) - (lzo_callback_p self, lzo_voidp ptr); - -/* a progress indicator callback function */ -typedef void (__LZO_CDECL *lzo_progress_func_t) - (lzo_callback_p, lzo_uint, lzo_uint, int); - -struct lzo_callback_t -{ - /* custom allocators (set to 0 to disable) */ - lzo_alloc_func_t nalloc; /* [not used right now] */ - lzo_free_func_t nfree; /* [not used right now] */ - - /* a progress indicator callback function (set to 0 to disable) */ - lzo_progress_func_t nprogress; - - /* INFO: the first parameter "self" of the nalloc/nfree/nprogress - * callbacks points back to this struct, so you are free to store - * some extra info in the following variables. */ - lzo_voidp user1; - lzo_xint user2; - lzo_xint user3; -}; - - -/*********************************************************************** -// error codes and prototypes -************************************************************************/ - -/* Error codes for the compression/decompression functions. Negative - * values are errors, positive values will be used for special but - * normal events. - */ -#define LZO_E_OK 0 -#define LZO_E_ERROR (-1) -#define LZO_E_OUT_OF_MEMORY (-2) /* [lzo_alloc_func_t failure] */ -#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ -#define LZO_E_INPUT_OVERRUN (-4) -#define LZO_E_OUTPUT_OVERRUN (-5) -#define LZO_E_LOOKBEHIND_OVERRUN (-6) -#define LZO_E_EOF_NOT_FOUND (-7) -#define LZO_E_INPUT_NOT_CONSUMED (-8) -#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ -#define LZO_E_INVALID_ARGUMENT (-10) -#define LZO_E_INVALID_ALIGNMENT (-11) /* pointer argument is not properly aligned */ -#define LZO_E_OUTPUT_NOT_CONSUMED (-12) -#define LZO_E_INTERNAL_ERROR (-99) - - -#ifndef lzo_sizeof_dict_t -# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) -#endif - -/* lzo_init() should be the first function you call. - * Check the return code ! - * - * lzo_init() is a macro to allow checking that the library and the - * compiler's view of various types are consistent. - */ -#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ - (int)sizeof(long),(int)sizeof(lzo_uint32_t),(int)sizeof(lzo_uint),\ - (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ - (int)sizeof(lzo_callback_t)) -LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); - -/* version functions (useful for shared libraries) */ -LZO_EXTERN(unsigned) lzo_version(void); -LZO_EXTERN(const char *) lzo_version_string(void); -LZO_EXTERN(const char *) lzo_version_date(void); -LZO_EXTERN(const lzo_charp) _lzo_version_string(void); -LZO_EXTERN(const lzo_charp) _lzo_version_date(void); - -/* string functions */ -LZO_EXTERN(int) - lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len); -LZO_EXTERN(lzo_voidp) - lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len); -LZO_EXTERN(lzo_voidp) - lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len); -LZO_EXTERN(lzo_voidp) - lzo_memset(lzo_voidp buf, int c, lzo_uint len); - -/* checksum functions */ -LZO_EXTERN(lzo_uint32_t) - lzo_adler32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len); -LZO_EXTERN(lzo_uint32_t) - lzo_crc32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len); -LZO_EXTERN(const lzo_uint32_tp) - lzo_get_crc32_table(void); - -/* misc. */ -LZO_EXTERN(int) _lzo_config_check(void); -typedef union { - lzo_voidp a00; lzo_bytep a01; lzo_uint a02; lzo_xint a03; lzo_uintptr_t a04; - void *a05; unsigned char *a06; unsigned long a07; size_t a08; ptrdiff_t a09; -#if defined(lzo_int64_t) - lzo_uint64_t a10; -#endif -} lzo_align_t; - -/* align a char pointer on a boundary that is a multiple of 'size' */ -LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size); -#define LZO_PTR_ALIGN_UP(p,size) \ - ((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size))) - - -/*********************************************************************** -// deprecated macros - only for backward compatibility -************************************************************************/ - -/* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */ -#define lzo_byte unsigned char -/* deprecated type names */ -#define lzo_int32 lzo_int32_t -#define lzo_uint32 lzo_uint32_t -#define lzo_int32p lzo_int32_t __LZO_MMODEL * -#define lzo_uint32p lzo_uint32_t __LZO_MMODEL * -#define LZO_INT32_MAX LZO_INT32_C(2147483647) -#define LZO_UINT32_MAX LZO_UINT32_C(4294967295) -#if defined(lzo_int64_t) -#define lzo_int64 lzo_int64_t -#define lzo_uint64 lzo_uint64_t -#define lzo_int64p lzo_int64_t __LZO_MMODEL * -#define lzo_uint64p lzo_uint64_t __LZO_MMODEL * -#define LZO_INT64_MAX LZO_INT64_C(9223372036854775807) -#define LZO_UINT64_MAX LZO_UINT64_C(18446744073709551615) -#endif -/* deprecated types */ -typedef union { lzo_bytep a; lzo_uint b; } __lzo_pu_u; -typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u; -/* deprecated defines */ -#if !defined(LZO_SIZEOF_LZO_UINT) -# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LZO_INT -#endif - -#if defined(LZO_CFG_COMPAT) - -#define __LZOCONF_H 1 - -#if defined(LZO_ARCH_I086) -# define __LZO_i386 1 -#elif defined(LZO_ARCH_I386) -# define __LZO_i386 1 -#endif - -#if defined(LZO_OS_DOS16) -# define __LZO_DOS 1 -# define __LZO_DOS16 1 -#elif defined(LZO_OS_DOS32) -# define __LZO_DOS 1 -#elif defined(LZO_OS_WIN16) -# define __LZO_WIN 1 -# define __LZO_WIN16 1 -#elif defined(LZO_OS_WIN32) -# define __LZO_WIN 1 -#endif - -#define __LZO_CMODEL /*empty*/ -#define __LZO_DMODEL /*empty*/ -#define __LZO_ENTRY __LZO_CDECL -#define LZO_EXTERN_CDECL LZO_EXTERN -#define LZO_ALIGN LZO_PTR_ALIGN_UP - -#define lzo_compress_asm_t lzo_compress_t -#define lzo_decompress_asm_t lzo_decompress_t - -#endif /* LZO_CFG_COMPAT */ - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/lzo/lzodefs.h b/tools/z64compress/src/enc/lzo/lzodefs.h deleted file mode 100644 index c3e2bcf5d8..0000000000 --- a/tools/z64compress/src/enc/lzo/lzodefs.h +++ /dev/null @@ -1,3268 +0,0 @@ -/* lzodefs.h -- architecture, OS and compiler specific defines - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZODEFS_H_INCLUDED -#define __LZODEFS_H_INCLUDED 1 - -#if defined(__CYGWIN32__) && !defined(__CYGWIN__) -# define __CYGWIN__ __CYGWIN32__ -#endif -#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) -# define _ALL_SOURCE 1 -#endif -#if defined(__mips__) && defined(__R5900__) -# if !defined(__LONG_MAX__) -# define __LONG_MAX__ 9223372036854775807L -# endif -#endif -#if 0 -#elif !defined(__LZO_LANG_OVERRIDE) -#if (defined(__clang__) || defined(__GNUC__)) && defined(__ASSEMBLER__) -# if (__ASSEMBLER__+0) <= 0 -# error "__ASSEMBLER__" -# else -# define LZO_LANG_ASSEMBLER 1 -# endif -#elif defined(__cplusplus) -# if (__cplusplus+0) <= 0 -# error "__cplusplus" -# elif (__cplusplus < 199711L) -# define LZO_LANG_CXX 1 -# elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1 -# define LZO_LANG_CXX _MSVC_LANG -# else -# define LZO_LANG_CXX __cplusplus -# endif -# define LZO_LANG_CPLUSPLUS LZO_LANG_CXX -#else -# if defined(__STDC_VERSION__) && (__STDC_VERSION__+0 >= 199409L) -# define LZO_LANG_C __STDC_VERSION__ -# else -# define LZO_LANG_C 1 -# endif -#endif -#endif -#if !defined(LZO_CFG_NO_DISABLE_WUNDEF) -#if defined(__ARMCC_VERSION) -# pragma diag_suppress 193 -#elif defined(__clang__) && defined(__clang_minor__) -# pragma clang diagnostic ignored "-Wundef" -#elif defined(__INTEL_COMPILER) -# pragma warning(disable: 193) -#elif defined(__KEIL__) && defined(__C166__) -# pragma warning disable = 322 -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__) -# if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2)) -# pragma GCC diagnostic ignored "-Wundef" -# endif -#elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) -# if ((_MSC_VER-0) >= 1300) -# pragma warning(disable: 4668) -# endif -#endif -#endif -#if 0 && defined(__POCC__) && defined(_WIN32) -# if (__POCC__ >= 400) -# pragma warn(disable: 2216) -# endif -#endif -#if 0 && defined(__WATCOMC__) -# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) -# pragma warning 203 9 -# endif -#endif -#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) -# pragma option -h -#endif -#if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC) -#ifndef _CRT_NONSTDC_NO_DEPRECATE -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif -#ifndef _CRT_NONSTDC_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS 1 -#endif -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS 1 -#endif -#endif -#if 0 -#define LZO_0xffffUL 0xfffful -#define LZO_0xffffffffUL 0xfffffffful -#else -#define LZO_0xffffUL 65535ul -#define LZO_0xffffffffUL 4294967295ul -#endif -#define LZO_0xffffL LZO_0xffffUL -#define LZO_0xffffffffL LZO_0xffffffffUL -#if (LZO_0xffffL == LZO_0xffffffffL) -# error "your preprocessor is broken 1" -#endif -#if (16ul * 16384ul != 262144ul) -# error "your preprocessor is broken 2" -#endif -#if 0 -#if (32767 >= 4294967295ul) -# error "your preprocessor is broken 3" -#endif -#if (65535u >= 4294967295ul) -# error "your preprocessor is broken 4" -#endif -#endif -#if defined(__COUNTER__) -# ifndef LZO_CFG_USE_COUNTER -# define LZO_CFG_USE_COUNTER 1 -# endif -#else -# undef LZO_CFG_USE_COUNTER -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) -# if !defined(MSDOS) -# define MSDOS 1 -# endif -# if !defined(_MSDOS) -# define _MSDOS 1 -# endif -#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) -# if (__VERSION == 520) && (MB_LEN_MAX == 1) -# if !defined(__AZTEC_C__) -# define __AZTEC_C__ __VERSION -# endif -# if !defined(__DOS__) -# define __DOS__ 1 -# endif -# endif -#endif -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(_MSC_VER) && defined(M_I86HM) -# define ptrdiff_t long -# define _PTRDIFF_T_DEFINED 1 -#endif -#endif -#if (UINT_MAX == LZO_0xffffL) -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -# if defined(__AZTEC_C__) && defined(__DOS__) -# define __LZO_RENAME_A 1 -# elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define __LZO_RENAME_A 1 -# elif (_MSC_VER < 700) -# define __LZO_RENAME_B 1 -# endif -# elif defined(__TSC__) && defined(__OS2__) -# define __LZO_RENAME_A 1 -# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) -# define __LZO_RENAME_A 1 -# elif defined(__PACIFIC__) && defined(DOS) -# if !defined(__far) -# define __far far -# endif -# if !defined(__near) -# define __near near -# endif -# endif -# if defined(__LZO_RENAME_A) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__far) -# define __far far -# endif -# if !defined(__huge) -# define __huge huge -# endif -# if !defined(__near) -# define __near near -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# if !defined(__huge) -# define __huge huge -# endif -# elif defined(__LZO_RENAME_B) -# if !defined(__cdecl) -# define __cdecl _cdecl -# endif -# if !defined(__far) -# define __far _far -# endif -# if !defined(__huge) -# define __huge _huge -# endif -# if !defined(__near) -# define __near _near -# endif -# if !defined(__pascal) -# define __pascal _pascal -# endif -# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# endif -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__AZTEC_C__) && defined(__DOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -#elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# endif -# if (_MSC_VER < 700) -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# define LZO_BROKEN_SIZEOF 1 -# endif -#elif defined(__PACIFIC__) && defined(DOS) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#elif defined(__TURBOC__) && defined(__MSDOS__) -# if (__TURBOC__ < 0x0150) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# endif -# if (__TURBOC__ < 0x0200) -# define LZO_BROKEN_SIZEOF 1 -# endif -# if (__TURBOC__ < 0x0400) && defined(__cplusplus) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# endif -#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_SIZEOF 1 -#endif -#endif -#if defined(__WATCOMC__) && (__WATCOMC__ < 900) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#endif -#if defined(_CRAY) && defined(_CRAY1) -# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 -#endif -#define LZO_PP_STRINGIZE(x) #x -#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) -#define LZO_PP_CONCAT0() /*empty*/ -#define LZO_PP_CONCAT1(a) a -#define LZO_PP_CONCAT2(a,b) a ## b -#define LZO_PP_CONCAT3(a,b,c) a ## b ## c -#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_PP_ECONCAT0() LZO_PP_CONCAT0() -#define LZO_PP_ECONCAT1(a) LZO_PP_CONCAT1(a) -#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) -#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) -#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) -#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) -#define LZO_PP_ECONCAT6(a,b,c,d,e,f) LZO_PP_CONCAT6(a,b,c,d,e,f) -#define LZO_PP_ECONCAT7(a,b,c,d,e,f,g) LZO_PP_CONCAT7(a,b,c,d,e,f,g) -#define LZO_PP_EMPTY /*empty*/ -#define LZO_PP_EMPTY0() /*empty*/ -#define LZO_PP_EMPTY1(a) /*empty*/ -#define LZO_PP_EMPTY2(a,b) /*empty*/ -#define LZO_PP_EMPTY3(a,b,c) /*empty*/ -#define LZO_PP_EMPTY4(a,b,c,d) /*empty*/ -#define LZO_PP_EMPTY5(a,b,c,d,e) /*empty*/ -#define LZO_PP_EMPTY6(a,b,c,d,e,f) /*empty*/ -#define LZO_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/ -#if 1 -#define LZO_CPP_STRINGIZE(x) #x -#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) -#define LZO_CPP_CONCAT2(a,b) a ## b -#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c -#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) -#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) -#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) -#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) -#define LZO_CPP_ECONCAT6(a,b,c,d,e,f) LZO_CPP_CONCAT6(a,b,c,d,e,f) -#define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g) -#endif -#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-((b)!=0))) - (o)) << 1) + (o)*((b)!=0)) -#if 1 && defined(__cplusplus) -# if !defined(__STDC_CONSTANT_MACROS) -# define __STDC_CONSTANT_MACROS 1 -# endif -# if !defined(__STDC_LIMIT_MACROS) -# define __STDC_LIMIT_MACROS 1 -# endif -#endif -#if defined(__cplusplus) -# define LZO_EXTERN_C extern "C" -# define LZO_EXTERN_C_BEGIN extern "C" { -# define LZO_EXTERN_C_END } -#else -# define LZO_EXTERN_C extern -# define LZO_EXTERN_C_BEGIN /*empty*/ -# define LZO_EXTERN_C_END /*empty*/ -#endif -#if !defined(__LZO_OS_OVERRIDE) -#if (LZO_OS_FREESTANDING) -# define LZO_INFO_OS "freestanding" -#elif (LZO_OS_EMBEDDED) -# define LZO_INFO_OS "embedded" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_OS_EMBEDDED 1 -# define LZO_INFO_OS "embedded" -#elif defined(__CYGWIN__) && defined(__GNUC__) -# define LZO_OS_CYGWIN 1 -# define LZO_INFO_OS "cygwin" -#elif defined(__EMX__) && defined(__GNUC__) -# define LZO_OS_EMX 1 -# define LZO_INFO_OS "emx" -#elif defined(__BEOS__) -# define LZO_OS_BEOS 1 -# define LZO_INFO_OS "beos" -#elif defined(__Lynx__) -# define LZO_OS_LYNXOS 1 -# define LZO_INFO_OS "lynxos" -#elif defined(__OS400__) -# define LZO_OS_OS400 1 -# define LZO_INFO_OS "os400" -#elif defined(__QNX__) -# define LZO_OS_QNX 1 -# define LZO_INFO_OS "qnx" -#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__BORLANDC__) && defined(__DPMI16__) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -#elif defined(__ZTC__) && defined(DOS386) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__OS2__) || defined(__OS2V2__) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_OS216 1 -# define LZO_INFO_OS "os216" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_OS2 1 -# define LZO_INFO_OS "os2" -# else -# error "check your limits.h header" -# endif -#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) -# define LZO_OS_WIN64 1 -# define LZO_INFO_OS "win64" -#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__MWERKS__) && defined(__INTEL__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_WIN16 1 -# define LZO_INFO_OS "win16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# else -# error "check your limits.h header" -# endif -#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -# else -# error "check your limits.h header" -# endif -#elif defined(__WATCOMC__) -# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif defined(__NT__) && (__WATCOMC__ < 1100) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# elif defined(__linux__) || defined(__LINUX__) -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -# else -# error "please specify a target using the -bt compiler option" -# endif -#elif defined(__palmos__) -# define LZO_OS_PALMOS 1 -# define LZO_INFO_OS "palmos" -#elif defined(__TOS__) || defined(__atarist__) -# define LZO_OS_TOS 1 -# define LZO_INFO_OS "tos" -#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) -# define LZO_OS_MACCLASSIC 1 -# define LZO_INFO_OS "macclassic" -#elif defined(__VMS) -# define LZO_OS_VMS 1 -# define LZO_INFO_OS "vms" -#elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PS2 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "ps2" -#elif defined(__mips__) && defined(__psp__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PSP 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "psp" -#else -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -#endif -#if (LZO_OS_POSIX) -# if defined(_AIX) || defined(__AIX__) || defined(__aix__) -# define LZO_OS_POSIX_AIX 1 -# define LZO_INFO_OS_POSIX "aix" -# elif defined(__FreeBSD__) -# define LZO_OS_POSIX_FREEBSD 1 -# define LZO_INFO_OS_POSIX "freebsd" -# elif defined(__hpux__) || defined(__hpux) -# define LZO_OS_POSIX_HPUX 1 -# define LZO_INFO_OS_POSIX "hpux" -# elif defined(__INTERIX) -# define LZO_OS_POSIX_INTERIX 1 -# define LZO_INFO_OS_POSIX "interix" -# elif defined(__IRIX__) || defined(__irix__) -# define LZO_OS_POSIX_IRIX 1 -# define LZO_INFO_OS_POSIX "irix" -# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) -# define LZO_OS_POSIX_LINUX 1 -# define LZO_INFO_OS_POSIX "linux" -# elif defined(__APPLE__) && defined(__MACH__) -# if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000) -# define LZO_OS_POSIX_DARWIN 1040 -# define LZO_INFO_OS_POSIX "darwin_iphone" -# elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040) -# define LZO_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ -# define LZO_INFO_OS_POSIX "darwin" -# else -# define LZO_OS_POSIX_DARWIN 1 -# define LZO_INFO_OS_POSIX "darwin" -# endif -# define LZO_OS_POSIX_MACOSX LZO_OS_POSIX_DARWIN -# elif defined(__minix__) || defined(__minix) -# define LZO_OS_POSIX_MINIX 1 -# define LZO_INFO_OS_POSIX "minix" -# elif defined(__NetBSD__) -# define LZO_OS_POSIX_NETBSD 1 -# define LZO_INFO_OS_POSIX "netbsd" -# elif defined(__OpenBSD__) -# define LZO_OS_POSIX_OPENBSD 1 -# define LZO_INFO_OS_POSIX "openbsd" -# elif defined(__osf__) -# define LZO_OS_POSIX_OSF 1 -# define LZO_INFO_OS_POSIX "osf" -# elif defined(__solaris__) || defined(__sun) -# if defined(__SVR4) || defined(__svr4__) -# define LZO_OS_POSIX_SOLARIS 1 -# define LZO_INFO_OS_POSIX "solaris" -# else -# define LZO_OS_POSIX_SUNOS 1 -# define LZO_INFO_OS_POSIX "sunos" -# endif -# elif defined(__ultrix__) || defined(__ultrix) -# define LZO_OS_POSIX_ULTRIX 1 -# define LZO_INFO_OS_POSIX "ultrix" -# elif defined(_UNICOS) -# define LZO_OS_POSIX_UNICOS 1 -# define LZO_INFO_OS_POSIX "unicos" -# else -# define LZO_OS_POSIX_UNKNOWN 1 -# define LZO_INFO_OS_POSIX "unknown" -# endif -#endif -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (UINT_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) -# define LZO_CC_CILLY 1 -# define LZO_INFO_CC "Cilly" -# if defined(__CILLY__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) -# define LZO_CC_SDCC 1 -# define LZO_INFO_CC "sdcc" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) -#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) -# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0)) -# define LZO_INFO_CC "Pathscale C" -# define LZO_INFO_CCVER __PATHSCALE__ -# if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0) -# define LZO_CC_INTELC __INTEL_COMPILER -# define LZO_INFO_CC "Intel C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_INTELC_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__POCC__) && defined(_WIN32) -# define LZO_CC_PELLESC 1 -# define LZO_INFO_CC "Pelles C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) -#elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER) -# define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) -# define LZO_CC_CLANG_C2 _MSC_VER -# define LZO_CC_CLANG_VENDOR_MICROSOFT 1 -# define LZO_INFO_CC "clang/c2" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__c2_version__) -#elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__) -# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) -# define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) -# else -# define LZO_CC_CLANG 0x010000L -# endif -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_CLANG_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -# if defined(__APPLE_CC__) -# define LZO_CC_CLANG_VENDOR_APPLE 1 -# define LZO_INFO_CC "clang/apple" -# else -# define LZO_CC_CLANG_VENDOR_LLVM 1 -# define LZO_INFO_CC "clang" -# endif -# if defined(__clang_version__) -# define LZO_INFO_CCVER __clang_version__ -# else -# define LZO_INFO_CCVER __VERSION__ -# endif -#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_LLVM LZO_CC_LLVM_GNUC -# define LZO_INFO_CC "llvm-gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__ACK__) && defined(_ACK) -# define LZO_CC_ACK 1 -# define LZO_INFO_CC "Amsterdam Compiler Kit C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__ARMCC_VERSION) && !defined(__GNUC__) -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_CC_ARMCC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ARMCC_VERSION) -#elif defined(__AZTEC_C__) -# define LZO_CC_AZTECC 1 -# define LZO_INFO_CC "Aztec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) -#elif defined(__CODEGEARC__) -# define LZO_CC_CODEGEARC 1 -# define LZO_INFO_CC "CodeGear C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) -#elif defined(__BORLANDC__) -# define LZO_CC_BORLANDC 1 -# define LZO_INFO_CC "Borland C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) -#elif defined(_CRAYC) && defined(_RELEASE) -# define LZO_CC_CRAYC 1 -# define LZO_INFO_CC "Cray C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) -#elif defined(__DMC__) && defined(__SC__) -# define LZO_CC_DMC 1 -# define LZO_INFO_CC "Digital Mars C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) -#elif defined(__DECC) -# define LZO_CC_DECC 1 -# define LZO_INFO_CC "DEC C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) -#elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0) -# define LZO_CC_GHS 1 -# define LZO_INFO_CC "Green Hills C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_GHS_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__HIGHC__) -# define LZO_CC_HIGHC 1 -# define LZO_INFO_CC "MetaWare High C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__HP_aCC) && ((__HP_aCC-0) > 0) -# define LZO_CC_HPACC __HP_aCC -# define LZO_INFO_CC "HP aCC" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__HP_aCC) -#elif defined(__IAR_SYSTEMS_ICC__) -# define LZO_CC_IARC 1 -# define LZO_INFO_CC "IAR C" -# if defined(__VER__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__IBMC__) && ((__IBMC__-0) > 0) -# define LZO_CC_IBMC __IBMC__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) -#elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0) -# define LZO_CC_IBMC __IBMCPP__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMCPP__) -#elif defined(__KEIL__) && defined(__C166__) -# define LZO_CC_KEILC 1 -# define LZO_INFO_CC "Keil C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) -#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) -# define LZO_CC_LCCWIN32 1 -# define LZO_INFO_CC "lcc-win32" -# define LZO_INFO_CCVER "unknown" -#elif defined(__LCC__) -# define LZO_CC_LCC 1 -# define LZO_INFO_CC "lcc" -# if defined(__LCC_VERSION__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__MWERKS__) && ((__MWERKS__-0) > 0) -# define LZO_CC_MWERKS __MWERKS__ -# define LZO_INFO_CC "Metrowerks C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) -#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) -# define LZO_CC_NDPC 1 -# define LZO_INFO_CC "Microway NDP C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PACIFIC__) -# define LZO_CC_PACIFICC 1 -# define LZO_INFO_CC "Pacific C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) -#elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0)) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__) -# else -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0" -# endif -# define LZO_INFO_CC "Portland Group PGI C" -#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) -# define LZO_CC_PGI 1 -# define LZO_INFO_CC "Portland Group PGI C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PUREC__) && defined(__TOS__) -# define LZO_CC_PUREC 1 -# define LZO_INFO_CC "Pure C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) -#elif defined(__SC__) && defined(__ZTC__) -# define LZO_CC_SYMANTECC 1 -# define LZO_INFO_CC "Symantec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) -#elif defined(__SUNPRO_C) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_C-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_C -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__SUNPRO_CC) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_CC-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_CC -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__TINYC__) -# define LZO_CC_TINYC 1 -# define LZO_INFO_CC "Tiny C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) -#elif defined(__TSC__) -# define LZO_CC_TOPSPEEDC 1 -# define LZO_INFO_CC "TopSpeed C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) -#elif defined(__WATCOMC__) -# define LZO_CC_WATCOMC 1 -# define LZO_INFO_CC "Watcom C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) -#elif defined(__TURBOC__) -# define LZO_CC_TURBOC 1 -# define LZO_INFO_CC "Turbo C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) -#elif defined(__ZTC__) -# define LZO_CC_ZORTECHC 1 -# define LZO_INFO_CC "Zortech C" -# if ((__ZTC__-0) == 0x310) -# define LZO_INFO_CCVER "0x310" -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) -# endif -#elif defined(__GNUC__) && defined(__VERSION__) -# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# elif defined(__GNUC_MINOR__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# else -# define LZO_CC_GNUC (__GNUC__ * 0x10000L) -# endif -# define LZO_INFO_CC "gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_MSC _MSC_VER -# define LZO_INFO_CC "Microsoft C" -# if defined(_MSC_FULL_VER) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) -# endif -#else -# define LZO_CC_UNKNOWN 1 -# define LZO_INFO_CC "unknown" -# define LZO_INFO_CCVER "unknown" -#endif -#if (LZO_CC_GNUC) && defined(__OPEN64__) -# if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__) -# define LZO_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0)) -# define LZO_CC_OPEN64_GNUC LZO_CC_GNUC -# endif -#endif -#if (LZO_CC_GNUC) && defined(__PCC__) -# if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__) -# define LZO_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0)) -# define LZO_CC_PCC_GNUC LZO_CC_GNUC -# endif -#endif -#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) -# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" -#endif -#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) -# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) -# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) -# define LZO_ARCH_CRAY_MPP 1 -# elif defined(_CRAY1) -# define LZO_ARCH_CRAY_PVP 1 -# endif -# endif -#endif -#if !defined(__LZO_ARCH_OVERRIDE) -#if (LZO_ARCH_GENERIC) -# define LZO_INFO_ARCH "generic" -#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086 1 -# define LZO_INFO_ARCH "i086" -#elif defined(__aarch64__) || defined(_M_ARM64) -# define LZO_ARCH_ARM64 1 -# define LZO_INFO_ARCH "arm64" -#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) -# define LZO_ARCH_AMD64 1 -# define LZO_INFO_ARCH "amd64" -#elif defined(__arm__) || defined(_M_ARM) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) -# define LZO_ARCH_AVR 1 -# define LZO_INFO_ARCH "avr" -#elif defined(__avr32__) || defined(__AVR32__) -# define LZO_ARCH_AVR32 1 -# define LZO_INFO_ARCH "avr32" -#elif defined(__bfin__) -# define LZO_ARCH_BLACKFIN 1 -# define LZO_INFO_ARCH "blackfin" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) -# define LZO_ARCH_C166 1 -# define LZO_INFO_ARCH "c166" -#elif defined(__cris__) -# define LZO_ARCH_CRIS 1 -# define LZO_INFO_ARCH "cris" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) -# define LZO_ARCH_EZ80 1 -# define LZO_INFO_ARCH "ez80" -#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_ARCH_H8300 1 -# define LZO_INFO_ARCH "h8300" -#elif defined(__hppa__) || defined(__hppa) -# define LZO_ARCH_HPPA 1 -# define LZO_INFO_ARCH "hppa" -#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif (LZO_CC_ZORTECHC && defined(__I86__)) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) -# define LZO_ARCH_IA64 1 -# define LZO_INFO_ARCH "ia64" -#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) -# define LZO_ARCH_M16C 1 -# define LZO_INFO_ARCH "m16c" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) -# define LZO_ARCH_M16C 1 -# define LZO_INFO_ARCH "m16c" -#elif defined(__m32r__) -# define LZO_ARCH_M32R 1 -# define LZO_INFO_ARCH "m32r" -#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) -# define LZO_ARCH_M68K 1 -# define LZO_INFO_ARCH "m68k" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) -# define LZO_ARCH_MCS251 1 -# define LZO_INFO_ARCH "mcs251" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) -# define LZO_ARCH_MCS51 1 -# define LZO_INFO_ARCH "mcs51" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) -# define LZO_ARCH_MCS51 1 -# define LZO_INFO_ARCH "mcs51" -#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) -# define LZO_ARCH_MIPS 1 -# define LZO_INFO_ARCH "mips" -#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) -# define LZO_ARCH_MSP430 1 -# define LZO_INFO_ARCH "msp430" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) -# define LZO_ARCH_MSP430 1 -# define LZO_INFO_ARCH "msp430" -#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) -# define LZO_ARCH_POWERPC 1 -# define LZO_INFO_ARCH "powerpc" -#elif defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__PPC64__) -# define LZO_ARCH_POWERPC 1 -# define LZO_INFO_ARCH "powerpc" -#elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__) -# define LZO_ARCH_POWERPC 1 -# define LZO_INFO_ARCH "powerpc" -#elif defined(__riscv) -# define LZO_ARCH_RISCV 1 -# define LZO_INFO_ARCH "riscv" -#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) -# define LZO_ARCH_S390 1 -# define LZO_INFO_ARCH "s390" -#elif defined(__sh__) || defined(_M_SH) -# define LZO_ARCH_SH 1 -# define LZO_INFO_ARCH "sh" -#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) -# define LZO_ARCH_SPARC 1 -# define LZO_INFO_ARCH "sparc" -#elif defined(__SPU__) -# define LZO_ARCH_SPU 1 -# define LZO_INFO_ARCH "spu" -#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) -# define LZO_ARCH_Z80 1 -# define LZO_INFO_ARCH "z80" -#elif (LZO_ARCH_CRAY_PVP) -# if defined(_CRAYSV1) -# define LZO_ARCH_CRAY_SV1 1 -# define LZO_INFO_ARCH "cray_sv1" -# elif (_ADDR64) -# define LZO_ARCH_CRAY_T90 1 -# define LZO_INFO_ARCH "cray_t90" -# elif (_ADDR32) -# define LZO_ARCH_CRAY_YMP 1 -# define LZO_INFO_ARCH "cray_ymp" -# else -# define LZO_ARCH_CRAY_XMP 1 -# define LZO_INFO_ARCH "cray_xmp" -# endif -#else -# define LZO_ARCH_UNKNOWN 1 -# define LZO_INFO_ARCH "unknown" -#endif -#endif -#if !defined(LZO_ARCH_ARM_THUMB2) -#if (LZO_ARCH_ARM) -# if defined(__thumb__) || defined(__thumb) || defined(_M_THUMB) -# if defined(__thumb2__) -# define LZO_ARCH_ARM_THUMB2 1 -# elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) -# define LZO_ARCH_ARM_THUMB2 1 -# elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7) -# define LZO_ARCH_ARM_THUMB2 1 -# endif -# endif -#endif -#endif -#if (LZO_ARCH_ARM_THUMB2) -# undef LZO_INFO_ARCH -# define LZO_INFO_ARCH "arm_thumb2" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) -# error "FIXME - missing define for CPU architecture" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) -# error "FIXME - missing LZO_OS_WIN32 define for CPU architecture" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) -# error "FIXME - missing LZO_OS_WIN64 define for CPU architecture" -#endif -#if (LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) -# define LZO_ARCH_I086PM 1 -#endif -#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) -# define LZO_ARCH_X64 1 -#elif (!LZO_ARCH_AMD64 && LZO_ARCH_X64) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_AMD64 1 -#endif -#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) -# define LZO_ARCH_AARCH64 1 -#elif (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_ARM64 1 -#endif -#if (LZO_ARCH_I386 && !LZO_ARCH_X86) -# define LZO_ARCH_X86 1 -#elif (!LZO_ARCH_I386 && LZO_ARCH_X86) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_I386 1 -#endif -#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) || (!LZO_ARCH_AMD64 && LZO_ARCH_X64) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) || (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I086PM && !LZO_ARCH_I086) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I086) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_ARCH_I386) -# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) -# error "unexpected configuration - check your compiler defines" -# endif -# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_ARCH_AMD64 || LZO_ARCH_I386) -# if !defined(LZO_TARGET_FEATURE_SSE2) -# if defined(__SSE2__) -# define LZO_TARGET_FEATURE_SSE2 1 -# elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) -# define LZO_TARGET_FEATURE_SSE2 1 -# elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64) -# define LZO_TARGET_FEATURE_SSE2 1 -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_SSSE3) -# if (LZO_TARGET_FEATURE_SSE2) -# if defined(__SSSE3__) -# define LZO_TARGET_FEATURE_SSSE3 1 -# elif defined(_MSC_VER) && defined(__AVX__) -# define LZO_TARGET_FEATURE_SSSE3 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_SSE4_2) -# if (LZO_TARGET_FEATURE_SSSE3) -# if defined(__SSE4_2__) -# define LZO_TARGET_FEATURE_SSE4_2 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_AVX) -# if (LZO_TARGET_FEATURE_SSSE3) -# if defined(__AVX__) -# define LZO_TARGET_FEATURE_AVX 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_AVX2) -# if (LZO_TARGET_FEATURE_AVX) -# if defined(__AVX2__) -# define LZO_TARGET_FEATURE_AVX2 1 -# endif -# endif -# endif -#endif -#if (LZO_TARGET_FEATURE_SSSE3 && !(LZO_TARGET_FEATURE_SSE2)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_SSE4_2 && !(LZO_TARGET_FEATURE_SSSE3)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_AVX && !(LZO_TARGET_FEATURE_SSSE3)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_AVX2 && !(LZO_TARGET_FEATURE_AVX)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM) -# if !defined(LZO_TARGET_FEATURE_NEON) -# if defined(__ARM_NEON) && ((__ARM_NEON)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# endif -# endif -#elif (LZO_ARCH_ARM64) -# if !defined(LZO_TARGET_FEATURE_NEON) -# if 1 -# define LZO_TARGET_FEATURE_NEON 1 -# endif -# endif -#endif -#if 0 -#elif !defined(__LZO_MM_OVERRIDE) -#if (LZO_ARCH_I086) -#if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -#endif -#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) -# define LZO_MM_TINY 1 -#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) -# define LZO_MM_HUGE 1 -#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) -# define LZO_MM_SMALL 1 -#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) -# define LZO_MM_MEDIUM 1 -#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) -# define LZO_MM_COMPACT 1 -#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) -# define LZO_MM_LARGE 1 -#elif (LZO_CC_AZTECC) -# if defined(_LARGE_CODE) && defined(_LARGE_DATA) -# define LZO_MM_LARGE 1 -# elif defined(_LARGE_CODE) -# define LZO_MM_MEDIUM 1 -# elif defined(_LARGE_DATA) -# define LZO_MM_COMPACT 1 -# else -# define LZO_MM_SMALL 1 -# endif -#elif (LZO_CC_ZORTECHC && defined(__VCM__)) -# define LZO_MM_LARGE 1 -#else -# error "unknown LZO_ARCH_I086 memory model" -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -#define LZO_HAVE_MM_HUGE_PTR 1 -#define LZO_HAVE_MM_HUGE_ARRAY 1 -#if (LZO_MM_TINY) -# undef LZO_HAVE_MM_HUGE_ARRAY -#endif -#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) -# undef LZO_HAVE_MM_HUGE_PTR -# undef LZO_HAVE_MM_HUGE_ARRAY -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) -# undef LZO_HAVE_MM_HUGE_ARRAY -#elif (LZO_CC_MSC && defined(_QC)) -# undef LZO_HAVE_MM_HUGE_ARRAY -# if (_MSC_VER < 600) -# undef LZO_HAVE_MM_HUGE_PTR -# endif -#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) -# undef LZO_HAVE_MM_HUGE_ARRAY -#endif -#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) -# if (LZO_OS_DOS16) -# error "unexpected configuration - check your compiler defines" -# elif (LZO_CC_ZORTECHC) -# else -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if defined(__cplusplus) -extern "C" { -#endif -#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) -# define LZO_MM_AHSHIFT 12 -#elif (LZO_CC_WATCOMC) - extern unsigned char _HShift; -# define LZO_MM_AHSHIFT ((unsigned) _HShift) -#else -# error "FIXME - implement LZO_MM_AHSHIFT" -#endif -#if defined(__cplusplus) -} -#endif -#endif -#elif (LZO_ARCH_C166) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_C166 __MODEL__" -#elif ((__MODEL__) == 0) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 1) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_C166 __MODEL__" -#endif -#elif (LZO_ARCH_MCS251) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_MCS251 __MODEL__" -#elif ((__MODEL__) == 0) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_MCS251 __MODEL__" -#endif -#elif (LZO_ARCH_MCS51) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_MCS51 __MODEL__" -#elif ((__MODEL__) == 1) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_MCS51 __MODEL__" -#endif -#elif (LZO_ARCH_CRAY_PVP) -# define LZO_MM_PVP 1 -#else -# define LZO_MM_FLAT 1 -#endif -#if (LZO_MM_COMPACT) -# define LZO_INFO_MM "compact" -#elif (LZO_MM_FLAT) -# define LZO_INFO_MM "flat" -#elif (LZO_MM_HUGE) -# define LZO_INFO_MM "huge" -#elif (LZO_MM_LARGE) -# define LZO_INFO_MM "large" -#elif (LZO_MM_MEDIUM) -# define LZO_INFO_MM "medium" -#elif (LZO_MM_PVP) -# define LZO_INFO_MM "pvp" -#elif (LZO_MM_SMALL) -# define LZO_INFO_MM "small" -#elif (LZO_MM_TINY) -# define LZO_INFO_MM "tiny" -#else -# error "unknown memory model" -#endif -#endif -#if !defined(__lzo_gnuc_extension__) -#if (LZO_CC_GNUC >= 0x020800ul) -# define __lzo_gnuc_extension__ __extension__ -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_gnuc_extension__ __extension__ -#elif (LZO_CC_IBMC >= 600) -# define __lzo_gnuc_extension__ __extension__ -#endif -#endif -#if !defined(__lzo_gnuc_extension__) -# define __lzo_gnuc_extension__ /*empty*/ -#endif -#if !defined(lzo_has_builtin) -#if (LZO_CC_CLANG) && defined(__has_builtin) -# define lzo_has_builtin __has_builtin -#endif -#endif -#if !defined(lzo_has_builtin) -# define lzo_has_builtin(x) 0 -#endif -#if !defined(lzo_has_attribute) -#if (LZO_CC_CLANG) && defined(__has_attribute) -# define lzo_has_attribute __has_attribute -#endif -#endif -#if !defined(lzo_has_attribute) -# define lzo_has_attribute(x) 0 -#endif -#if !defined(lzo_has_declspec_attribute) -#if (LZO_CC_CLANG) && defined(__has_declspec_attribute) -# define lzo_has_declspec_attribute __has_declspec_attribute -#endif -#endif -#if !defined(lzo_has_declspec_attribute) -# define lzo_has_declspec_attribute(x) 0 -#endif -#if !defined(lzo_has_feature) -#if (LZO_CC_CLANG) && defined(__has_feature) -# define lzo_has_feature __has_feature -#endif -#endif -#if !defined(lzo_has_feature) -# define lzo_has_feature(x) 0 -#endif -#if !defined(lzo_has_extension) -#if (LZO_CC_CLANG) && defined(__has_extension) -# define lzo_has_extension __has_extension -#elif (LZO_CC_CLANG) && defined(__has_feature) -# define lzo_has_extension __has_feature -#endif -#endif -#if !defined(lzo_has_extension) -# define lzo_has_extension(x) 0 -#endif -#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -# elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1200)) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -# else -# define LZO_CFG_USE_NEW_STYLE_CASTS 1 -# endif -#endif -#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -#endif -#if !defined(__cplusplus) -# if defined(LZO_CFG_USE_NEW_STYLE_CASTS) -# undef LZO_CFG_USE_NEW_STYLE_CASTS -# endif -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -#endif -#if !defined(LZO_REINTERPRET_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_REINTERPRET_CAST(t,e) (reinterpret_cast (e)) -# endif -#endif -#if !defined(LZO_REINTERPRET_CAST) -# define LZO_REINTERPRET_CAST(t,e) ((t) (e)) -#endif -#if !defined(LZO_STATIC_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_STATIC_CAST(t,e) (static_cast (e)) -# endif -#endif -#if !defined(LZO_STATIC_CAST) -# define LZO_STATIC_CAST(t,e) ((t) (e)) -#endif -#if !defined(LZO_STATIC_CAST2) -# define LZO_STATIC_CAST2(t1,t2,e) LZO_STATIC_CAST(t1, LZO_STATIC_CAST(t2, e)) -#endif -#if !defined(LZO_UNCONST_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNCONST_CAST(t,e) (const_cast (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNCONST_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNCONST_CAST) -# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e)))) -#endif -#if !defined(LZO_UNCONST_VOLATILE_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNCONST_VOLATILE_CAST(t,e) (const_cast (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNCONST_VOLATILE_CAST) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e)))) -#endif -#if !defined(LZO_UNVOLATILE_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNVOLATILE_CAST(t,e) (const_cast (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNVOLATILE_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((volatile void *) (e))))) -# endif -#endif -#if !defined(LZO_UNVOLATILE_CAST) -# define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e)))) -#endif -#if !defined(LZO_UNVOLATILE_CONST_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNVOLATILE_CONST_CAST(t,e) (const_cast (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNVOLATILE_CONST_CAST) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e)))) -#endif -#if !defined(LZO_PCAST) -# if (LZO_HAVE_MM_HUGE_PTR) -# define LZO_PCAST(t,e) ((t) (e)) -# endif -#endif -#if !defined(LZO_PCAST) -# define LZO_PCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(void *, e)) -#endif -#if !defined(LZO_CCAST) -# if (LZO_HAVE_MM_HUGE_PTR) -# define LZO_CCAST(t,e) ((t) (e)) -# endif -#endif -#if !defined(LZO_CCAST) -# define LZO_CCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(const void *, e)) -#endif -#if !defined(LZO_ICONV) -# define LZO_ICONV(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(LZO_ICAST) -# define LZO_ICAST(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(LZO_ITRUNC) -# define LZO_ITRUNC(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(__lzo_cte) -# if (LZO_CC_MSC || LZO_CC_WATCOMC) -# define __lzo_cte(e) ((void)0,(e)) -# elif 1 -# define __lzo_cte(e) ((void)0,(e)) -# endif -#endif -#if !defined(__lzo_cte) -# define __lzo_cte(e) (e) -#endif -#if !defined(LZO_BLOCK_BEGIN) -# define LZO_BLOCK_BEGIN do { -# define LZO_BLOCK_END } while __lzo_cte(0) -#endif -#if !defined(LZO_UNUSED) -# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define LZO_UNUSED(var) ((void) &var) -# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) -# define LZO_UNUSED(var) if (&var) ; else -# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030200ul)) -# define LZO_UNUSED(var) ((void) &var) -# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNUSED(var) ((void) var) -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_UNUSED(var) if (&var) ; else -# elif (LZO_CC_KEILC) -# define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;} -# elif (LZO_CC_PACIFICC) -# define LZO_UNUSED(var) ((void) sizeof(var)) -# elif (LZO_CC_WATCOMC) && defined(__cplusplus) -# define LZO_UNUSED(var) ((void) var) -# else -# define LZO_UNUSED(var) ((void) &var) -# endif -#endif -#if !defined(LZO_UNUSED_RESULT) -# define LZO_UNUSED_RESULT(var) LZO_UNUSED(var) -#endif -#if !defined(LZO_UNUSED_FUNC) -# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define LZO_UNUSED_FUNC(func) ((void) func) -# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) -# define LZO_UNUSED_FUNC(func) if (func) ; else -# elif (LZO_CC_CLANG || LZO_CC_LLVM) -# define LZO_UNUSED_FUNC(func) ((void) &func) -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_UNUSED_FUNC(func) if (func) ; else -# elif (LZO_CC_MSC) -# define LZO_UNUSED_FUNC(func) ((void) &func) -# elif (LZO_CC_KEILC || LZO_CC_PELLESC) -# define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;} -# else -# define LZO_UNUSED_FUNC(func) ((void) func) -# endif -#endif -#if !defined(LZO_UNUSED_LABEL) -# if (LZO_CC_CLANG >= 0x020800ul) -# define LZO_UNUSED_LABEL(l) (__lzo_gnuc_extension__ ((void) ((const void *) &&l))) -# elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) -# define LZO_UNUSED_LABEL(l) if __lzo_cte(0) goto l -# else -# define LZO_UNUSED_LABEL(l) switch (0) case 1:goto l -# endif -#endif -#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) -# if 0 -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var -# elif 0 && (LZO_CC_GNUC) -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var -# else -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init -# endif -#endif -#if !defined(__lzo_inline) -#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) -#elif defined(__cplusplus) -# define __lzo_inline inline -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) -# define __lzo_inline inline -#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) -# define __lzo_inline __inline -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define __lzo_inline __inline__ -#elif (LZO_CC_DMC) -# define __lzo_inline __inline -#elif (LZO_CC_GHS) -# define __lzo_inline __inline__ -#elif (LZO_CC_IBMC >= 600) -# define __lzo_inline __inline__ -#elif (LZO_CC_INTELC) -# define __lzo_inline __inline -#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) -# define __lzo_inline __inline -#elif (LZO_CC_MSC && (_MSC_VER >= 900)) -# define __lzo_inline __inline -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_inline __inline__ -#endif -#endif -#if defined(__lzo_inline) -# ifndef __lzo_HAVE_inline -# define __lzo_HAVE_inline 1 -# endif -#else -# define __lzo_inline /*empty*/ -#endif -#if !defined(__lzo_forceinline) -#if (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) -# define __lzo_forceinline __forceinline -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __lzo_forceinline __forceinline -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#endif -#endif -#if defined(__lzo_forceinline) -# ifndef __lzo_HAVE_forceinline -# define __lzo_HAVE_forceinline 1 -# endif -#else -# define __lzo_forceinline __lzo_inline -#endif -#if !defined(__lzo_noinline) -#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) -# define __lzo_noinline __attribute__((__noinline__,__used__)) -#elif (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) -# define __lzo_noinline __declspec(noinline) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_noinline __declspec(noinline) -#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) -# if defined(__cplusplus) -# else -# define __lzo_noinline __declspec(noinline) -# endif -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_noinline __attribute__((__noinline__)) -#endif -#endif -#if defined(__lzo_noinline) -# ifndef __lzo_HAVE_noinline -# define __lzo_HAVE_noinline 1 -# endif -#else -# define __lzo_noinline /*empty*/ -#endif -#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) -# error "unexpected configuration - check your compiler defines" -#endif -#if !defined(__lzo_static_inline) -#if (LZO_CC_IBMC) -# define __lzo_static_inline __lzo_gnuc_extension__ static __lzo_inline -#endif -#endif -#if !defined(__lzo_static_inline) -# define __lzo_static_inline static __lzo_inline -#endif -#if !defined(__lzo_static_forceinline) -#if (LZO_CC_IBMC) -# define __lzo_static_forceinline __lzo_gnuc_extension__ static __lzo_forceinline -#endif -#endif -#if !defined(__lzo_static_forceinline) -# define __lzo_static_forceinline static __lzo_forceinline -#endif -#if !defined(__lzo_static_noinline) -#if (LZO_CC_IBMC) -# define __lzo_static_noinline __lzo_gnuc_extension__ static __lzo_noinline -#endif -#endif -#if !defined(__lzo_static_noinline) -# define __lzo_static_noinline static __lzo_noinline -#endif -#if !defined(__lzo_c99_extern_inline) -#if defined(__GNUC_GNU_INLINE__) -# define __lzo_c99_extern_inline __lzo_inline -#elif defined(__GNUC_STDC_INLINE__) -# define __lzo_c99_extern_inline extern __lzo_inline -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) -# define __lzo_c99_extern_inline extern __lzo_inline -#endif -#if !defined(__lzo_c99_extern_inline) && (__lzo_HAVE_inline) -# define __lzo_c99_extern_inline __lzo_inline -#endif -#endif -#if defined(__lzo_c99_extern_inline) -# ifndef __lzo_HAVE_c99_extern_inline -# define __lzo_HAVE_c99_extern_inline 1 -# endif -#else -# define __lzo_c99_extern_inline /*empty*/ -#endif -#if !defined(__lzo_may_alias) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_CLANG >= 0x020900ul) -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0 -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_PGI >= 0x0d0a00ul) && 0 -# define __lzo_may_alias __attribute__((__may_alias__)) -#endif -#endif -#if defined(__lzo_may_alias) -# ifndef __lzo_HAVE_may_alias -# define __lzo_HAVE_may_alias 1 -# endif -#else -# define __lzo_may_alias /*empty*/ -#endif -#if !defined(__lzo_noreturn) -#if (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) -# define __lzo_noreturn __declspec(noreturn) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __lzo_noreturn __declspec(noreturn) -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_noreturn __attribute__((__noreturn__)) -#endif -#endif -#if defined(__lzo_noreturn) -# ifndef __lzo_HAVE_noreturn -# define __lzo_HAVE_noreturn 1 -# endif -#else -# define __lzo_noreturn /*empty*/ -#endif -#if !defined(__lzo_nothrow) -#if (LZO_CC_GNUC >= 0x030300ul) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus) -# define __lzo_nothrow __declspec(nothrow) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900)) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) -# define __lzo_nothrow __declspec(nothrow) -#endif -#endif -#if defined(__lzo_nothrow) -# ifndef __lzo_HAVE_nothrow -# define __lzo_HAVE_nothrow 1 -# endif -#else -# define __lzo_nothrow /*empty*/ -#endif -#if !defined(__lzo_restrict) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_IBMC >= 800) && !defined(__cplusplus) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_IBMC >= 1210) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) -# define __lzo_restrict __restrict -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_restrict __restrict__ -#endif -#endif -#if defined(__lzo_restrict) -# ifndef __lzo_HAVE_restrict -# define __lzo_HAVE_restrict 1 -# endif -#else -# define __lzo_restrict /*empty*/ -#endif -#if !defined(__lzo_alignof) -#if (LZO_CC_ARMCC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_GHS) && !defined(__cplusplus) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_IBMC >= 600) -# define __lzo_alignof(e) (__lzo_gnuc_extension__ __alignof__(e)) -#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_alignof(e) __alignof(e) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_alignof(e) __alignof__(e) -#endif -#endif -#if defined(__lzo_alignof) -# ifndef __lzo_HAVE_alignof -# define __lzo_HAVE_alignof 1 -# endif -#endif -#if !defined(__lzo_struct_packed) -#if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) -#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) -#elif (LZO_CC_GNUC >= 0x030400ul) && !(LZO_CC_PCC_GNUC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -# define __lzo_struct_packed(s) struct s { -# define __lzo_struct_packed_end() } __attribute__((__gcc_struct__,__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__gcc_struct__,__packed__)); -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_struct_packed(s) struct s { -# define __lzo_struct_packed_end() } __attribute__((__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_IBMC >= 700) -# define __lzo_struct_packed(s) __lzo_gnuc_extension__ struct s { -# define __lzo_struct_packed_end() } __attribute__((__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_struct_packed(s) __pragma(pack(push,1)) struct s { -# define __lzo_struct_packed_end() } __pragma(pack(pop)); -#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) -# define __lzo_struct_packed(s) _Packed struct s { -# define __lzo_struct_packed_end() }; -#endif -#endif -#if defined(__lzo_struct_packed) && !defined(__lzo_struct_packed_ma) -# define __lzo_struct_packed_ma(s) __lzo_struct_packed(s) -#endif -#if defined(__lzo_struct_packed_end) && !defined(__lzo_struct_packed_ma_end) -# define __lzo_struct_packed_ma_end() __lzo_struct_packed_end() -#endif -#if !defined(__lzo_byte_struct) -#if defined(__lzo_struct_packed) -# define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end() -# define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end() -#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_PGI || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); -# define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); -#endif -#endif -#if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma) -# define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n) -#endif -#if !defined(__lzo_struct_align16) && (__lzo_HAVE_alignof) -#if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul)) -#elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_CILLY || LZO_CC_PCC) -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_struct_align16(s) struct __declspec(align(16)) s { -# define __lzo_struct_align16_end() }; -# define __lzo_struct_align32(s) struct __declspec(align(32)) s { -# define __lzo_struct_align32_end() }; -# define __lzo_struct_align64(s) struct __declspec(align(64)) s { -# define __lzo_struct_align64_end() }; -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || (LZO_CC_IBMC >= 700) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_struct_align16(s) struct s { -# define __lzo_struct_align16_end() } __attribute__((__aligned__(16))); -# define __lzo_struct_align32(s) struct s { -# define __lzo_struct_align32_end() } __attribute__((__aligned__(32))); -# define __lzo_struct_align64(s) struct s { -# define __lzo_struct_align64_end() } __attribute__((__aligned__(64))); -#endif -#endif -#if !defined(__lzo_union_um) -#if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER < 810)) -#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) -#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_union_am(s) union s { -# define __lzo_union_am_end() } __lzo_may_alias; -# define __lzo_union_um(s) union s { -# define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_IBMC >= 700) -# define __lzo_union_am(s) __lzo_gnuc_extension__ union s { -# define __lzo_union_am_end() } __lzo_may_alias; -# define __lzo_union_um(s) __lzo_gnuc_extension__ union s { -# define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_union_um(s) __pragma(pack(push,1)) union s { -# define __lzo_union_um_end() } __pragma(pack(pop)); -#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) -# define __lzo_union_um(s) _Packed union s { -# define __lzo_union_um_end() }; -#endif -#endif -#if !defined(__lzo_union_am) -# define __lzo_union_am(s) union s { -# define __lzo_union_am_end() }; -#endif -#if !defined(__lzo_constructor) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_constructor __attribute__((__constructor__,__used__)) -#elif (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_constructor __attribute__((__constructor__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_constructor __attribute__((__constructor__,__used__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_constructor __attribute__((__constructor__)) -#endif -#endif -#if defined(__lzo_constructor) -# ifndef __lzo_HAVE_constructor -# define __lzo_HAVE_constructor 1 -# endif -#endif -#if !defined(__lzo_destructor) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_destructor __attribute__((__destructor__,__used__)) -#elif (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_destructor __attribute__((__destructor__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_destructor __attribute__((__destructor__,__used__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_destructor __attribute__((__destructor__)) -#endif -#endif -#if defined(__lzo_destructor) -# ifndef __lzo_HAVE_destructor -# define __lzo_HAVE_destructor 1 -# endif -#endif -#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) -# error "unexpected configuration - check your compiler defines" -#endif -#if !defined(__lzo_likely) && !defined(__lzo_unlikely) -#if (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_IBMC >= 1010) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_CLANG && LZO_CC_CLANG_C2) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#endif -#endif -#if defined(__lzo_likely) -# ifndef __lzo_HAVE_likely -# define __lzo_HAVE_likely 1 -# endif -#else -# define __lzo_likely(e) (e) -#endif -#if defined(__lzo_very_likely) -# ifndef __lzo_HAVE_very_likely -# define __lzo_HAVE_very_likely 1 -# endif -#else -# define __lzo_very_likely(e) __lzo_likely(e) -#endif -#if defined(__lzo_unlikely) -# ifndef __lzo_HAVE_unlikely -# define __lzo_HAVE_unlikely 1 -# endif -#else -# define __lzo_unlikely(e) (e) -#endif -#if defined(__lzo_very_unlikely) -# ifndef __lzo_HAVE_very_unlikely -# define __lzo_HAVE_very_unlikely 1 -# endif -#else -# define __lzo_very_unlikely(e) __lzo_unlikely(e) -#endif -#if !defined(__lzo_loop_forever) -# if (LZO_CC_IBMC) -# define __lzo_loop_forever() LZO_BLOCK_BEGIN for (;;) { ; } LZO_BLOCK_END -# else -# define __lzo_loop_forever() do { ; } while __lzo_cte(1) -# endif -#endif -#if !defined(__lzo_unreachable) -#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable) -# define __lzo_unreachable() __builtin_unreachable(); -#elif (LZO_CC_GNUC >= 0x040500ul) -# define __lzo_unreachable() __builtin_unreachable(); -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1 -# define __lzo_unreachable() __builtin_unreachable(); -#endif -#endif -#if defined(__lzo_unreachable) -# ifndef __lzo_HAVE_unreachable -# define __lzo_HAVE_unreachable 1 -# endif -#else -# if 0 -# define __lzo_unreachable() ((void)0); -# else -# define __lzo_unreachable() __lzo_loop_forever(); -# endif -#endif -#if !defined(lzo_unused_funcs_impl) -# if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f -# elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC) -# define lzo_unused_funcs_impl(r,f) static r f -# else -# define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f -# endif -#endif -#ifndef __LZO_CTA_NAME -#if (LZO_CFG_USE_COUNTER) -# define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__) -#else -# define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__LINE__) -#endif -#endif -#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) -# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1u-2*!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020900ul)) && defined(__cplusplus) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN int __LZO_CTA_NAME(lzo_cta_f__)(int [1-2*!(e)]); LZO_EXTERN_C_END -# elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__)); LZO_EXTERN_C_END -# else -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-2*!(e)]; LZO_EXTERN_C_END -# endif -#endif -#if !defined(LZO_COMPILE_TIME_ASSERT) -# if (LZO_CC_AZTECC) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];} -# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul)) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} -# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) -# define LZO_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));} -# elif (LZO_CC_GNUC >= 0x040700ul) && (LZO_CFG_USE_COUNTER) && defined(__cplusplus) -# define LZO_COMPILE_TIME_ASSERT(e) {enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__));} -# elif (LZO_CC_GNUC >= 0x040700ul) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# else -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)];} -# endif -#endif -#if (LZO_LANG_ASSEMBLER) -# undef LZO_COMPILE_TIME_ASSERT_HEADER -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) /*empty*/ -#else -LZO_COMPILE_TIME_ASSERT_HEADER(1 == 1) -#if defined(__cplusplus) -extern "C" { LZO_COMPILE_TIME_ASSERT_HEADER(2 == 2) } -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3) -#endif -#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) -# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -# define __lzo_cdecl __cdecl -# define __lzo_cdecl_atexit /*empty*/ -# define __lzo_cdecl_main __cdecl -# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define __lzo_cdecl_qsort __pascal -# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) -# define __lzo_cdecl_qsort _stdcall -# else -# define __lzo_cdecl_qsort __cdecl -# endif -# elif (LZO_CC_WATCOMC) -# define __lzo_cdecl __cdecl -# else -# define __lzo_cdecl __cdecl -# define __lzo_cdecl_atexit __cdecl -# define __lzo_cdecl_main __cdecl -# define __lzo_cdecl_qsort __cdecl -# endif -# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) -# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define __lzo_cdecl_sighandler __pascal -# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) -# define __lzo_cdecl_sighandler _stdcall -# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) -# define __lzo_cdecl_sighandler __clrcall -# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) -# if defined(_DLL) -# define __lzo_cdecl_sighandler _far _cdecl _loadds -# elif defined(_MT) -# define __lzo_cdecl_sighandler _far _cdecl -# else -# define __lzo_cdecl_sighandler _cdecl -# endif -# else -# define __lzo_cdecl_sighandler __cdecl -# endif -#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) -# define __lzo_cdecl __cdecl -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# define __lzo_cdecl cdecl -#endif -#if !defined(__lzo_cdecl) -# define __lzo_cdecl /*empty*/ -#endif -#if !defined(__lzo_cdecl_atexit) -# define __lzo_cdecl_atexit /*empty*/ -#endif -#if !defined(__lzo_cdecl_main) -# define __lzo_cdecl_main /*empty*/ -#endif -#if !defined(__lzo_cdecl_qsort) -# define __lzo_cdecl_qsort /*empty*/ -#endif -#if !defined(__lzo_cdecl_sighandler) -# define __lzo_cdecl_sighandler /*empty*/ -#endif -#if !defined(__lzo_cdecl_va) -# define __lzo_cdecl_va __lzo_cdecl -#endif -#if !(LZO_CFG_NO_WINDOWS_H) -#if !defined(LZO_HAVE_WINDOWS_H) -#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) -# elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))) -# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) -# else -# define LZO_HAVE_WINDOWS_H 1 -# endif -#endif -#endif -#endif -#define LZO_SIZEOF_CHAR 1 -#ifndef LZO_SIZEOF_SHORT -#if defined(SIZEOF_SHORT) -# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) -#elif defined(__SIZEOF_SHORT__) -# define LZO_SIZEOF_SHORT (__SIZEOF_SHORT__) -#endif -#endif -#ifndef LZO_SIZEOF_INT -#if defined(SIZEOF_INT) -# define LZO_SIZEOF_INT (SIZEOF_INT) -#elif defined(__SIZEOF_INT__) -# define LZO_SIZEOF_INT (__SIZEOF_INT__) -#endif -#endif -#ifndef LZO_SIZEOF_LONG -#if defined(SIZEOF_LONG) -# define LZO_SIZEOF_LONG (SIZEOF_LONG) -#elif defined(__SIZEOF_LONG__) -# define LZO_SIZEOF_LONG (__SIZEOF_LONG__) -#endif -#endif -#ifndef LZO_SIZEOF_LONG_LONG -#if defined(SIZEOF_LONG_LONG) -# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) -#elif defined(__SIZEOF_LONG_LONG__) -# define LZO_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__) -#endif -#endif -#ifndef LZO_SIZEOF___INT16 -#if defined(SIZEOF___INT16) -# define LZO_SIZEOF___INT16 (SIZEOF___INT16) -#endif -#endif -#ifndef LZO_SIZEOF___INT32 -#if defined(SIZEOF___INT32) -# define LZO_SIZEOF___INT32 (SIZEOF___INT32) -#endif -#endif -#ifndef LZO_SIZEOF___INT64 -#if defined(SIZEOF___INT64) -# define LZO_SIZEOF___INT64 (SIZEOF___INT64) -#endif -#endif -#ifndef LZO_SIZEOF_VOID_P -#if defined(SIZEOF_VOID_P) -# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) -#elif defined(__SIZEOF_POINTER__) -# define LZO_SIZEOF_VOID_P (__SIZEOF_POINTER__) -#endif -#endif -#ifndef LZO_SIZEOF_SIZE_T -#if defined(SIZEOF_SIZE_T) -# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) -#elif defined(__SIZEOF_SIZE_T__) -# define LZO_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__) -#endif -#endif -#ifndef LZO_SIZEOF_PTRDIFF_T -#if defined(SIZEOF_PTRDIFF_T) -# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) -#elif defined(__SIZEOF_PTRDIFF_T__) -# define LZO_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__) -#endif -#endif -#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) -#if !defined(LZO_SIZEOF_SHORT) -# if (LZO_ARCH_CRAY_PVP) -# define LZO_SIZEOF_SHORT 8 -# elif (USHRT_MAX == LZO_0xffffL) -# define LZO_SIZEOF_SHORT 2 -# elif (__LZO_LSR(USHRT_MAX,7) == 1) -# define LZO_SIZEOF_SHORT 1 -# elif (__LZO_LSR(USHRT_MAX,15) == 1) -# define LZO_SIZEOF_SHORT 2 -# elif (__LZO_LSR(USHRT_MAX,31) == 1) -# define LZO_SIZEOF_SHORT 4 -# elif (__LZO_LSR(USHRT_MAX,63) == 1) -# define LZO_SIZEOF_SHORT 8 -# elif (__LZO_LSR(USHRT_MAX,127) == 1) -# define LZO_SIZEOF_SHORT 16 -# else -# error "LZO_SIZEOF_SHORT" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SHORT == sizeof(short)) -#if !defined(LZO_SIZEOF_INT) -# if (LZO_ARCH_CRAY_PVP) -# define LZO_SIZEOF_INT 8 -# elif (UINT_MAX == LZO_0xffffL) -# define LZO_SIZEOF_INT 2 -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_SIZEOF_INT 4 -# elif (__LZO_LSR(UINT_MAX,7) == 1) -# define LZO_SIZEOF_INT 1 -# elif (__LZO_LSR(UINT_MAX,15) == 1) -# define LZO_SIZEOF_INT 2 -# elif (__LZO_LSR(UINT_MAX,31) == 1) -# define LZO_SIZEOF_INT 4 -# elif (__LZO_LSR(UINT_MAX,63) == 1) -# define LZO_SIZEOF_INT 8 -# elif (__LZO_LSR(UINT_MAX,127) == 1) -# define LZO_SIZEOF_INT 16 -# else -# error "LZO_SIZEOF_INT" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_INT == sizeof(int)) -#if !defined(LZO_SIZEOF_LONG) -# if (ULONG_MAX == LZO_0xffffffffL) -# define LZO_SIZEOF_LONG 4 -# elif (__LZO_LSR(ULONG_MAX,7) == 1) -# define LZO_SIZEOF_LONG 1 -# elif (__LZO_LSR(ULONG_MAX,15) == 1) -# define LZO_SIZEOF_LONG 2 -# elif (__LZO_LSR(ULONG_MAX,31) == 1) -# define LZO_SIZEOF_LONG 4 -# elif (__LZO_LSR(ULONG_MAX,39) == 1) -# define LZO_SIZEOF_LONG 5 -# elif (__LZO_LSR(ULONG_MAX,63) == 1) -# define LZO_SIZEOF_LONG 8 -# elif (__LZO_LSR(ULONG_MAX,127) == 1) -# define LZO_SIZEOF_LONG 16 -# else -# error "LZO_SIZEOF_LONG" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_LONG == sizeof(long)) -#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) -#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) -# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) -# if (LZO_CC_GNUC >= 0x030300ul) -# if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0)) -# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG -# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) -# define LZO_SIZEOF_LONG_LONG 4 -# endif -# endif -# endif -#endif -#endif -#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) -#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) -#if (LZO_ARCH_I086 && LZO_CC_DMC) -#elif (LZO_CC_CILLY) && defined(__GNUC__) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_SIZEOF_LONG_LONG 8 -#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_OS_WIN64 || defined(_WIN64)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) -# define LZO_SIZEOF___INT64 8 -#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) -#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -# define LZO_SIZEOF_LONG_LONG 8 -#endif -#endif -#endif -#if defined(__cplusplus) && (LZO_CC_GNUC) -# if (LZO_CC_GNUC < 0x020800ul) -# undef LZO_SIZEOF_LONG_LONG -# endif -#endif -#if (LZO_CFG_NO_LONG_LONG) -# undef LZO_SIZEOF_LONG_LONG -#elif defined(__NO_LONG_LONG) -# undef LZO_SIZEOF_LONG_LONG -#elif defined(_NO_LONGLONG) -# undef LZO_SIZEOF_LONG_LONG -#endif -#if !defined(LZO_WORDSIZE) -#if (LZO_ARCH_ALPHA) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_AMD64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_ARM64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_AVR) -# define LZO_WORDSIZE 1 -#elif (LZO_ARCH_H8300) -# if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_WORDSIZE 4 -# else -# define LZO_WORDSIZE 2 -# endif -#elif (LZO_ARCH_I086) -# define LZO_WORDSIZE 2 -#elif (LZO_ARCH_IA64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_M16C) -# define LZO_WORDSIZE 2 -#elif (LZO_ARCH_SPU) -# define LZO_WORDSIZE 4 -#elif (LZO_ARCH_Z80) -# define LZO_WORDSIZE 1 -#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define LZO_WORDSIZE 8 -#elif (LZO_OS_OS400 || defined(__OS400__)) -# define LZO_WORDSIZE 8 -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) -# define LZO_WORDSIZE 8 -#endif -#endif -#if !defined(LZO_SIZEOF_VOID_P) -#if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) -# define LZO_SIZEOF_VOID_P 4 -#elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) -# define LZO_SIZEOF_VOID_P 8 -#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) -# define LZO_SIZEOF_VOID_P 8 -#elif defined(__LP64__) || defined(__LP64) || defined(_LP64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) -# define LZO_SIZEOF_VOID_P 8 -#elif (LZO_ARCH_AVR) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_ARCH_H8300) -# if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) - LZO_COMPILE_TIME_ASSERT_HEADER(LZO_WORDSIZE == 4) -# if defined(__NORMAL_MODE__) -# define LZO_SIZEOF_VOID_P 2 -# else -# define LZO_SIZEOF_VOID_P 4 -# endif -# else - LZO_COMPILE_TIME_ASSERT_HEADER(LZO_WORDSIZE == 2) -# define LZO_SIZEOF_VOID_P 2 -# endif -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT -# endif -#elif (LZO_ARCH_I086) -# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) -# define LZO_SIZEOF_VOID_P 2 -# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) -# define LZO_SIZEOF_VOID_P 4 -# else -# error "invalid LZO_ARCH_I086 memory model" -# endif -#elif (LZO_ARCH_M16C) -# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) -# define LZO_SIZEOF_VOID_P 4 -# else -# define LZO_SIZEOF_VOID_P 2 -# endif -#elif (LZO_ARCH_SPU) -# define LZO_SIZEOF_VOID_P 4 -#elif (LZO_ARCH_Z80) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define LZO_SIZEOF_VOID_P 4 -#elif (LZO_OS_OS400 || defined(__OS400__)) -# if defined(__LLP64_IFC__) -# define LZO_SIZEOF_VOID_P 8 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -# else -# define LZO_SIZEOF_VOID_P 16 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -# endif -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) -# define LZO_SIZEOF_VOID_P 8 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -#endif -#endif -#if !defined(LZO_SIZEOF_VOID_P) -# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_VOID_P == sizeof(void *)) -#if !defined(LZO_SIZEOF_SIZE_T) -#if (LZO_ARCH_I086 || LZO_ARCH_M16C) -# define LZO_SIZEOF_SIZE_T 2 -#endif -#endif -#if !defined(LZO_SIZEOF_SIZE_T) -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P -#endif -#if defined(offsetof) -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SIZE_T == sizeof(size_t)) -#endif -#if !defined(LZO_SIZEOF_PTRDIFF_T) -#if (LZO_ARCH_I086) -# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P -# elif (LZO_MM_COMPACT || LZO_MM_LARGE) -# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) -# define LZO_SIZEOF_PTRDIFF_T 4 -# else -# define LZO_SIZEOF_PTRDIFF_T 2 -# endif -# else -# error "invalid LZO_ARCH_I086 memory model" -# endif -#endif -#endif -#if !defined(LZO_SIZEOF_PTRDIFF_T) -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T -#endif -#if defined(offsetof) -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) -#endif -#if !defined(LZO_WORDSIZE) -# define LZO_WORDSIZE LZO_SIZEOF_VOID_P -#endif -#if (LZO_ABI_NEUTRAL_ENDIAN) -# undef LZO_ABI_BIG_ENDIAN -# undef LZO_ABI_LITTLE_ENDIAN -#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) -#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) -# define LZO_ABI_BIG_ENDIAN 1 -#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430 || LZO_ARCH_RISCV) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390 || LZO_ARCH_SPU) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) -# if (__LITTLE_ENDIAN__ == 1) -# define LZO_ABI_LITTLE_ENDIAN 1 -# else -# define LZO_ABI_BIG_ENDIAN 1 -# endif -#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM && LZO_CC_ARMCC_ARMCC) -# if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -# elif defined(__BIG_ENDIAN) -# define LZO_ABI_BIG_ENDIAN 1 -# else -# define LZO_ABI_LITTLE_ENDIAN 1 -# endif -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#endif -#endif -#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ABI_BIG_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "be" -#elif (LZO_ABI_LITTLE_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "le" -#elif (LZO_ABI_NEUTRAL_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "neutral" -#endif -#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) -# define LZO_ABI_I8LP16 1 -# define LZO_INFO_ABI_PM "i8lp16" -#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) -# define LZO_ABI_ILP16 1 -# define LZO_INFO_ABI_PM "ilp16" -#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_LP32 1 -# define LZO_INFO_ABI_PM "lp32" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_ILP32 1 -# define LZO_INFO_ABI_PM "ilp32" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) -# define LZO_ABI_LLP64 1 -# define LZO_INFO_ABI_PM "llp64" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) -# define LZO_ABI_LP64 1 -# define LZO_INFO_ABI_PM "lp64" -#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) -# define LZO_ABI_ILP64 1 -# define LZO_INFO_ABI_PM "ilp64" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_IP32L64 1 -# define LZO_INFO_ABI_PM "ip32l64" -#endif -#if (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_VOID_P == 4 && LZO_WORDSIZE == 8) -# define LZO_ABI_IP32W64 1 -# ifndef LZO_INFO_ABI_PM -# define LZO_INFO_ABI_PM "ip32w64" -# endif -#endif -#if 0 -#elif !defined(__LZO_LIBC_OVERRIDE) -#if (LZO_LIBC_NAKED) -# define LZO_INFO_LIBC "naked" -#elif (LZO_LIBC_FREESTANDING) -# define LZO_INFO_LIBC "freestanding" -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# define LZO_INFO_LIBC "mfreestanding" -#elif (LZO_LIBC_ISOC90) -# define LZO_INFO_LIBC "isoc90" -#elif (LZO_LIBC_ISOC99) -# define LZO_INFO_LIBC "isoc99" -#elif (LZO_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION) -# define LZO_LIBC_ISOC90 1 -# define LZO_INFO_LIBC "isoc90" -#elif defined(__dietlibc__) -# define LZO_LIBC_DIETLIBC 1 -# define LZO_INFO_LIBC "dietlibc" -#elif defined(_NEWLIB_VERSION) -# define LZO_LIBC_NEWLIB 1 -# define LZO_INFO_LIBC "newlib" -#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) -# if defined(__UCLIBC_SUBLEVEL__) -# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0)) -# else -# define LZO_LIBC_UCLIBC 0x00090bL -# endif -# define LZO_INFO_LIBC "uc" "libc" -#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100) -# define LZO_INFO_LIBC "glibc" -#elif (LZO_CC_MWERKS) && defined(__MSL__) -# define LZO_LIBC_MSL __MSL__ -# define LZO_INFO_LIBC "msl" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_LIBC_ISOC90 1 -# define LZO_INFO_LIBC "isoc90" -#else -# define LZO_LIBC_DEFAULT 1 -# define LZO_INFO_LIBC "default" -#endif -#endif -#if (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) -# define LZO_ASM_SYNTAX_MSC 1 -#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) -#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) -#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) -# define LZO_ASM_SYNTAX_GNUC 1 -#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) -# define LZO_ASM_SYNTAX_GNUC 1 -#elif (LZO_CC_GNUC) -# define LZO_ASM_SYNTAX_GNUC 1 -#endif -#if (LZO_ASM_SYNTAX_GNUC) -#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) -# define __LZO_ASM_CLOBBER "ax" -# define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1000)) -# define __LZO_ASM_CLOBBER "memory" -# define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "memory" -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#else -# define __LZO_ASM_CLOBBER "cc", "memory" -# define __LZO_ASM_CLOBBER_LIST_CC : "cc" -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory" -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#endif -#endif -#if (LZO_ARCH_ALPHA) -# define LZO_OPT_AVOID_UINT_INDEX 1 -#elif (LZO_ARCH_AMD64) -# define LZO_OPT_AVOID_INT_INDEX 1 -# define LZO_OPT_AVOID_UINT_INDEX 1 -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -#elif (LZO_ARCH_ARM) -# if defined(__ARM_FEATURE_UNALIGNED) -# if ((__ARM_FEATURE_UNALIGNED)+0) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -# elif 1 && (LZO_ARCH_ARM_THUMB2) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__ARM_ARCH) && ((__ARM_ARCH)+0 >= 7) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -#elif (LZO_ARCH_ARM64) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -#elif (LZO_ARCH_CRIS) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -#elif (LZO_ARCH_I386) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -#elif (LZO_ARCH_IA64) -# define LZO_OPT_AVOID_INT_INDEX 1 -# define LZO_OPT_AVOID_UINT_INDEX 1 -# define LZO_OPT_PREFER_POSTINC 1 -#elif (LZO_ARCH_M68K) -# define LZO_OPT_PREFER_POSTINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -# if defined(__mc68020__) && !defined(__mcoldfire__) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -#elif (LZO_ARCH_MIPS) -# define LZO_OPT_AVOID_UINT_INDEX 1 -#elif (LZO_ARCH_POWERPC) -# define LZO_OPT_PREFER_PREINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -# if (LZO_ABI_BIG_ENDIAN) || (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -# endif -#elif (LZO_ARCH_RISCV) -# define LZO_OPT_AVOID_UINT_INDEX 1 -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -#elif (LZO_ARCH_S390) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -#elif (LZO_ARCH_SH) -# define LZO_OPT_PREFER_POSTINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -#endif -#ifndef LZO_CFG_NO_INLINE_ASM -#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) -# define LZO_CFG_NO_INLINE_ASM 1 -#elif (LZO_CC_LLVM) -# define LZO_CFG_NO_INLINE_ASM 1 -#endif -#endif -#if (LZO_CFG_NO_INLINE_ASM) -# undef LZO_ASM_SYNTAX_MSC -# undef LZO_ASM_SYNTAX_GNUC -# undef __LZO_ASM_CLOBBER -# undef __LZO_ASM_CLOBBER_LIST_CC -# undef __LZO_ASM_CLOBBER_LIST_CC_MEMORY -# undef __LZO_ASM_CLOBBER_LIST_EMPTY -#endif -#ifndef LZO_CFG_NO_UNALIGNED -#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) -# define LZO_CFG_NO_UNALIGNED 1 -#endif -#endif -#if (LZO_CFG_NO_UNALIGNED) -# undef LZO_OPT_UNALIGNED16 -# undef LZO_OPT_UNALIGNED32 -# undef LZO_OPT_UNALIGNED64 -#endif -#if defined(__LZO_INFOSTR_MM) -#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) -# define __LZO_INFOSTR_MM "" -#elif defined(LZO_INFO_MM) -# define __LZO_INFOSTR_MM "." LZO_INFO_MM -#else -# define __LZO_INFOSTR_MM "" -#endif -#if defined(__LZO_INFOSTR_PM) -#elif defined(LZO_INFO_ABI_PM) -# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM -#else -# define __LZO_INFOSTR_PM "" -#endif -#if defined(__LZO_INFOSTR_ENDIAN) -#elif defined(LZO_INFO_ABI_ENDIAN) -# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN -#else -# define __LZO_INFOSTR_ENDIAN "" -#endif -#if defined(__LZO_INFOSTR_OSNAME) -#elif defined(LZO_INFO_OS_CONSOLE) -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE -#elif defined(LZO_INFO_OS_POSIX) -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX -#else -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS -#endif -#if defined(__LZO_INFOSTR_LIBC) -#elif defined(LZO_INFO_LIBC) -# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC -#else -# define __LZO_INFOSTR_LIBC "" -#endif -#if defined(__LZO_INFOSTR_CCVER) -#elif defined(LZO_INFO_CCVER) -# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER -#else -# define __LZO_INFOSTR_CCVER "" -#endif -#define LZO_INFO_STRING \ - LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ - " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER -#if !(LZO_CFG_SKIP_LZO_TYPES) -#if (!(LZO_SIZEOF_SHORT+0 > 0 && LZO_SIZEOF_INT+0 > 0 && LZO_SIZEOF_LONG+0 > 0)) -# error "missing defines for sizes" -#endif -#if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0)) -# error "missing defines for sizes" -#endif -#define LZO_TYPEOF_CHAR 1u -#define LZO_TYPEOF_SHORT 2u -#define LZO_TYPEOF_INT 3u -#define LZO_TYPEOF_LONG 4u -#define LZO_TYPEOF_LONG_LONG 5u -#define LZO_TYPEOF___INT8 17u -#define LZO_TYPEOF___INT16 18u -#define LZO_TYPEOF___INT32 19u -#define LZO_TYPEOF___INT64 20u -#define LZO_TYPEOF___INT128 21u -#define LZO_TYPEOF___INT256 22u -#define LZO_TYPEOF___MODE_QI 33u -#define LZO_TYPEOF___MODE_HI 34u -#define LZO_TYPEOF___MODE_SI 35u -#define LZO_TYPEOF___MODE_DI 36u -#define LZO_TYPEOF___MODE_TI 37u -#define LZO_TYPEOF_CHAR_P 129u -#if !defined(lzo_llong_t) -#if (LZO_SIZEOF_LONG_LONG+0 > 0) -# if !(LZO_LANG_ASSEMBLER) - __lzo_gnuc_extension__ typedef long long lzo_llong_t__; - __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; -# endif -# define lzo_llong_t lzo_llong_t__ -# define lzo_ullong_t lzo_ullong_t__ -#endif -#endif -#if !defined(lzo_int16e_t) -#if (LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) && (LZO_SIZEOF_SHORT != 2) -# undef LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T -#endif -#if (LZO_SIZEOF_LONG == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) -# define lzo_int16e_t long -# define lzo_uint16e_t unsigned long -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_INT == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) -# define lzo_int16e_t int -# define lzo_uint16e_t unsigned int -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == 2) -# define lzo_int16e_t short int -# define lzo_uint16e_t unsigned short int -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) -# if !(LZO_LANG_ASSEMBLER) - typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__))); - typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__))); -# endif -# define lzo_int16e_t lzo_int16e_hi_t__ -# define lzo_uint16e_t lzo_uint16e_hi_t__ -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI -#elif (LZO_SIZEOF___INT16 == 2) -# define lzo_int16e_t __int16 -# define lzo_uint16e_t unsigned __int16 -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16 -#else -#endif -#endif -#if defined(lzo_int16e_t) -# define LZO_SIZEOF_LZO_INT16E_T 2 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == 2) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T) -#endif -#if !defined(lzo_int32e_t) -#if (LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T == LZO_TYPEOF_INT) && (LZO_SIZEOF_INT != 4) -# undef LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T -#endif -#if (LZO_SIZEOF_LONG == 4) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T == LZO_TYPEOF_INT) -# define lzo_int32e_t long int -# define lzo_uint32e_t unsigned long int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_INT == 4) -# define lzo_int32e_t int -# define lzo_uint32e_t unsigned int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == 4) -# define lzo_int32e_t short int -# define lzo_uint32e_t unsigned short int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT -#elif (LZO_SIZEOF_LONG_LONG == 4) -# define lzo_int32e_t lzo_llong_t -# define lzo_uint32e_t lzo_ullong_t -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) -# if !(LZO_LANG_ASSEMBLER) - typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); - typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); -# endif -# define lzo_int32e_t lzo_int32e_si_t__ -# define lzo_uint32e_t lzo_uint32e_si_t__ -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) -# if !(LZO_LANG_ASSEMBLER) - typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); - typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); -# endif -# define lzo_int32e_t lzo_int32e_si_t__ -# define lzo_uint32e_t lzo_uint32e_si_t__ -# define LZO_INT32_C(c) (c##LL) -# define LZO_UINT32_C(c) (c##ULL) -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI -#elif (LZO_SIZEOF___INT32 == 4) -# define lzo_int32e_t __int32 -# define lzo_uint32e_t unsigned __int32 -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32 -#else -#endif -#endif -#if defined(lzo_int32e_t) -# define LZO_SIZEOF_LZO_INT32E_T 4 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == LZO_SIZEOF_LZO_INT32E_T) -#endif -#if !defined(lzo_int64e_t) -#if (LZO_SIZEOF___INT64 == 8) -# if (LZO_CC_BORLANDC) && !defined(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T) -# define LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T LZO_TYPEOF___INT64 -# endif -#endif -#if (LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && (LZO_SIZEOF_LONG_LONG != 8) -# undef LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T -#endif -#if (LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) && (LZO_SIZEOF___INT64 != 8) -# undef LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T -#endif -#if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_int64e_t int -# define lzo_uint64e_t unsigned int -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) -# define lzo_int64e_t long int -# define lzo_uint64e_t unsigned long int -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) -# define lzo_int64e_t lzo_llong_t -# define lzo_uint64e_t lzo_ullong_t -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG -# if (LZO_CC_BORLANDC) -# define LZO_INT64_C(c) ((c) + 0ll) -# define LZO_UINT64_C(c) ((c) + 0ull) -# elif 0 -# define LZO_INT64_C(c) (__lzo_gnuc_extension__ (c##LL)) -# define LZO_UINT64_C(c) (__lzo_gnuc_extension__ (c##ULL)) -# else -# define LZO_INT64_C(c) (c##LL) -# define LZO_UINT64_C(c) (c##ULL) -# endif -#elif (LZO_SIZEOF___INT64 == 8) -# define lzo_int64e_t __int64 -# define lzo_uint64e_t unsigned __int64 -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64 -# if (LZO_CC_BORLANDC) -# define LZO_INT64_C(c) ((c) + 0i64) -# define LZO_UINT64_C(c) ((c) + 0ui64) -# else -# define LZO_INT64_C(c) (c##i64) -# define LZO_UINT64_C(c) (c##ui64) -# endif -#else -#endif -#endif -#if defined(lzo_int64e_t) -# define LZO_SIZEOF_LZO_INT64E_T 8 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) -#endif -#if !defined(lzo_int32l_t) -#if defined(lzo_int32e_t) -# define lzo_int32l_t lzo_int32e_t -# define lzo_uint32l_t lzo_uint32e_t -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T -# define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T -#elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_int32l_t int -# define lzo_uint32l_t unsigned int -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT -#elif (LZO_SIZEOF_LONG >= 4) -# define lzo_int32l_t long int -# define lzo_uint32l_t unsigned long int -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG -#else -# error "lzo_int32l_t" -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) >= 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) == LZO_SIZEOF_LZO_INT32L_T) -#endif -#if !defined(lzo_int64l_t) -#if defined(lzo_int64e_t) -# define lzo_int64l_t lzo_int64e_t -# define lzo_uint64l_t lzo_uint64e_t -# define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T -# define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T -#else -#endif -#endif -#if defined(lzo_int64l_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) >= 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) == LZO_SIZEOF_LZO_INT64L_T) -#endif -#if !defined(lzo_int32f_t) -#if (LZO_SIZEOF_SIZE_T >= 8) -# define lzo_int32f_t lzo_int64l_t -# define lzo_uint32f_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T -#else -# define lzo_int32f_t lzo_int32l_t -# define lzo_uint32f_t lzo_uint32l_t -# define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T -# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) >= 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) == LZO_SIZEOF_LZO_INT32F_T) -#endif -#if !defined(lzo_int64f_t) -#if defined(lzo_int64l_t) -# define lzo_int64f_t lzo_int64l_t -# define lzo_uint64f_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T -#else -#endif -#endif -#if defined(lzo_int64f_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) >= 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) == LZO_SIZEOF_LZO_INT64F_T) -#endif -#if !defined(lzo_intptr_t) -#if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16)) -# define __LZO_INTPTR_T_IS_POINTER 1 -# if !(LZO_LANG_ASSEMBLER) - typedef char * lzo_intptr_t; - typedef char * lzo_uintptr_t; -# endif -# define lzo_intptr_t lzo_intptr_t -# define lzo_uintptr_t lzo_uintptr_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P -#elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4)) -# if !(LZO_LANG_ASSEMBLER) - typedef __w64 int lzo_intptr_t; - typedef __w64 unsigned int lzo_uintptr_t; -# endif -# define lzo_intptr_t lzo_intptr_t -# define lzo_uintptr_t lzo_uintptr_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P) -# define lzo_intptr_t short -# define lzo_uintptr_t unsigned short -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT -#elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_intptr_t int -# define lzo_uintptr_t unsigned int -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P) -# define lzo_intptr_t long -# define lzo_uintptr_t unsigned long -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P) -# define lzo_intptr_t lzo_int64l_t -# define lzo_uintptr_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T -#else -# error "lzo_intptr_t" -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) >= sizeof(void *)) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) == sizeof(lzo_uintptr_t)) -#endif -#if !defined(lzo_word_t) -#if defined(LZO_WORDSIZE) && (LZO_WORDSIZE+0 > 0) -#if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER) -# define lzo_word_t lzo_uintptr_t -# define lzo_sword_t lzo_intptr_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T -#elif (LZO_WORDSIZE == LZO_SIZEOF_LONG) -# define lzo_word_t unsigned long -# define lzo_sword_t long -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG -#elif (LZO_WORDSIZE == LZO_SIZEOF_INT) -# define lzo_word_t unsigned int -# define lzo_sword_t int -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT -#elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT) -# define lzo_word_t unsigned short -# define lzo_sword_t short -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT -#elif (LZO_WORDSIZE == 1) -# define lzo_word_t unsigned char -# define lzo_sword_t signed char -# define LZO_SIZEOF_LZO_WORD_T 1 -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR -#elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T) -# define lzo_word_t lzo_uint64l_t -# define lzo_sword_t lzo_int64l_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T -#elif (LZO_ARCH_SPU) && (LZO_CC_GNUC) -#if 0 -# if !(LZO_LANG_ASSEMBLER) - typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__))); - typedef int lzo_sword_t __attribute__((__mode__(__V16QI__))); -# endif -# define lzo_word_t lzo_word_t -# define lzo_sword_t lzo_sword_t -# define LZO_SIZEOF_LZO_WORD_T 16 -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI -#endif -#else -# error "lzo_word_t" -#endif -#endif -#endif -#if 1 && defined(lzo_word_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_word_t) == LZO_WORDSIZE) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_sword_t) == LZO_WORDSIZE) -#endif -#if 1 -#define lzo_int8_t signed char -#define lzo_uint8_t unsigned char -#define LZO_SIZEOF_LZO_INT8_T 1 -#define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) -#endif -#if defined(lzo_int16e_t) -#define lzo_int16_t lzo_int16e_t -#define lzo_uint16_t lzo_uint16e_t -#define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T -#define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) -#endif -#if defined(lzo_int32e_t) -#define lzo_int32_t lzo_int32e_t -#define lzo_uint32_t lzo_uint32e_t -#define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T -#define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) -#endif -#if defined(lzo_int64e_t) -#define lzo_int64_t lzo_int64e_t -#define lzo_uint64_t lzo_uint64e_t -#define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T -#define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) -#endif -#if 1 -#define lzo_int_least32_t lzo_int32l_t -#define lzo_uint_least32_t lzo_uint32l_t -#define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T -#define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t)) -#endif -#if defined(lzo_int64l_t) -#define lzo_int_least64_t lzo_int64l_t -#define lzo_uint_least64_t lzo_uint64l_t -#define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T -#define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t)) -#endif -#if 1 -#define lzo_int_fast32_t lzo_int32f_t -#define lzo_uint_fast32_t lzo_uint32f_t -#define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T -#define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t)) -#endif -#if defined(lzo_int64f_t) -#define lzo_int_fast64_t lzo_int64f_t -#define lzo_uint_fast64_t lzo_uint64f_t -#define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T -#define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t)) -#endif -#if !defined(LZO_INT16_C) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 2) -# define LZO_INT16_C(c) ((c) + 0) -# define LZO_UINT16_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 2) -# define LZO_INT16_C(c) ((c) + 0L) -# define LZO_UINT16_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 2) -# define LZO_INT16_C(c) (c) -# define LZO_UINT16_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 2) -# define LZO_INT16_C(c) (c##L) -# define LZO_UINT16_C(c) (c##UL) -# else -# error "LZO_INT16_C" -# endif -#endif -#if !defined(LZO_INT32_C) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 4) -# define LZO_INT32_C(c) ((c) + 0) -# define LZO_UINT32_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 4) -# define LZO_INT32_C(c) ((c) + 0L) -# define LZO_UINT32_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 4) -# define LZO_INT32_C(c) (c) -# define LZO_UINT32_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 4) -# define LZO_INT32_C(c) (c##L) -# define LZO_UINT32_C(c) (c##UL) -# elif (LZO_SIZEOF_LONG_LONG >= 4) -# define LZO_INT32_C(c) (c##LL) -# define LZO_UINT32_C(c) (c##ULL) -# else -# error "LZO_INT32_C" -# endif -#endif -#if !defined(LZO_INT64_C) && defined(lzo_int64l_t) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 8) -# define LZO_INT64_C(c) ((c) + 0) -# define LZO_UINT64_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 8) -# define LZO_INT64_C(c) ((c) + 0L) -# define LZO_UINT64_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 8) -# define LZO_INT64_C(c) (c) -# define LZO_UINT64_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 8) -# define LZO_INT64_C(c) (c##L) -# define LZO_UINT64_C(c) (c##UL) -# else -# error "LZO_INT64_C" -# endif -#endif -#endif - -#endif /* already included */ - -/* vim:set ts=4 sw=4 et: */ diff --git a/tools/z64compress/src/enc/stretchy_buffer.h b/tools/z64compress/src/enc/stretchy_buffer.h deleted file mode 100644 index cbd48a3003..0000000000 --- a/tools/z64compress/src/enc/stretchy_buffer.h +++ /dev/null @@ -1,262 +0,0 @@ -// stretchy_buffer.h - v1.03 - public domain - nothings.org/stb -// a vector<>-like dynamic array for C -// -// version history: -// 1.03 - compile as C++ maybe -// 1.02 - tweaks to syntax for no good reason -// 1.01 - added a "common uses" documentation section -// 1.0 - fixed bug in the version I posted prematurely -// 0.9 - rewrite to try to avoid strict-aliasing optimization -// issues, but won't compile as C++ -// -// Will probably not work correctly with strict-aliasing optimizations. -// -// The idea: -// -// This implements an approximation to C++ vector<> for C, in that it -// provides a generic definition for dynamic arrays which you can -// still access in a typesafe way using arr[i] or *(arr+i). However, -// it is simply a convenience wrapper around the common idiom of -// of keeping a set of variables (in a struct or globals) which store -// - pointer to array -// - the length of the "in-use" part of the array -// - the current size of the allocated array -// -// I find it to be the single most useful non-built-in-structure when -// programming in C (hash tables a close second), but to be clear -// it lacks many of the capabilities of C++ vector<>: there is no -// range checking, the object address isn't stable (see next section -// for details), the set of methods available is small (although -// the file stb.h has another implementation of stretchy buffers -// called 'stb_arr' which provides more methods, e.g. for insertion -// and deletion). -// -// How to use: -// -// Unlike other stb header file libraries, there is no need to -// define an _IMPLEMENTATION symbol. Every #include creates as -// much implementation is needed. -// -// stretchy_buffer.h does not define any types, so you do not -// need to #include it to before defining data types that are -// stretchy buffers, only in files that *manipulate* stretchy -// buffers. -// -// If you want a stretchy buffer aka dynamic array containing -// objects of TYPE, declare such an array as: -// -// TYPE *myarray = NULL; -// -// (There is no typesafe way to distinguish between stretchy -// buffers and regular arrays/pointers; this is necessary to -// make ordinary array indexing work on these objects.) -// -// Unlike C++ vector<>, the stretchy_buffer has the same -// semantics as an object that you manually malloc and realloc. -// The pointer may relocate every time you add a new object -// to it, so you: -// -// 1. can't take long-term pointers to elements of the array -// 2. have to return the pointer from functions which might expand it -// (either as a return value or by storing it to a ptr-to-ptr) -// -// Now you can do the following things with this array: -// -// sb_free(TYPE *a) free the array -// sb_count(TYPE *a) the number of elements in the array -// sb_push(TYPE *a, TYPE v) adds v on the end of the array, a la push_back -// sb_add(TYPE *a, int n) adds n uninitialized elements at end of array & returns pointer to first added -// sb_last(TYPE *a) returns an lvalue of the last item in the array -// a[n] access the nth (counting from 0) element of the array -// -// #define STRETCHY_BUFFER_NO_SHORT_NAMES to only export -// names of the form 'stb_sb_' if you have a name that would -// otherwise collide. -// -// Note that these are all macros and many of them evaluate -// their arguments more than once, so the arguments should -// be side-effect-free. -// -// Note that 'TYPE *a' in sb_push and sb_add must be lvalues -// so that the library can overwrite the existing pointer if -// the object has to be reallocated. -// -// In an out-of-memory condition, the code will try to -// set up a null-pointer or otherwise-invalid-pointer -// exception to happen later. It's possible optimizing -// compilers could detect this write-to-null statically -// and optimize away some of the code, but it should only -// be along the failure path. Nevertheless, for more security -// in the face of such compilers, #define STRETCHY_BUFFER_OUT_OF_MEMORY -// to a statement such as assert(0) or exit(1) or something -// to force a failure when out-of-memory occurs. -// -// Common use: -// -// The main application for this is when building a list of -// things with an unknown quantity, either due to loading from -// a file or through a process which produces an unpredictable -// number. -// -// My most common idiom is something like: -// -// SomeStruct *arr = NULL; -// while (something) -// { -// SomeStruct new_one; -// new_one.whatever = whatever; -// new_one.whatup = whatup; -// new_one.foobar = barfoo; -// sb_push(arr, new_one); -// } -// -// and various closely-related factorings of that. For example, -// you might have several functions to create/init new SomeStructs, -// and if you use the above idiom, you might prefer to make them -// return structs rather than take non-const-pointers-to-structs, -// so you can do things like: -// -// SomeStruct *arr = NULL; -// while (something) -// { -// if (case_A) { -// sb_push(arr, some_func1()); -// } else if (case_B) { -// sb_push(arr, some_func2()); -// } else { -// sb_push(arr, some_func3()); -// } -// } -// -// Note that the above relies on the fact that sb_push doesn't -// evaluate its second argument more than once. The macros do -// evaluate the *array* argument multiple times, and numeric -// arguments may be evaluated multiple times, but you can rely -// on the second argument of sb_push being evaluated only once. -// -// Of course, you don't have to store bare objects in the array; -// if you need the objects to have stable pointers, store an array -// of pointers instead: -// -// SomeStruct **arr = NULL; -// while (something) -// { -// SomeStruct *new_one = malloc(sizeof(*new_one)); -// new_one->whatever = whatever; -// new_one->whatup = whatup; -// new_one->foobar = barfoo; -// sb_push(arr, new_one); -// } -// -// How it works: -// -// A long-standing tradition in things like malloc implementations -// is to store extra data before the beginning of the block returned -// to the user. The stretchy buffer implementation here uses the -// same trick; the current-count and current-allocation-size are -// stored before the beginning of the array returned to the user. -// (This means you can't directly free() the pointer, because the -// allocated pointer is different from the type-safe pointer provided -// to the user.) -// -// The details are trivial and implementation is straightforward; -// the main trick is in realizing in the first place that it's -// possible to do this in a generic, type-safe way in C. -// -// Contributors: -// -// Timothy Wright (github:ZenToad) -// -// LICENSE -// -// See end of file for license information. - -#ifndef STB_STRETCHY_BUFFER_H_INCLUDED -#define STB_STRETCHY_BUFFER_H_INCLUDED - -#ifndef NO_STRETCHY_BUFFER_SHORT_NAMES -#define sb_free stb_sb_free -#define sb_push stb_sb_push -#define sb_count stb_sb_count -#define sb_add stb_sb_add -#define sb_last stb_sb_last -#endif - -#define stb_sb_free(a) ((a) ? free(stb__sbraw(a)),0 : 0) -#define stb_sb_push(a,v) (stb__sbmaybegrow(a,1), (a)[stb__sbn(a)++] = (v)) -#define stb_sb_count(a) ((a) ? stb__sbn(a) : 0) -#define stb_sb_add(a,n) (stb__sbmaybegrow(a,n), stb__sbn(a)+=(n), &(a)[stb__sbn(a)-(n)]) -#define stb_sb_last(a) ((a)[stb__sbn(a)-1]) - -#define stb__sbraw(a) ((int *) (a) - 2) -#define stb__sbm(a) stb__sbraw(a)[0] -#define stb__sbn(a) stb__sbraw(a)[1] - -#define stb__sbneedgrow(a,n) ((a)==0 || stb__sbn(a)+(n) >= stb__sbm(a)) -#define stb__sbmaybegrow(a,n) (stb__sbneedgrow(a,(n)) ? stb__sbgrow(a,n) : 0) -#define stb__sbgrow(a,n) (*((void **)&(a)) = stb__sbgrowf((a), (n), sizeof(*(a)))) - -#include - -static void * stb__sbgrowf(void *arr, int increment, int itemsize) -{ - int dbl_cur = arr ? 2*stb__sbm(arr) : 0; - int min_needed = stb_sb_count(arr) + increment; - int m = dbl_cur > min_needed ? dbl_cur : min_needed; - int *p = (int *) realloc(arr ? stb__sbraw(arr) : 0, itemsize * m + sizeof(int)*2); - if (p) { - if (!arr) - p[1] = 0; - p[0] = m; - return p+2; - } else { - #ifdef STRETCHY_BUFFER_OUT_OF_MEMORY - STRETCHY_BUFFER_OUT_OF_MEMORY ; - #endif - return (void *) (2*sizeof(int)); // try to force a NULL pointer exception later - } -} -#endif // STB_STRETCHY_BUFFER_H_INCLUDED - - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/tools/z64compress/src/enc/ucl.c b/tools/z64compress/src/enc/ucl.c deleted file mode 100644 index 59b6936add..0000000000 --- a/tools/z64compress/src/enc/ucl.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include -#include "ucl/ucl.h" - -int -uclenc( - void *_src - , unsigned src_sz - , void *_dst - , unsigned *dst_sz - , void *_ctx -) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - int r; - int level = 10; - ucl_uint result_sz; - - int hlen = 8; /* header length; required due to MM's archives */ - memset(dst, 0, hlen); - memcpy(dst, "UCL0", 4); - dst[4] = (src_sz >> 24); - dst[5] = (src_sz >> 16); - dst[6] = (src_sz >> 8); - dst[7] = (src_sz >> 0); - - r = ucl_nrv2b_99_compress( - src /* in */ - , src_sz /* in size */ - , dst + hlen /* out */ - , &result_sz /* out size */ - , NULL /* callback */ - , level /* level */ - , NULL /* conf */ - , NULL /* result */ - ); - - if (r != UCL_E_OK) - { - fprintf(stderr, "[!] fatal compression error %d\n", r); - exit(EXIT_FAILURE); - } - - *dst_sz = result_sz + hlen; - - return 0; -} - diff --git a/tools/z64compress/src/enc/ucl/comp/n2_99.ch b/tools/z64compress/src/enc/ucl/comp/n2_99.ch deleted file mode 100644 index 06c5c64671..0000000000 --- a/tools/z64compress/src/enc/ucl/comp/n2_99.ch +++ /dev/null @@ -1,651 +0,0 @@ -/* n2_99.ch -- implementation of the NRV2[BDE]-99 compression algorithms - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - - -#define HAVE_MEMCMP 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMSET 1 - - -#include "../ucl_conf.h" -#include "../ucl.h" - -#include -#include -#include -#include - - -/*********************************************************************** -// -************************************************************************/ - -#define SWD_USE_MALLOC 1 -#if (ACC_OS_DOS16) -#define SWD_HMASK (s->hmask) -#define HEAD2_VAR -#define IF_HEAD2(s) if (s->use_head2) -#else -#define SWD_HMASK (UCL_UINT32_C(65535)) -#define IF_HEAD2(s) -#endif -#define SWD_N (8*1024*1024ul) /* max. size of ring buffer */ -#define SWD_F 2048 /* upper limit for match length */ -#define SWD_THRESHOLD 1 /* lower limit for match length */ - -#if defined(NRV2B) -# define UCL_COMPRESS_T ucl_nrv2b_t -# define ucl_swd_t ucl_nrv2b_swd_t -# define ucl_nrv_99_compress ucl_nrv2b_99_compress -# define M2_MAX_OFFSET 0xd00 -#elif defined(NRV2D) -# define UCL_COMPRESS_T ucl_nrv2d_t -# define ucl_swd_t ucl_nrv2d_swd_t -# define ucl_nrv_99_compress ucl_nrv2d_99_compress -# define M2_MAX_OFFSET 0x500 -#elif defined(NRV2E) -# define UCL_COMPRESS_T ucl_nrv2e_t -# define ucl_swd_t ucl_nrv2e_swd_t -# define ucl_nrv_99_compress ucl_nrv2e_99_compress -# define M2_MAX_OFFSET 0x500 -#else -# error -#endif -#define ucl_swd_p ucl_swd_t * __UCL_MMODEL - -#include "ucl_mchw.ch" - - -/*********************************************************************** -// start-step-stop prefix coding -************************************************************************/ - -static void code_prefix_ss11(UCL_COMPRESS_T *c, ucl_uint32 i) -{ - if (i >= 2) - { - ucl_uint32 t = 4; - i += 2; - do { - t <<= 1; - } while (i >= t); - t >>= 1; - do { - t >>= 1; - bbPutBit(c, (i & t) ? 1 : 0); - bbPutBit(c, 0); - } while (t > 2); - } - bbPutBit(c, (unsigned)i & 1); - bbPutBit(c, 1); -} - - -#if defined(NRV2D) || defined(NRV2E) -static void code_prefix_ss12(UCL_COMPRESS_T *c, ucl_uint32 i) -{ - if (i >= 2) - { - ucl_uint32 t = 2; - do { - i -= t; - t <<= 2; - } while (i >= t); - do { - t >>= 1; - bbPutBit(c, (i & t) ? 1 : 0); - bbPutBit(c, 0); - t >>= 1; - bbPutBit(c, (i & t) ? 1 : 0); - } while (t > 2); - } - bbPutBit(c, (unsigned)i & 1); - bbPutBit(c, 1); -} -#endif - - -static void -code_match(UCL_COMPRESS_T *c, ucl_uint m_len, const ucl_uint m_off) -{ - unsigned m_low = 0; - - while (m_len > c->conf.max_match) - { - code_match(c, c->conf.max_match - 3, m_off); - m_len -= c->conf.max_match - 3; - } - - c->match_bytes += m_len; - if (m_len > c->result[3]) - c->result[3] = m_len; - if (m_off > c->result[1]) - c->result[1] = m_off; - - bbPutBit(c, 0); - -#if defined(NRV2B) - if (m_off == c->last_m_off) - { - bbPutBit(c, 0); - bbPutBit(c, 1); - } - else - { - code_prefix_ss11(c, 1 + ((m_off - 1) >> 8)); - bbPutByte(c, (unsigned)m_off - 1); - } - m_len = m_len - 1 - (m_off > M2_MAX_OFFSET); - if (m_len >= 4) - { - bbPutBit(c,0); - bbPutBit(c,0); - code_prefix_ss11(c, m_len - 4); - } - else - { - bbPutBit(c, m_len > 1); - bbPutBit(c, (unsigned)m_len & 1); - } -#elif defined(NRV2D) - m_len = m_len - 1 - (m_off > M2_MAX_OFFSET); - assert(m_len > 0); - m_low = (m_len >= 4) ? 0u : (unsigned) m_len; - if (m_off == c->last_m_off) - { - bbPutBit(c, 0); - bbPutBit(c, 1); - bbPutBit(c, m_low > 1); - bbPutBit(c, m_low & 1); - } - else - { - code_prefix_ss12(c, 1 + ((m_off - 1) >> 7)); - bbPutByte(c, ((((unsigned)m_off - 1) & 0x7f) << 1) | ((m_low > 1) ? 0 : 1)); - bbPutBit(c, m_low & 1); - } - if (m_len >= 4) - code_prefix_ss11(c, m_len - 4); -#elif defined(NRV2E) - m_len = m_len - 1 - (m_off > M2_MAX_OFFSET); - assert(m_len > 0); - m_low = (m_len <= 2); - if (m_off == c->last_m_off) - { - bbPutBit(c, 0); - bbPutBit(c, 1); - bbPutBit(c, m_low); - } - else - { - code_prefix_ss12(c, 1 + ((m_off - 1) >> 7)); - bbPutByte(c, ((((unsigned)m_off - 1) & 0x7f) << 1) | (m_low ^ 1)); - } - if (m_low) - bbPutBit(c, (unsigned)m_len - 1); - else if (m_len <= 4) - { - bbPutBit(c, 1); - bbPutBit(c, (unsigned)m_len - 3); - } - else - { - bbPutBit(c, 0); - code_prefix_ss11(c, m_len - 5); - } -#else -# error -#endif - - c->last_m_off = m_off; - (void)m_low; -} - - -static void -code_run(UCL_COMPRESS_T *c, const ucl_bytep ii, ucl_uint lit) -{ - if (lit == 0) - return; - c->lit_bytes += lit; - if (lit > c->result[5]) - c->result[5] = lit; - do { - bbPutBit(c, 1); - bbPutByte(c, *ii++); - } while (--lit > 0); -} - - -/*********************************************************************** -// -************************************************************************/ - -static int -len_of_coded_match(UCL_COMPRESS_T *c, ucl_uint m_len, ucl_uint m_off) -{ - int b; - if (m_len < 2 || (m_len == 2 && (m_off > M2_MAX_OFFSET)) - || m_off > c->conf.max_offset) - return -1; - assert(m_off > 0); - - m_len = m_len - 2 - (m_off > M2_MAX_OFFSET); - - if (m_off == c->last_m_off) - b = 1 + 2; - else - { -#if defined(NRV2B) - b = 1 + 10; - m_off = (m_off - 1) >> 8; - while (m_off > 0) - { - b += 2; - m_off >>= 1; - } -#elif defined(NRV2D) || defined(NRV2E) - b = 1 + 9; - m_off = (m_off - 1) >> 7; - while (m_off > 0) - { - b += 3; - m_off >>= 2; - } -#else -# error -#endif - } - -#if defined(NRV2B) || defined(NRV2D) - b += 2; - if (m_len < 3) - return b; - m_len -= 3; -#elif defined(NRV2E) - b += 2; - if (m_len < 2) - return b; - if (m_len < 4) - return b + 1; - m_len -= 4; -#else -# error -#endif - do { - b += 2; - m_len >>= 1; - } while (m_len > 0); - - return b; -} - - -/*********************************************************************** -// -************************************************************************/ - -#if !defined(NDEBUG) -static -void assert_match( const ucl_swd_p swd, ucl_uint m_len, ucl_uint m_off ) -{ - const UCL_COMPRESS_T *c = swd->c; - ucl_uint d_off; - - assert(m_len >= 2); - if (m_off <= (ucl_uint) (c->bp - c->in)) - { - assert(c->bp - m_off + m_len < c->ip); - assert(ucl_memcmp(c->bp, c->bp - m_off, m_len) == 0); - } - else - { - assert(swd->dict != NULL); - d_off = m_off - (ucl_uint) (c->bp - c->in); - assert(d_off <= swd->dict_len); - if (m_len > d_off) - { - assert(ucl_memcmp(c->bp, swd->dict_end - d_off, d_off) == 0); - assert(c->in + m_len - d_off < c->ip); - assert(ucl_memcmp(c->bp + d_off, c->in, m_len - d_off) == 0); - } - else - { - assert(ucl_memcmp(c->bp, swd->dict_end - d_off, m_len) == 0); - } - } -} -#else -# define assert_match(a,b,c) ((void)0) -#endif - - -#if defined(SWD_BEST_OFF) - -static void -better_match ( const ucl_swd_p swd, ucl_uint *m_len, ucl_uint *m_off ) -{ -} - -#endif - - -/*********************************************************************** -// -************************************************************************/ - -UCL_PUBLIC(int) -ucl_nrv_99_compress ( const ucl_bytep in, ucl_uint in_len, - ucl_bytep out, ucl_uintp out_len, - ucl_progress_callback_p cb, - int level, - const struct ucl_compress_config_p conf, - ucl_uintp result) -{ - const ucl_bytep ii; - ucl_uint lit; - ucl_uint m_len, m_off; - UCL_COMPRESS_T c_buffer; - UCL_COMPRESS_T * const c = &c_buffer; -#undef s -#if defined(SWD_USE_MALLOC) - ucl_swd_t the_swd = {0}; -# define s (&the_swd) -#else -// static ucl_swd_p s = 0; -#endif - ucl_uint result_buffer[16]; - int r; - - struct swd_config_t - { - unsigned try_lazy; - ucl_uint good_length; - ucl_uint max_lazy; - ucl_uint nice_length; - ucl_uint max_chain; - ucl_uint32 flags; - ucl_uint32 max_offset; - }; - const struct swd_config_t *sc; - static const struct swd_config_t swd_config[10] = { -#define F SWD_F - /* faster compression */ - { 0, 0, 0, 8, 4, 0, 48*1024L }, - { 0, 0, 0, 16, 8, 0, 48*1024L }, - { 0, 0, 0, 32, 16, 0, 48*1024L }, - { 1, 4, 4, 16, 16, 0, 48*1024L }, - { 1, 8, 16, 32, 32, 0, 48*1024L }, - { 1, 8, 16, 128, 128, 0, 48*1024L }, - { 2, 8, 32, 128, 256, 0, 128*1024L }, - { 2, 32, 128, F, 2048, 1, 128*1024L }, - { 2, 32, 128, F, 2048, 1, 256*1024L }, - { 2, F, F, F, 4096, 1, SWD_N } - /* max. compression */ -#undef F - }; - - if (level < 1 || level > 10) - return UCL_E_INVALID_ARGUMENT; - sc = &swd_config[level - 1]; - - memset(c, 0, sizeof(*c)); - memset(&c->conf, 0xff, sizeof(c->conf)); - c->ip = c->in = in; - c->in_end = in + in_len; - c->out = out; - if (cb && cb->callback) - c->cb = cb; - cb = NULL; - c->result = result ? result : (ucl_uintp) result_buffer; - result = NULL; - ucl_memset(c->result, 0, 16*sizeof(*c->result)); - c->result[0] = c->result[2] = c->result[4] = UCL_UINT_MAX; - if (conf) - ucl_memcpy(&c->conf, conf, sizeof(c->conf)); - conf = NULL; - r = bbConfig(c, 0, 8); - if (r == 0) - r = bbConfig(c, c->conf.bb_endian, c->conf.bb_size); - if (r != 0) - return UCL_E_INVALID_ARGUMENT; - c->bb_op = out; - - ii = c->ip; /* point to start of literal run */ - lit = 0; - -#if !defined(s) - if (!s) - s = (ucl_swd_p) ucl_malloc(ucl_sizeof(*s)); - if (!s) - return UCL_E_OUT_OF_MEMORY; - memset(s, 0, ucl_sizeof(*s)); -#endif - s->f = UCL_MIN((ucl_uint)SWD_F, c->conf.max_match); - s->n = UCL_MIN((ucl_uint)SWD_N, sc->max_offset); - s->hmask = UCL_UINT32_C(65535); -#ifdef HEAD2_VAR - s->use_head2 = 1; -#if defined(ACC_MM_AHSHIFT) - if (ACC_MM_AHSHIFT != 3) { - s->hmask = 16 * 1024 - 1; - s->use_head2 = 0; - } -#endif -#endif - if (c->conf.max_offset != UCL_UINT_MAX) - s->n = UCL_MIN(SWD_N, c->conf.max_offset); - if (in_len < s->n) - s->n = UCL_MAX(in_len, 256); - if (s->f < 8 || s->n < 256) - return UCL_E_INVALID_ARGUMENT; - r = init_match(c,s,NULL,0,sc->flags); - if (r == UCL_E_OK && (SWD_HSIZE - 1 != s->hmask)) - r = UCL_E_ERROR; - if (r != UCL_E_OK) - { -#if !defined(s) - ucl_free(s); -#endif - return r; - } - if (sc->max_chain > 0) - s->max_chain = sc->max_chain; - if (sc->nice_length > 0) - s->nice_length = sc->nice_length; - if (c->conf.max_match < s->nice_length) - s->nice_length = c->conf.max_match; - - if (c->cb) - (*c->cb->callback)(0,0,-1,c->cb->user); - - c->last_m_off = 1; - r = find_match(c,s,0,0); - if (r != UCL_E_OK) - return r; - while (c->look > 0) - { - ucl_uint ahead; - ucl_uint max_ahead; - int l1, l2; - - c->codesize = (ucl_uint) (c->bb_op - out); - - m_len = c->m_len; - m_off = c->m_off; - - assert(c->bp == c->ip - c->look); - assert(c->bp >= in); - if (lit == 0) - ii = c->bp; - assert(ii + lit == c->bp); - assert(s->b_char == *(c->bp)); - - if (m_len < 2 || (m_len == 2 && (m_off > M2_MAX_OFFSET)) - || m_off > c->conf.max_offset) - { - /* a literal */ - lit++; - s->max_chain = sc->max_chain; - r = find_match(c,s,1,0); - assert(r == 0); - continue; - } - - /* a match */ -#if defined(SWD_BEST_OFF) - if (s->use_best_off) - better_match(s,&m_len,&m_off); -#endif - assert_match(s,m_len,m_off); - - /* shall we try a lazy match ? */ - ahead = 0; - if (sc->try_lazy <= 0 || m_len >= sc->max_lazy || m_off == c->last_m_off) - { - /* no */ - l1 = 0; - max_ahead = 0; - } - else - { - /* yes, try a lazy match */ - l1 = len_of_coded_match(c,m_len,m_off); - assert(l1 > 0); - max_ahead = UCL_MIN((ucl_uint)sc->try_lazy, m_len - 1); - } - - while (ahead < max_ahead && c->look > m_len) - { - if (m_len >= sc->good_length) - s->max_chain = sc->max_chain >> 2; - else - s->max_chain = sc->max_chain; - r = find_match(c,s,1,0); - ahead++; - - assert(r == 0); - assert(c->look > 0); - assert(ii + lit + ahead == c->bp); - - if (c->m_len < 2) - continue; -#if defined(SWD_BEST_OFF) - if (s->use_best_off) - better_match(s,&c->m_len,&c->m_off); -#endif - l2 = len_of_coded_match(c,c->m_len,c->m_off); - if (l2 < 0) - continue; -#if 1 - if (l1 + (int)(ahead + c->m_len - m_len) * 5 > l2 + (int)(ahead) * 9) -#else - if (l1 > l2) -#endif - { - c->lazy++; - assert_match(s,c->m_len,c->m_off); - -#if 0 - if (l3 > 0) - { - /* code previous run */ - code_run(c,ii,lit); - lit = 0; - /* code shortened match */ - code_match(c,ahead,m_off); - } - else -#endif - { - lit += ahead; - assert(ii + lit == c->bp); - } - goto lazy_match_done; - } - } - - assert(ii + lit + ahead == c->bp); - - /* 1 - code run */ - code_run(c,ii,lit); - lit = 0; - - /* 2 - code match */ - code_match(c,m_len,m_off); - s->max_chain = sc->max_chain; - r = find_match(c,s,m_len,1+ahead); - assert(r == 0); - -lazy_match_done: ; - } - - /* store final run */ - code_run(c,ii,lit); - - /* EOF */ - bbPutBit(c, 0); -#if defined(NRV2B) - code_prefix_ss11(c, UCL_UINT32_C(0x1000000)); - bbPutByte(c, 0xff); -#elif defined(NRV2D) || defined(NRV2E) - code_prefix_ss12(c, UCL_UINT32_C(0x1000000)); - bbPutByte(c, 0xff); -#else -# error -#endif - bbFlushBits(c, 0); - - assert(c->textsize == in_len); - c->codesize = (ucl_uint) (c->bb_op - out); - *out_len = (ucl_uint) (c->bb_op - out); - if (c->cb) - (*c->cb->callback)(c->textsize,c->codesize,4,c->cb->user); - -#if 0 - printf("%7ld %7ld -> %7ld %7ld %7ld %ld (max: %d %d %d)\n", - (long) c->textsize, (long) in_len, (long) c->codesize, - c->match_bytes, c->lit_bytes, c->lazy, - c->result[1], c->result[3], c->result[5]); -#endif - assert(c->lit_bytes + c->match_bytes == in_len); - - swd_exit(s); -#if !defined(s) - ucl_free(s); -#endif - return UCL_E_OK; -#undef s -} - - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/comp/n2b_99.c b/tools/z64compress/src/enc/ucl/comp/n2b_99.c deleted file mode 100644 index e3b11cc162..0000000000 --- a/tools/z64compress/src/enc/ucl/comp/n2b_99.c +++ /dev/null @@ -1,38 +0,0 @@ -/* n2b_99.c -- implementation of the NRV2B-99 compression algorithm - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - - -#define NRV2B -#include "n2_99.ch" -#undef NRV2B - - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/comp/ucl_mchw.ch b/tools/z64compress/src/enc/ucl/comp/ucl_mchw.ch deleted file mode 100644 index c462576d80..0000000000 --- a/tools/z64compress/src/enc/ucl/comp/ucl_mchw.ch +++ /dev/null @@ -1,312 +0,0 @@ -/* ucl_mchw.ch -- matching functions using a window - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -/*********************************************************************** -// -************************************************************************/ - -typedef struct -{ - int init; - - ucl_uint look; /* bytes in lookahead buffer */ - - ucl_uint m_len; - ucl_uint m_off; - - ucl_uint last_m_len; - ucl_uint last_m_off; - - const ucl_bytep bp; - const ucl_bytep ip; - const ucl_bytep in; - const ucl_bytep in_end; - ucl_bytep out; - - ucl_uint32 bb_b; - unsigned bb_k; - unsigned bb_c_endian; - unsigned bb_c_s; - unsigned bb_c_s8; - ucl_bytep bb_p; - ucl_bytep bb_op; - - struct ucl_compress_config_t conf; - ucl_uintp result; - - ucl_progress_callback_p cb; - - ucl_uint textsize; /* text size counter */ - ucl_uint codesize; /* code size counter */ - ucl_uint printcount; /* counter for reporting progress every 1K bytes */ - - /* some stats */ - unsigned long lit_bytes; - unsigned long match_bytes; - unsigned long rep_bytes; - unsigned long lazy; -} -UCL_COMPRESS_T; - - - -#if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC)) -/* the cast is needed to work around a code generation bug */ -#define getbyte(c) ((c).ip < (c).in_end ? (int) (unsigned) *((c).ip)++ : (-1)) -#else -#define getbyte(c) ((c).ip < (c).in_end ? *((c).ip)++ : (-1)) -#endif - -#include "ucl_swd.ch" - - - -/*********************************************************************** -// -************************************************************************/ - -static int -init_match ( UCL_COMPRESS_T *c, ucl_swd_t *s, - const ucl_bytep dict, ucl_uint dict_len, - ucl_uint32 flags ) -{ - int r; - - assert(!c->init); - c->init = 1; - - s->c = c; - - c->last_m_len = c->last_m_off = 0; - - c->textsize = c->codesize = c->printcount = 0; - c->lit_bytes = c->match_bytes = c->rep_bytes = 0; - c->lazy = 0; - - r = swd_init(s,dict,dict_len); - if (r != UCL_E_OK) - { - swd_exit(s); - return r; - } - - s->use_best_off = (flags & 1) ? 1 : 0; - return UCL_E_OK; -} - - -/*********************************************************************** -// -************************************************************************/ - -static int -find_match ( UCL_COMPRESS_T *c, ucl_swd_t *s, - ucl_uint this_len, ucl_uint skip ) -{ - assert(c->init); - - if (skip > 0) - { - assert(this_len >= skip); - swd_accept(s, this_len - skip); - c->textsize += this_len - skip + 1; - } - else - { - assert(this_len <= 1); - c->textsize += this_len - skip; - } - - s->m_len = SWD_THRESHOLD; -#ifdef SWD_BEST_OFF - if (s->use_best_off) - memset(s->best_pos,0,sizeof(s->best_pos)); -#endif - swd_findbest(s); - c->m_len = s->m_len; -#if defined(__UCL_CHECKER) - /* s->m_off may be uninitialized if we didn't find a match, - * but then its value will never be used. - */ - c->m_off = (s->m_len == SWD_THRESHOLD) ? 0 : s->m_off; -#else - c->m_off = s->m_off; -#endif - - swd_getbyte(s); - - if (s->b_char < 0) - { - c->look = 0; - c->m_len = 0; - swd_exit(s); - } - else - { - c->look = s->look + 1; - } - c->bp = c->ip - c->look; - -#if 0 - /* brute force match search */ - if (c->m_len > SWD_THRESHOLD && c->m_len + 1 <= c->look) - { - const ucl_bytep ip = c->bp; - const ucl_bytep m = c->bp - c->m_off; - const ucl_bytep in = c->in; - - if (ip - in > s->n) - in = ip - s->n; - for (;;) - { - while (*in != *ip) - in++; - if (in == ip) - break; - if (in != m) - if (memcmp(in,ip,c->m_len+1) == 0) - printf("%p %p %p %5d\n",in,ip,m,c->m_len); - in++; - } - } -#endif - - if (c->cb && c->textsize > c->printcount) - { - (*c->cb->callback)(c->textsize,c->codesize,3,c->cb->user); - c->printcount += 1024; - } - - return UCL_E_OK; -} - - -/*********************************************************************** -// bit buffer -************************************************************************/ - -static int bbConfig(UCL_COMPRESS_T *c, int endian, int bitsize) -{ - if (endian != -1) - { - if (endian != 0) - return UCL_E_ERROR; - c->bb_c_endian = endian; - } - if (bitsize != -1) - { - if (bitsize != 8 && bitsize != 16 && bitsize != 32) - return UCL_E_ERROR; - c->bb_c_s = bitsize; - c->bb_c_s8 = bitsize / 8; - } - c->bb_b = 0; c->bb_k = 0; - c->bb_p = NULL; - c->bb_op = NULL; - return UCL_E_OK; -} - - -static void bbWriteBits(UCL_COMPRESS_T *c) -{ - ucl_bytep p = c->bb_p; - ucl_uint32 b = c->bb_b; - - p[0] = UCL_BYTE(b >> 0); - if (c->bb_c_s >= 16) - { - p[1] = UCL_BYTE(b >> 8); - if (c->bb_c_s == 32) - { - p[2] = UCL_BYTE(b >> 16); - p[3] = UCL_BYTE(b >> 24); - } - } -} - - -static void bbPutBit(UCL_COMPRESS_T *c, unsigned bit) -{ - assert(bit == 0 || bit == 1); - assert(c->bb_k <= c->bb_c_s); - - if (c->bb_k < c->bb_c_s) - { - if (c->bb_k == 0) - { - assert(c->bb_p == NULL); - c->bb_p = c->bb_op; - c->bb_op += c->bb_c_s8; - } - assert(c->bb_p != NULL); - assert(c->bb_p + c->bb_c_s8 <= c->bb_op); - - c->bb_b = (c->bb_b << 1) + bit; - c->bb_k++; - } - else - { - assert(c->bb_p != NULL); - assert(c->bb_p + c->bb_c_s8 <= c->bb_op); - - bbWriteBits(c); - c->bb_p = c->bb_op; - c->bb_op += c->bb_c_s8; - c->bb_b = bit; - c->bb_k = 1; - } -} - - -static void bbPutByte(UCL_COMPRESS_T *c, unsigned b) -{ - /**printf("putbyte %p %p %x (%d)\n", op, bb_p, x, bb_k);*/ - assert(c->bb_p == NULL || c->bb_p + c->bb_c_s8 <= c->bb_op); - *c->bb_op++ = UCL_BYTE(b); -} - - -static void bbFlushBits(UCL_COMPRESS_T *c, unsigned filler_bit) -{ - if (c->bb_k > 0) - { - assert(c->bb_k <= c->bb_c_s); - while (c->bb_k != c->bb_c_s) - bbPutBit(c, filler_bit); - bbWriteBits(c); - c->bb_k = 0; - } - c->bb_p = NULL; -} - - - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/comp/ucl_swd.ch b/tools/z64compress/src/enc/ucl/comp/ucl_swd.ch deleted file mode 100644 index 8b829415b0..0000000000 --- a/tools/z64compress/src/enc/ucl/comp/ucl_swd.ch +++ /dev/null @@ -1,686 +0,0 @@ -/* ucl_swd.c -- sliding window dictionary - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -#if (UCL_UINT_MAX < UCL_0xffffffffL) -# error "UCL_UINT_MAX" -#endif - - -/*********************************************************************** -// -************************************************************************/ - -/* unsigned type for dictionary access - don't waste memory here */ -#if (0UL + SWD_N + SWD_F + SWD_F < 0UL + USHRT_MAX) - typedef unsigned short swd_uint; -# define SWD_UINT_MAX USHRT_MAX -#else - typedef ucl_uint swd_uint; -# define SWD_UINT_MAX UCL_UINT_MAX -#endif -#define swd_uintp swd_uint __UCL_MMODEL * -#define SWD_UINT(x) ((swd_uint)(x)) - - -#ifndef SWD_MAX_CHAIN -# define SWD_MAX_CHAIN 2048 -#endif -#define SWD_HSIZE (SWD_HMASK + 1) - -#if !defined(HEAD3) -#if 1 -# define HEAD3(b,p) \ - (((0x9f5f*(((((ucl_uint32)b[p]<<5)^b[p+1])<<5)^b[p+2]))>>5) & SWD_HMASK) -#else -# define HEAD3(b,p) \ - (((0x9f5f*(((((ucl_uint32)b[p+2]<<5)^b[p+1])<<5)^b[p]))>>5) & SWD_HMASK) -#endif -#endif - -#if !defined(HEAD2) -#if (SWD_THRESHOLD == 1) -# if 1 && defined(UA_GET2) -# define HEAD2(b,p) UA_GET2(&(b[p])) -# else -# define HEAD2(b,p) (b[p] ^ ((unsigned)b[p+1]<<8)) -# endif -# define NIL2 SWD_UINT_MAX -#endif -#endif - - -#if defined(__UCL_CHECKER) - /* malloc arrays of the exact size to detect any overrun */ -# ifndef SWD_USE_MALLOC -# define SWD_USE_MALLOC -# endif -#endif - - -typedef struct -{ -/* public - "built-in" */ - ucl_uint n; - ucl_uint f; - ucl_uint threshold; - ucl_uint hmask; - -/* public - configuration */ - ucl_uint max_chain; - ucl_uint nice_length; - ucl_bool use_best_off; - ucl_uint lazy_insert; - -/* public - output */ - ucl_uint m_len; - ucl_uint m_off; - ucl_uint look; - int b_char; -#if defined(SWD_BEST_OFF) - ucl_uint best_off[ SWD_BEST_OFF ]; -#endif - -/* semi public */ - UCL_COMPRESS_T *c; - ucl_uint m_pos; -#if defined(SWD_BEST_OFF) - ucl_uint best_pos[ SWD_BEST_OFF ]; -#endif - -/* private */ - const ucl_bytep dict; - const ucl_bytep dict_end; - ucl_uint dict_len; - -/* private */ - ucl_uint ip; /* input pointer (lookahead) */ - ucl_uint bp; /* buffer pointer */ - ucl_uint rp; /* remove pointer */ - ucl_uint b_size; - - ucl_bytep b_wrap; - - ucl_uint node_count; - ucl_uint first_rp; - -#if defined(SWD_USE_MALLOC) - ucl_bytep b; - swd_uintp head3; - swd_uintp succ3; - swd_uintp best3; - swd_uintp llen3; -#ifdef HEAD2 - swd_uintp head2; -#ifdef HEAD2_VAR - int use_head2; -#endif -#endif -#else - unsigned char b [ SWD_N + SWD_F + SWD_F ]; - swd_uint head3 [ SWD_HSIZE ]; - swd_uint succ3 [ SWD_N + SWD_F ]; - swd_uint best3 [ SWD_N + SWD_F ]; - swd_uint llen3 [ SWD_HSIZE ]; -#ifdef HEAD2 - swd_uint head2 [ UCL_UINT32_C(65536) ]; -#endif -#endif -} -ucl_swd_t; - - -/* Access macro for head3. - * head3[key] may be uninitialized if the list is emtpy, - * but then its value will never be used. - */ -#if defined(__UCL_CHECKER) -# define s_get_head3(s,key) \ - ((s->llen3[key] == 0) ? SWD_UINT_MAX : s->head3[key]) -#else -# define s_get_head3(s,key) s->head3[key] -#endif - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_initdict(ucl_swd_t *s, const ucl_bytep dict, ucl_uint dict_len) -{ - s->dict = s->dict_end = NULL; - s->dict_len = 0; - - if (!dict || dict_len <= 0) - return; - if (dict_len > s->n) - { - dict += dict_len - s->n; - dict_len = s->n; - } - - s->dict = dict; - s->dict_len = dict_len; - s->dict_end = dict + dict_len; - ucl_memcpy(s->b,dict,dict_len); - s->ip = dict_len; -} - - -static -void swd_insertdict(ucl_swd_t *s, ucl_uint node, ucl_uint len) -{ - ucl_uint key; - - s->node_count = s->n - len; - s->first_rp = node; - - while (len-- > 0) - { - key = HEAD3(s->b,node); - s->succ3[node] = s_get_head3(s,key); - s->head3[key] = SWD_UINT(node); - s->best3[node] = SWD_UINT(s->f + 1); - s->llen3[key]++; - assert(s->llen3[key] <= s->n); - -#ifdef HEAD2 - IF_HEAD2(s) { - key = HEAD2(s->b,node); - s->head2[key] = SWD_UINT(node); - } -#endif - - node++; - } -} - - -/*********************************************************************** -// -************************************************************************/ - -static -int swd_init(ucl_swd_t *s, const ucl_bytep dict, ucl_uint dict_len) -{ -#if defined(SWD_USE_MALLOC) - s->b = NULL; - s->head3 = NULL; - s->succ3 = NULL; - s->best3 = NULL; - s->llen3 = NULL; -#ifdef HEAD2 - s->head2 = NULL; -#endif -#endif - - if (s->n == 0) - s->n = SWD_N; - if (s->f == 0) - s->f = SWD_F; - s->threshold = SWD_THRESHOLD; - if (s->n > SWD_N || s->f > SWD_F) - return UCL_E_INVALID_ARGUMENT; - -#if defined(SWD_USE_MALLOC) - s->b = (ucl_bytep) ucl_alloc(1, s->n + s->f + s->f); - s->head3 = (swd_uintp) ucl_alloc(SWD_HSIZE, sizeof(*s->head3)); - s->succ3 = (swd_uintp) ucl_alloc(s->n + s->f, sizeof(*s->succ3)); - s->best3 = (swd_uintp) ucl_alloc(s->n + s->f, sizeof(*s->best3)); - s->llen3 = (swd_uintp) ucl_alloc(SWD_HSIZE, sizeof(*s->llen3)); - if (!s->b || !s->head3 || !s->succ3 || !s->best3 || !s->llen3) - return UCL_E_OUT_OF_MEMORY; -#ifdef HEAD2 - IF_HEAD2(s) { - s->head2 = (swd_uintp) ucl_alloc(UCL_UINT32_C(65536), sizeof(*s->head2)); - if (!s->head2) - return UCL_E_OUT_OF_MEMORY; - } -#endif -#endif - - /* defaults */ - s->max_chain = SWD_MAX_CHAIN; - s->nice_length = s->f; - s->use_best_off = 0; - s->lazy_insert = 0; - - s->b_size = s->n + s->f; - if (s->b_size + s->f >= SWD_UINT_MAX) - return UCL_E_ERROR; - s->b_wrap = s->b + s->b_size; - s->node_count = s->n; - - ucl_memset(s->llen3, 0, (ucl_uint)sizeof(s->llen3[0]) * SWD_HSIZE); -#ifdef HEAD2 - IF_HEAD2(s) { -#if 1 - ucl_memset(s->head2, 0xff, (ucl_uint)sizeof(s->head2[0]) * UCL_UINT32_C(65536)); - assert(s->head2[0] == NIL2); -#else - ucl_uint32 i; - for (i = 0; i < UCL_UINT32_C(65536); i++) - s->head2[i] = NIL2; -#endif - } -#endif - - s->ip = 0; - swd_initdict(s,dict,dict_len); - s->bp = s->ip; - s->first_rp = s->ip; - - assert(s->ip + s->f <= s->b_size); -#if 1 - s->look = (ucl_uint) (s->c->in_end - s->c->ip); - if (s->look > 0) - { - if (s->look > s->f) - s->look = s->f; - ucl_memcpy(&s->b[s->ip],s->c->ip,s->look); - s->c->ip += s->look; - s->ip += s->look; - } -#else - s->look = 0; - while (s->look < s->f) - { - int c; - if ((c = getbyte(*(s->c))) < 0) - break; - s->b[s->ip] = UCL_BYTE(c); - s->ip++; - s->look++; - } -#endif - if (s->ip == s->b_size) - s->ip = 0; - - if (s->look >= 2 && s->dict_len > 0) - swd_insertdict(s,0,s->dict_len); - - s->rp = s->first_rp; - if (s->rp >= s->node_count) - s->rp -= s->node_count; - else - s->rp += s->b_size - s->node_count; - -#if defined(__UCL_CHECKER) - /* initialize memory for the first few HEAD3 (if s->ip is not far - * enough ahead to do this job for us). The value doesn't matter. */ - if (s->look < 3) - ucl_memset(&s->b[s->bp+s->look],0,3); -#endif - - return UCL_E_OK; -} - - -static -void swd_exit(ucl_swd_t *s) -{ -#if defined(SWD_USE_MALLOC) - /* free in reverse order of allocations */ -# ifdef HEAD2 - ucl_free(s->head2); s->head2 = NULL; -#endif - ucl_free(s->llen3); s->llen3 = NULL; - ucl_free(s->best3); s->best3 = NULL; - ucl_free(s->succ3); s->succ3 = NULL; - ucl_free(s->head3); s->head3 = NULL; - ucl_free(s->b); s->b = NULL; -#else - //ACC_UNUSED(s); -#endif -} - - -#define swd_pos2off(s,pos) \ - (s->bp > (pos) ? s->bp - (pos) : s->b_size - ((pos) - s->bp)) - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_getbyte(ucl_swd_t *s) -{ - int c; - - if ((c = getbyte(*(s->c))) < 0) - { - if (s->look > 0) - --s->look; -#if defined(__UCL_CHECKER) - /* initialize memory - value doesn't matter */ - s->b[s->ip] = 0; - if (s->ip < s->f) - s->b_wrap[s->ip] = 0; -#endif - } - else - { - s->b[s->ip] = UCL_BYTE(c); - if (s->ip < s->f) - s->b_wrap[s->ip] = UCL_BYTE(c); - } - if (++s->ip == s->b_size) - s->ip = 0; - if (++s->bp == s->b_size) - s->bp = 0; - if (++s->rp == s->b_size) - s->rp = 0; -} - - -/*********************************************************************** -// remove node from lists -************************************************************************/ - -static -void swd_remove_node(ucl_swd_t *s, ucl_uint node) -{ - if (s->node_count == 0) - { - ucl_uint key; - -#ifdef UCL_DEBUG - if (s->first_rp != UCL_UINT_MAX) - { - if (node != s->first_rp) - printf("Remove %5u: %5u %5u %5u %5u %6u %6u\n", - node, s->rp, s->ip, s->bp, s->first_rp, - s->ip - node, s->ip - s->bp); - assert(node == s->first_rp); - s->first_rp = UCL_UINT_MAX; - } -#endif - - key = HEAD3(s->b,node); - assert(s->llen3[key] > 0); - --s->llen3[key]; - -#ifdef HEAD2 - IF_HEAD2(s) { - key = HEAD2(s->b,node); - assert(s->head2[key] != NIL2); - if ((ucl_uint) s->head2[key] == node) - s->head2[key] = NIL2; - } -#endif - } - else - --s->node_count; -} - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_accept(ucl_swd_t *s, ucl_uint n) -{ - assert(n <= s->look); - - if (n > 0) do - { - ucl_uint key; - - swd_remove_node(s,s->rp); - - /* add bp into HEAD3 */ - key = HEAD3(s->b,s->bp); - s->succ3[s->bp] = s_get_head3(s,key); - s->head3[key] = SWD_UINT(s->bp); - s->best3[s->bp] = SWD_UINT(s->f + 1); - s->llen3[key]++; - assert(s->llen3[key] <= s->n); - -#ifdef HEAD2 - IF_HEAD2(s) { - /* add bp into HEAD2 */ - key = HEAD2(s->b,s->bp); - s->head2[key] = SWD_UINT(s->bp); - } -#endif - - swd_getbyte(s); - } while (--n > 0); -} - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_search(ucl_swd_t *s, ucl_uint node, ucl_uint cnt) -{ - const ucl_bytep p1; - const ucl_bytep p2; - const ucl_bytep px; - ucl_uint m_len = s->m_len; - const ucl_bytep b = s->b; - const ucl_bytep bp = s->b + s->bp; - const ucl_bytep bx = s->b + s->bp + s->look; - unsigned char scan_end1; - - assert(s->m_len > 0); - - scan_end1 = bp[m_len - 1]; - for ( ; cnt-- > 0; node = s->succ3[node]) - { - p1 = bp; - p2 = b + node; - px = bx; - - assert(m_len < s->look); - - if ( -#if 1 - p2[m_len - 1] == scan_end1 && - p2[m_len] == p1[m_len] && -#endif - p2[0] == p1[0] && - p2[1] == p1[1]) - { - ucl_uint i; - assert(ucl_memcmp(bp,&b[node],3) == 0); - -#if 0 && defined(UA_GET4) - p1 += 3; p2 += 3; - while (p1 < px && UA_GET4(p1) == UA_GET4(p2)) - p1 += 4, p2 += 4; - while (p1 < px && *p1 == *p2) - p1 += 1, p2 += 1; -#else - p1 += 2; p2 += 2; - do {} while (++p1 < px && *p1 == *++p2); -#endif - i = (ucl_uint) (p1 - bp); - -#ifdef UCL_DEBUG - if (ucl_memcmp(bp,&b[node],i) != 0) - printf("%5ld %5ld %02x%02x %02x%02x\n", - (long)s->bp, (long) node, - bp[0], bp[1], b[node], b[node+1]); -#endif - assert(ucl_memcmp(bp,&b[node],i) == 0); - -#if defined(SWD_BEST_OFF) - if (i < SWD_BEST_OFF) - { - if (s->best_pos[i] == 0) - s->best_pos[i] = node + 1; - } -#endif - if (i > m_len) - { - s->m_len = m_len = i; - s->m_pos = node; - if (m_len == s->look) - return; - if (m_len >= s->nice_length) - return; - if (m_len > (ucl_uint) s->best3[node]) - return; - scan_end1 = bp[m_len - 1]; - } - } - } -} - - -/*********************************************************************** -// -************************************************************************/ - -#ifdef HEAD2 - -static -ucl_bool swd_search2(ucl_swd_t *s) -{ - ucl_uint key; - - assert(s->look >= 2); - assert(s->m_len > 0); - - key = s->head2[ HEAD2(s->b,s->bp) ]; - if (key == NIL2) - return 0; -#ifdef UCL_DEBUG - if (ucl_memcmp(&s->b[s->bp],&s->b[key],2) != 0) - printf("%5ld %5ld %02x%02x %02x%02x\n", (long)s->bp, (long)key, - s->b[s->bp], s->b[s->bp+1], s->b[key], s->b[key+1]); -#endif - assert(ucl_memcmp(&s->b[s->bp],&s->b[key],2) == 0); -#if defined(SWD_BEST_OFF) - if (s->best_pos[2] == 0) - s->best_pos[2] = key + 1; -#endif - - if (s->m_len < 2) - { - s->m_len = 2; - s->m_pos = key; - } - return 1; -} - -#endif - - -/*********************************************************************** -// -************************************************************************/ - -static -void swd_findbest(ucl_swd_t *s) -{ - ucl_uint key; - ucl_uint cnt, node; - ucl_uint len; - - assert(s->m_len > 0); - - /* get current head, add bp into HEAD3 */ - key = HEAD3(s->b,s->bp); - node = s->succ3[s->bp] = s_get_head3(s,key); - cnt = s->llen3[key]++; - assert(s->llen3[key] <= s->n + s->f); - if (cnt > s->max_chain && s->max_chain > 0) - cnt = s->max_chain; - s->head3[key] = SWD_UINT(s->bp); - - s->b_char = s->b[s->bp]; - len = s->m_len; - if (s->m_len >= s->look) - { - if (s->look == 0) - s->b_char = -1; - s->m_off = 0; - s->best3[s->bp] = SWD_UINT(s->f + 1); - } - else - { -#if defined(HEAD2_VAR) - if (s->use_head2) { - if (swd_search2(s) && s->look >= 3) - swd_search(s,node,cnt); - } else { - if (s->look >= 3) - swd_search(s,node,cnt); - } -#elif defined(HEAD2) - if (swd_search2(s) && s->look >= 3) - swd_search(s,node,cnt); -#else - if (s->look >= 3) - swd_search(s,node,cnt); -#endif - if (s->m_len > len) - s->m_off = swd_pos2off(s,s->m_pos); - s->best3[s->bp] = SWD_UINT(s->m_len); - -#if defined(SWD_BEST_OFF) - if (s->use_best_off) - { - int i; - for (i = 2; i < SWD_BEST_OFF; i++) - if (s->best_pos[i] > 0) - s->best_off[i] = swd_pos2off(s,s->best_pos[i]-1); - else - s->best_off[i] = 0; - } -#endif - } - - swd_remove_node(s,s->rp); - -#ifdef HEAD2 - /* add bp into HEAD2 */ - IF_HEAD2(s) { - key = HEAD2(s->b,s->bp); - s->head2[key] = SWD_UINT(s->bp); - } -#endif -} - - -#undef HEAD3 -#undef HEAD2 -#undef IF_HEAD2 -#undef s_get_head3 - - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/getbit.h b/tools/z64compress/src/enc/ucl/getbit.h deleted file mode 100644 index 36ef48c99c..0000000000 --- a/tools/z64compress/src/enc/ucl/getbit.h +++ /dev/null @@ -1,64 +0,0 @@ -/* getbit.h -- bit-buffer access - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -/*********************************************************************** -// -************************************************************************/ - -#if 1 -#define getbit_8(bb, src, ilen) \ - (((bb = bb & 0x7f ? bb*2 : ((unsigned)src[ilen++]*2+1)) >> 8) & 1) -#elif 1 -#define getbit_8(bb, src, ilen) \ - (bb*=2,bb&0xff ? (bb>>8)&1 : ((bb=src[ilen++]*2+1)>>8)&1) -#else -#define getbit_8(bb, src, ilen) \ - (((bb*=2, (bb&0xff ? bb : (bb=src[ilen++]*2+1,bb))) >> 8) & 1) -#endif - - -#define getbit_le16(bb, src, ilen) \ - (bb*=2,bb&0xffff ? (bb>>16)&1 : (ilen+=2,((bb=(src[ilen-2]+src[ilen-1]*256u)*2+1)>>16)&1)) - - -#if 1 && (ACC_ENDIAN_LITTLE_ENDIAN) && defined(UA_GET4) -#define getbit_le32(bb, bc, src, ilen) \ - (bc > 0 ? ((bb>>--bc)&1) : (bc=31,\ - bb=UA_GET4((src)+ilen),ilen+=4,(bb>>31)&1)) -#else -#define getbit_le32(bb, bc, src, ilen) \ - (bc > 0 ? ((bb>>--bc)&1) : (bc=31,\ - bb=src[ilen]+src[ilen+1]*0x100+src[ilen+2]*UCL_UINT32_C(0x10000)+src[ilen+3]*UCL_UINT32_C(0x1000000),\ - ilen+=4,(bb>>31)&1)) -#endif - - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/n2b_d.c b/tools/z64compress/src/enc/ucl/n2b_d.c deleted file mode 100644 index 0dc3590685..0000000000 --- a/tools/z64compress/src/enc/ucl/n2b_d.c +++ /dev/null @@ -1,179 +0,0 @@ -/* n2b_d.c -- implementation of the NRV2B decompression algorithm - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -/*********************************************************************** -// actual implementation used by a recursive #include -************************************************************************/ - -#ifdef getbit - -#ifdef SAFE -#define fail(x,r) if (x) { *dst_len = olen; return r; } -#else -#define fail(x,r) -#endif - -{ - ucl_uint32 bb = 0; -#ifdef TEST_OVERLAP - ucl_uint ilen = src_off, olen = 0, last_m_off = 1; -#else - ucl_uint ilen = 0, olen = 0, last_m_off = 1; -#endif -#ifdef SAFE - const ucl_uint oend = *dst_len; -#endif - //ACC_UNUSED(wrkmem); - -#ifdef TEST_OVERLAP - src_len += src_off; - fail(oend >= src_len, UCL_E_OVERLAP_OVERRUN); -#endif - - for (;;) - { - ucl_uint m_off, m_len; - - while (getbit(bb)) - { - fail(ilen >= src_len, UCL_E_INPUT_OVERRUN); - fail(olen >= oend, UCL_E_OUTPUT_OVERRUN); -#ifdef TEST_OVERLAP - fail(olen > ilen, UCL_E_OVERLAP_OVERRUN); - olen++; ilen++; -#else - dst[olen++] = src[ilen++]; -#endif - } - m_off = 1; - do { - m_off = m_off*2 + getbit(bb); - fail(ilen >= src_len, UCL_E_INPUT_OVERRUN); - fail(m_off > UCL_UINT32_C(0xffffff) + 3, UCL_E_LOOKBEHIND_OVERRUN); - } while (!getbit(bb)); - if (m_off == 2) - { - m_off = last_m_off; - } - else - { - fail(ilen >= src_len, UCL_E_INPUT_OVERRUN); - m_off = (m_off-3)*256 + src[ilen++]; - if (m_off == UCL_UINT32_C(0xffffffff)) - break; - last_m_off = ++m_off; - } - m_len = getbit(bb); - m_len = m_len*2 + getbit(bb); - if (m_len == 0) - { - m_len++; - do { - m_len = m_len*2 + getbit(bb); - fail(ilen >= src_len, UCL_E_INPUT_OVERRUN); - fail(m_len >= oend, UCL_E_OUTPUT_OVERRUN); - } while (!getbit(bb)); - m_len += 2; - } - m_len += (m_off > 0xd00); - fail(olen + m_len > oend, UCL_E_OUTPUT_OVERRUN); - fail(m_off > olen, UCL_E_LOOKBEHIND_OVERRUN); -#ifdef TEST_OVERLAP - olen += m_len + 1; - fail(olen > ilen, UCL_E_OVERLAP_OVERRUN); -#else - { - const ucl_bytep m_pos; - m_pos = dst + olen - m_off; - dst[olen++] = *m_pos++; - do dst[olen++] = *m_pos++; while (--m_len > 0); - } -#endif - } - *dst_len = olen; - return ilen == src_len ? UCL_E_OK : (ilen < src_len ? UCL_E_INPUT_NOT_CONSUMED : UCL_E_INPUT_OVERRUN); -} - -#undef fail - -#endif /* getbit */ - - -/*********************************************************************** -// decompressor entries for the different bit-buffer sizes -************************************************************************/ - -#ifndef getbit - -#include "ucl_conf.h" -#include "ucl.h" -#include "getbit.h" - - -UCL_PUBLIC(int) -ucl_nrv2b_decompress_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ) -{ -#define getbit(bb) getbit_8(bb,src,ilen) -#include "n2b_d.c" -#undef getbit -} - -#if 0 -UCL_PUBLIC(int) -ucl_nrv2b_decompress_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ) -{ -#define getbit(bb) getbit_le16(bb,src,ilen) -#include "n2b_d.c" -#undef getbit -} - - -UCL_PUBLIC(int) -ucl_nrv2b_decompress_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ) -{ - unsigned bc = 0; -#define getbit(bb) getbit_le32(bb,bc,src,ilen) -#include "n2b_d.c" -#undef getbit -} -#endif /* 0 */ - - -#endif /* !getbit */ - - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/ucl.h b/tools/z64compress/src/enc/ucl/ucl.h deleted file mode 100644 index f136d4a2df..0000000000 --- a/tools/z64compress/src/enc/ucl/ucl.h +++ /dev/null @@ -1,249 +0,0 @@ -/* ucl.h -- prototypes for the UCL data compression library - - This file is part of the UCL data compression library. - - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -#ifndef __UCL_H_INCLUDED -#define __UCL_H_INCLUDED - -#ifndef __UCLCONF_H_INCLUDED -#include "uclconf.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/*********************************************************************** -// Compression fine-tuning configuration. -// -// Pass a NULL pointer to the compression functions for default values. -// Otherwise set all values to -1 [i.e. initialize the struct by a -// `memset(x,0xff,sizeof(x))'] and then set the required values. -************************************************************************/ - -struct ucl_compress_config_t -{ - int bb_endian; - int bb_size; - ucl_uint max_offset; - ucl_uint max_match; - int s_level; - int h_level; - int p_level; - int c_flags; - ucl_uint m_size; -}; - -#define ucl_compress_config_p ucl_compress_config_t __UCL_MMODEL * - - -/*********************************************************************** -// compressors -// -// Pass NULL for `cb' (no progress callback), `conf' (default compression -// configuration) and `result' (no statistical result). -************************************************************************/ - -UCL_EXTERN(int) -ucl_nrv2b_99_compress ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_progress_callback_p cb, - int level, - const struct ucl_compress_config_p conf, - ucl_uintp result ); - -UCL_EXTERN(int) -ucl_nrv2d_99_compress ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_progress_callback_p cb, - int level, - const struct ucl_compress_config_p conf, - ucl_uintp result ); - -UCL_EXTERN(int) -ucl_nrv2e_99_compress ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_progress_callback_p cb, - int level, - const struct ucl_compress_config_p conf, - ucl_uintp result ); - - -/*********************************************************************** -// decompressors -// -// Always pass NULL for `wrkmem'. This parameter is for symetry -// with my other compression libaries and is not used in UCL - -// UCL does not need any additional memory (or even local stack space) -// for decompression. -************************************************************************/ - -UCL_EXTERN(int) -ucl_nrv2b_decompress_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_decompress_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_decompress_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_decompress_safe_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_decompress_safe_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_decompress_safe_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -UCL_EXTERN(int) -ucl_nrv2d_decompress_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_decompress_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_decompress_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_decompress_safe_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_decompress_safe_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_decompress_safe_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -UCL_EXTERN(int) -ucl_nrv2e_decompress_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_decompress_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_decompress_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_decompress_safe_8 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_decompress_safe_le16 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_decompress_safe_le32 ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); - - -/*********************************************************************** -// assembler decompressors [TO BE ADDED] -************************************************************************/ - - -/*********************************************************************** -// test an overlapping in-place decompression within a buffer: -// - try a virtual decompression from &buf[src_off] -> &buf[0] -// - no data is actually written -// - only the bytes at buf[src_off..src_off+src_len-1] will get accessed -// -// NOTE: always pass NULL for `wrkmem' - see above. -************************************************************************/ - -UCL_EXTERN(int) -ucl_nrv2b_test_overlap_8 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_test_overlap_le16 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2b_test_overlap_le32 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -UCL_EXTERN(int) -ucl_nrv2d_test_overlap_8 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_test_overlap_le16 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2d_test_overlap_le32 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -UCL_EXTERN(int) -ucl_nrv2e_test_overlap_8 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_test_overlap_le16 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); -UCL_EXTERN(int) -ucl_nrv2e_test_overlap_le32 ( const ucl_bytep buf, ucl_uint src_off, - ucl_uint src_len, ucl_uintp dst_len, - ucl_voidp wrkmem ); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - diff --git a/tools/z64compress/src/enc/ucl/ucl_conf.h b/tools/z64compress/src/enc/ucl/ucl_conf.h deleted file mode 100644 index 79f5c6b61b..0000000000 --- a/tools/z64compress/src/enc/ucl/ucl_conf.h +++ /dev/null @@ -1,220 +0,0 @@ -/* ucl_conf.h -- main internal configuration file for the the UCL library - - This file is part of the UCL data compression library. - - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the library and is subject - to change. - */ - - -#ifndef __UCL_CONF_H -#define __UCL_CONF_H - - -/*********************************************************************** -// -************************************************************************/ - -#if defined(__UCLCONF_H_INCLUDED) -# error "include this file first" -#endif -#include "uclconf.h" - -#if !defined(__UCL_MMODEL_HUGE) && defined(HAVE_MEMCMP) -# define ucl_memcmp(a,b,c) memcmp(a,b,c) -#endif -#if !defined(__UCL_MMODEL_HUGE) && defined(HAVE_MEMCPY) -# define ucl_memcpy(a,b,c) memcpy(a,b,c) -#endif -#if !defined(__UCL_MMODEL_HUGE) && defined(HAVE_MEMMOVE) -# define ucl_memmove(a,b,c) memmove(a,b,c) -#endif -#if !defined(__UCL_MMODEL_HUGE) && defined(HAVE_MEMSET) -# define ucl_memset(a,b,c) memset(a,b,c) -#endif -#if 0 /* WANT_ACC */ -#if defined(UCL_HAVE_CONFIG_H) -# define ACC_CONFIG_NO_HEADER 1 -#endif -#define __ACCLIB_FUNCNAME(f) error_do_not_use_acclib -#include "acc/acc.h" - -#if (ACC_CC_MSC && (_MSC_VER >= 1300)) - /* avoid `-Wall' warnings in system header files */ -# pragma warning(disable: 4820) - /* avoid warnings about inlining */ -# pragma warning(disable: 4710 4711) -#endif - -#if defined(__UCL_MMODEL_HUGE) && (!ACC_HAVE_MM_HUGE_PTR) -# error "this should not happen - check defines for __huge" -#endif - -#if (ACC_OS_DOS16 + 0 != UCL_OS_DOS16 + 0) -# error "DOS16" -#endif -#if (ACC_OS_OS216 + 0 != UCL_OS_OS216 + 0) -# error "OS216" -#endif -#if (ACC_OS_WIN16 + 0 != UCL_OS_WIN16 + 0) -# error "WIN16" -#endif -#if (ACC_OS_DOS32 + 0 != UCL_OS_DOS32 + 0) -# error "DOS32" -#endif -#if (ACC_OS_OS2 + 0 != UCL_OS_OS2 + 0) -# error "DOS32" -#endif -#if (ACC_OS_WIN32 + 0 != UCL_OS_WIN32 + 0) -# error "WIN32" -#endif -#if (ACC_OS_WIN64 + 0 != UCL_OS_WIN64 + 0) -# error "WIN64" -#endif - - -#include "acc/acc_incd.h" -#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) -# include "acc/acc_ince.h" -# include "acc/acc_inci.h" -#endif - -#undef NDEBUG -#if !defined(UCL_DEBUG) -# define NDEBUG 1 -#endif -#include - - -#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) && (ACC_CC_BORLANDC) -# if (__BORLANDC__ >= 0x0450) /* v4.00 */ -# pragma option -h /* enable fast huge pointers */ -# else -# pragma option -h- /* disable fast huge pointers - compiler bug */ -# endif -#endif -#endif /* WANT_ACC */ - - -/*********************************************************************** -// -************************************************************************/ - -#if 1 -# define UCL_BYTE(x) ((unsigned char) (x)) -#else -# define UCL_BYTE(x) ((unsigned char) ((x) & 0xff)) -#endif -#if 0 -# define UCL_USHORT(x) ((unsigned short) (x)) -#else -# define UCL_USHORT(x) ((unsigned short) ((x) & 0xffff)) -#endif - -#define UCL_MAX(a,b) ((a) >= (b) ? (a) : (b)) -#define UCL_MIN(a,b) ((a) <= (b) ? (a) : (b)) -#define UCL_MAX3(a,b,c) ((a) >= (b) ? UCL_MAX(a,c) : UCL_MAX(b,c)) -#define UCL_MIN3(a,b,c) ((a) <= (b) ? UCL_MIN(a,c) : UCL_MIN(b,c)) - -#define ucl_sizeof(type) ((ucl_uint) (sizeof(type))) - -#define UCL_HIGH(array) ((ucl_uint) (sizeof(array)/sizeof(*(array)))) - -/* this always fits into 16 bits */ -#define UCL_SIZE(bits) (1u << (bits)) -#define UCL_MASK(bits) (UCL_SIZE(bits) - 1) - -#define UCL_LSIZE(bits) (1ul << (bits)) -#define UCL_LMASK(bits) (UCL_LSIZE(bits) - 1) - -#define UCL_USIZE(bits) ((ucl_uint) 1 << (bits)) -#define UCL_UMASK(bits) (UCL_USIZE(bits) - 1) - -/* Maximum value of a signed/unsigned type. - Do not use casts, avoid overflows ! */ -#define UCL_STYPE_MAX(b) (((1l << (8*(b)-2)) - 1l) + (1l << (8*(b)-2))) -#define UCL_UTYPE_MAX(b) (((1ul << (8*(b)-1)) - 1ul) + (1ul << (8*(b)-1))) - - -/*********************************************************************** -// compiler and architecture specific stuff -************************************************************************/ - -/* Some defines that indicate if memory can be accessed at unaligned - * memory addresses. You should also test that this is actually faster - * even if it is allowed by your system. - */ - -#undef UA_GET2 -#undef UA_SET2 -#undef UA_GET4 -#undef UA_SET4 -#if 1 && (ACC_ARCH_AMD64 || ACC_ARCH_IA32) -# define UA_GET2(p) (* (const ucl_ushortp) (p)) -# define UA_SET2(p) (* (ucl_ushortp) (p)) -# define UA_GET4(p) (* (const acc_uint32e_t *) (p)) -# define UA_SET4(p) (* (acc_uint32e_t *) (p)) -#elif 0 && (ACC_ARCH_M68K) && (ACC_CC_GNUC >= 0x020900ul) - typedef struct { unsigned short v; } __ucl_ua2_t __attribute__((__aligned__(1))); - typedef struct { unsigned long v; } __ucl_ua4_t __attribute__((__aligned__(1))); -# define UA_GET2(p) (((const __ucl_ua2_t *)(p))->v) -# define UA_SET2(p) (((__ucl_ua2_t *)(p))->v) -# define UA_GET4(p) (((const __ucl_ua4_t *)(p))->v) -# define UA_SET4(p) (((__ucl_ua4_t *)(p))->v) -#endif - - -/*********************************************************************** -// some globals -************************************************************************/ - -__UCL_EXTERN_C int __ucl_init_done; -UCL_EXTERN(const ucl_bytep) ucl_copyright(void); - - -/*********************************************************************** -// ANSI C preprocessor macros -************************************************************************/ - -#define _UCL_STRINGIZE(x) #x -#define _UCL_MEXPAND(x) _UCL_STRINGIZE(x) - - -/*********************************************************************** -// -************************************************************************/ - -//#include "ucl_ptr.h" - - -#endif /* already included */ - -/* -vi:ts=4:et -*/ - diff --git a/tools/z64compress/src/enc/ucl/uclconf.h b/tools/z64compress/src/enc/ucl/uclconf.h deleted file mode 100644 index ab18ca173d..0000000000 --- a/tools/z64compress/src/enc/ucl/uclconf.h +++ /dev/null @@ -1,490 +0,0 @@ -/* uclconf.h -- configuration for the UCL data compression library - - This file is part of the UCL data compression library. - - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The UCL library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The UCL library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the UCL library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer - - http://www.oberhumer.com/opensource/ucl/ - */ - - -#ifndef __UCLCONF_H_INCLUDED -#define __UCLCONF_H_INCLUDED - -#define UCL_VERSION 0x010300L -#define UCL_VERSION_STRING "1.03" -#define UCL_VERSION_DATE "Jul 20 2004" - -/* internal Autoconf configuration file - only used when building UCL */ -#if defined(UCL_HAVE_CONFIG_H) -# include -#endif -#include - -#ifdef __cplusplus -extern "C" { -#endif - - - -/*********************************************************************** -// UCL requires a conforming -************************************************************************/ - -#if !defined(CHAR_BIT) || (CHAR_BIT != 8) -# error "invalid CHAR_BIT" -#endif -#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) -# error "check your compiler installation" -#endif -#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) -# error "your limits.h macros are broken" -#endif - -/* workaround a compiler bug under hpux 10.20 */ -#define UCL_0xffffL 65535ul -#define UCL_0xffffffffL 4294967295ul - -#if !defined(UCL_UINT32_C) -# if (UINT_MAX < UCL_0xffffffffL) -# define UCL_UINT32_C(c) c ## UL -# else -# define UCL_UINT32_C(c) ((c) + 0U) -# endif -#endif - - -/*********************************************************************** -// architecture defines -************************************************************************/ - -#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && defined(__GNUC__) -# define UCL_OS_CYGWIN 1 -#elif defined(__EMX__) && defined(__GNUC__) -# define UCL_OS_EMX 1 -#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) -# define UCL_OS_DOS32 1 -#elif defined(__BORLANDC__) && defined(__DPMI16__) -# define UCL_OS_DOS16 1 -#elif defined(__ZTC__) && defined(DOS386) -# define UCL_OS_DOS32 1 -#elif defined(__OS2__) || defined(__OS2V2__) -# if (UINT_MAX == UCL_0xffffL) -# define UCL_OS_OS216 1 -# elif (UINT_MAX == UCL_0xffffffffL) -# define UCL_OS_OS2 1 -# else -# error "check your limits.h header" -# endif -#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) -# define UCL_OS_WIN64 1 -#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) -# define UCL_OS_WIN32 1 -#elif defined(__MWERKS__) && defined(__INTEL__) -# define UCL_OS_WIN32 1 -#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) -# if (UINT_MAX == UCL_0xffffL) -# define UCL_OS_WIN16 1 -# elif (UINT_MAX == UCL_0xffffffffL) -# define UCL_OS_WIN32 1 -# else -# error "check your limits.h header" -# endif -#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) -# if (UINT_MAX == UCL_0xffffL) -# define UCL_OS_DOS16 1 -# elif (UINT_MAX == UCL_0xffffffffL) -# define UCL_OS_DOS32 1 -# else -# error "check your limits.h header" -# endif -#elif defined(__WATCOMC__) -# if defined(__NT__) && (UINT_MAX == UCL_0xffffL) - /* wcl: NT host defaults to DOS target */ -# define UCL_OS_DOS16 1 -# elif defined(__NT__) && (__WATCOMC__ < 1100) - /* wcl386: Watcom C 11 defines _WIN32 */ -# define UCL_OS_WIN32 1 -# else -# error "please specify a target using the -bt compiler option" -# endif -#elif defined(__palmos__) -# if (UINT_MAX == UCL_0xffffL) -# define UCL_OS_PALMOS 1 -# else -# error "check your limits.h header" -# endif -#elif defined(__TOS__) || defined(__atarist__) -# define UCL_OS_TOS 1 -#elif defined(macintosh) -# define UCL_OS_MACCLASSIC 1 -#elif defined(__VMS) -# define UCL_OS_VMS 1 -#else -# define UCL_OS_POSIX 1 -#endif - -/* memory checkers */ -#if !defined(__UCL_CHECKER) -# if defined(__BOUNDS_CHECKING_ON) -# define __UCL_CHECKER 1 -# elif defined(__CHECKER__) -# define __UCL_CHECKER 1 -# elif defined(__INSURE__) -# define __UCL_CHECKER 1 -# elif defined(__PURIFY__) -# define __UCL_CHECKER 1 -# endif -#endif - -/* fix ancient compiler versions */ -#if (UINT_MAX == UCL_0xffffL) -#if (defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)) || (defined(MSDOS) && defined(_MSC_VER) && (_MSC_VER < 700)) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__far) -# define __far far -# endif -# if !defined(__huge) -# define __huge huge -# endif -# if !defined(__near) -# define __near near -# endif -#endif -#endif - - -/*********************************************************************** -// integral and pointer types -************************************************************************/ - -/* Integral types with 32 bits or more */ -#if !defined(UCL_UINT32_MAX) -# if (UINT_MAX >= UCL_0xffffffffL) - typedef unsigned int ucl_uint32; - typedef int ucl_int32; -# define UCL_UINT32_MAX UINT_MAX -# define UCL_INT32_MAX INT_MAX -# define UCL_INT32_MIN INT_MIN -# elif (ULONG_MAX >= UCL_0xffffffffL) - typedef unsigned long ucl_uint32; - typedef long ucl_int32; -# define UCL_UINT32_MAX ULONG_MAX -# define UCL_INT32_MAX LONG_MAX -# define UCL_INT32_MIN LONG_MIN -# else -# error "ucl_uint32" -# endif -#endif - -/* ucl_uint is used like size_t */ -#if !defined(UCL_UINT_MAX) -# if (UINT_MAX >= UCL_0xffffffffL) - typedef unsigned int ucl_uint; - typedef int ucl_int; -# define UCL_UINT_MAX UINT_MAX -# define UCL_INT_MAX INT_MAX -# define UCL_INT_MIN INT_MIN -# elif (ULONG_MAX >= UCL_0xffffffffL) - typedef unsigned long ucl_uint; - typedef long ucl_int; -# define UCL_UINT_MAX ULONG_MAX -# define UCL_INT_MAX LONG_MAX -# define UCL_INT_MIN LONG_MIN -# else -# error "ucl_uint" -# endif -#endif - -/* Memory model that allows to access memory at offsets of ucl_uint. */ -#if !defined(__UCL_MMODEL) -# if (UCL_UINT_MAX <= UINT_MAX) -# define __UCL_MMODEL -# elif defined(UCL_OS_DOS16) || defined(UCL_OS_OS216) || defined(UCL_OS_WIN16) -# define __UCL_MMODEL_HUGE 1 -# define __UCL_MMODEL __huge -# define ucl_uintptr_t unsigned long -# else -# define __UCL_MMODEL -# endif -#endif - -/* no typedef here because of const-pointer issues */ -#define ucl_bytep unsigned char __UCL_MMODEL * -#define ucl_charp char __UCL_MMODEL * -#define ucl_voidp void __UCL_MMODEL * -#define ucl_shortp short __UCL_MMODEL * -#define ucl_ushortp unsigned short __UCL_MMODEL * -#define ucl_uint32p ucl_uint32 __UCL_MMODEL * -#define ucl_int32p ucl_int32 __UCL_MMODEL * -#define ucl_uintp ucl_uint __UCL_MMODEL * -#define ucl_intp ucl_int __UCL_MMODEL * -#define ucl_voidpp ucl_voidp __UCL_MMODEL * -#define ucl_bytepp ucl_bytep __UCL_MMODEL * -/* deprecated - use `ucl_bytep' instead of `ucl_byte *' */ -#define ucl_byte unsigned char __UCL_MMODEL - -typedef int ucl_bool; - - -/*********************************************************************** -// function types -************************************************************************/ - -/* name mangling */ -#if !defined(__UCL_EXTERN_C) -# ifdef __cplusplus -# define __UCL_EXTERN_C extern "C" -# else -# define __UCL_EXTERN_C extern -# endif -#endif - -/* calling convention */ -#if !defined(__UCL_CDECL) -# if defined(__GNUC__) || defined(__HIGHC__) || defined(__NDPC__) -# define __UCL_CDECL -# elif defined(UCL_OS_DOS16) || defined(UCL_OS_OS216) || defined(UCL_OS_WIN16) -# define __UCL_CDECL __far __cdecl -# elif defined(UCL_OS_DOS32) || defined(UCL_OS_OS2) || defined(UCL_OS_WIN32) || defined(UCL_OS_WIN64) -# define __UCL_CDECL __cdecl -# else -# define __UCL_CDECL -# endif -#endif - -/* DLL export information */ -#if !defined(__UCL_EXPORT1) -# define __UCL_EXPORT1 -#endif -#if !defined(__UCL_EXPORT2) -# define __UCL_EXPORT2 -#endif - -/* __cdecl calling convention for public C and assembly functions */ -#if !defined(UCL_PUBLIC) -# define UCL_PUBLIC(_rettype) __UCL_EXPORT1 _rettype __UCL_EXPORT2 __UCL_CDECL -#endif -#if !defined(UCL_EXTERN) -# define UCL_EXTERN(_rettype) __UCL_EXTERN_C UCL_PUBLIC(_rettype) -#endif -#if !defined(UCL_PRIVATE) -# define UCL_PRIVATE(_rettype) static _rettype __UCL_CDECL -#endif - -/* C++ exception specification for extern "C" function types */ -#if !defined(__cplusplus) -# undef UCL_NOTHROW -# define UCL_NOTHROW -#elif !defined(UCL_NOTHROW) -# define UCL_NOTHROW -#endif - -/* function types */ -typedef int -(__UCL_CDECL *ucl_compress_t) ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -typedef int -(__UCL_CDECL *ucl_decompress_t) ( const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -typedef int -(__UCL_CDECL *ucl_optimize_t) ( ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem ); - -typedef int -(__UCL_CDECL *ucl_compress_dict_t)(const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem, - const ucl_bytep dict, ucl_uint dict_len ); - -typedef int -(__UCL_CDECL *ucl_decompress_dict_t)(const ucl_bytep src, ucl_uint src_len, - ucl_bytep dst, ucl_uintp dst_len, - ucl_voidp wrkmem, - const ucl_bytep dict, ucl_uint dict_len ); - -/* a progress indicator callback function */ -typedef struct -{ - void (__UCL_CDECL *callback) (ucl_uint, ucl_uint, int, ucl_voidp); - ucl_voidp user; -} -ucl_progress_callback_t; -#define ucl_progress_callback_p ucl_progress_callback_t __UCL_MMODEL * - - -/*********************************************************************** -// error codes and prototypes -************************************************************************/ - -/* Error codes for the compression/decompression functions. Negative - * values are errors, positive values will be used for special but - * normal events. - */ -#define UCL_E_OK 0 -#define UCL_E_ERROR (-1) -#define UCL_E_INVALID_ARGUMENT (-2) -#define UCL_E_OUT_OF_MEMORY (-3) -/* compression errors */ -#define UCL_E_NOT_COMPRESSIBLE (-101) -/* decompression errors */ -#define UCL_E_INPUT_OVERRUN (-201) -#define UCL_E_OUTPUT_OVERRUN (-202) -#define UCL_E_LOOKBEHIND_OVERRUN (-203) -#define UCL_E_EOF_NOT_FOUND (-204) -#define UCL_E_INPUT_NOT_CONSUMED (-205) -#define UCL_E_OVERLAP_OVERRUN (-206) - - -/* ucl_init() should be the first function you call. - * Check the return code ! - * - * ucl_init() is a macro to allow checking that the library and the - * compiler's view of various types are consistent. - */ -#define ucl_init() __ucl_init2(UCL_VERSION,(int)sizeof(short),(int)sizeof(int),\ - (int)sizeof(long),(int)sizeof(ucl_uint32),(int)sizeof(ucl_uint),\ - (int)-1,(int)sizeof(char *),(int)sizeof(ucl_voidp),\ - (int)sizeof(ucl_compress_t)) -UCL_EXTERN(int) __ucl_init2(ucl_uint32,int,int,int,int,int,int,int,int,int); - -/* version functions (useful for shared libraries) */ -UCL_EXTERN(ucl_uint32) ucl_version(void); -UCL_EXTERN(const char *) ucl_version_string(void); -UCL_EXTERN(const char *) ucl_version_date(void); -UCL_EXTERN(const ucl_charp) _ucl_version_string(void); -UCL_EXTERN(const ucl_charp) _ucl_version_date(void); - -/* string functions */ -UCL_EXTERN(int) -ucl_memcmp(const ucl_voidp _s1, const ucl_voidp _s2, ucl_uint _len); -UCL_EXTERN(ucl_voidp) -ucl_memcpy(ucl_voidp _dest, const ucl_voidp _src, ucl_uint _len); -UCL_EXTERN(ucl_voidp) -ucl_memmove(ucl_voidp _dest, const ucl_voidp _src, ucl_uint _len); -UCL_EXTERN(ucl_voidp) -ucl_memset(ucl_voidp _s, int _c, ucl_uint _len); - -/* checksum functions */ -UCL_EXTERN(ucl_uint32) -ucl_adler32(ucl_uint32 _adler, const ucl_bytep _buf, ucl_uint _len); -UCL_EXTERN(ucl_uint32) -ucl_crc32(ucl_uint32 _c, const ucl_bytep _buf, ucl_uint _len); -UCL_EXTERN(const ucl_uint32p) -ucl_get_crc32_table(void); - -/* memory allocation hooks */ -typedef ucl_voidp (__UCL_CDECL *ucl_malloc_hook_t) (ucl_uint); -typedef void (__UCL_CDECL *ucl_free_hook_t) (ucl_voidp); -UCL_EXTERN(void) -ucl_set_malloc_hooks(ucl_malloc_hook_t, ucl_free_hook_t); -UCL_EXTERN(void) -ucl_get_malloc_hooks(ucl_malloc_hook_t*, ucl_free_hook_t*); - -#ifndef UCL_SAFE_ALLOC -#define UCL_SAFE_ALLOC 1 -#include -#include - -/* safe calloc */ -static -inline -void * -calloc_safe(size_t nmemb, size_t size) -{ - void *result; - - result = calloc(nmemb, size); - - if (!result) - { - fprintf(stderr, "[!] memory error\n"); - exit(EXIT_FAILURE); - } - - return result; -} - -/* safe malloc */ -static -inline -void * -malloc_safe(size_t size) -{ - void *result; - - result = malloc(size); - - if (!result) - { - fprintf(stderr, "[!] memory error\n"); - exit(EXIT_FAILURE); - } - - return result; -} -#endif /* UCL_SAFE_ALLOC */ - -/* memory allocation functions */ -#if 0 -UCL_EXTERN(ucl_voidp) ucl_malloc(ucl_uint); -UCL_EXTERN(ucl_voidp) ucl_alloc(ucl_uint, ucl_uint); -UCL_EXTERN(void) ucl_free(ucl_voidp); -#else -# define ucl_malloc(a) (malloc_safe(a)) -# define ucl_alloc(a, b) (calloc_safe(a, b)) -# define ucl_free(a) (free(a)) -#endif - - -/* misc. */ -UCL_EXTERN(ucl_bool) ucl_assert(int _expr); -UCL_EXTERN(int) _ucl_config_check(void); -typedef union { ucl_bytep p; ucl_uint u; } __ucl_pu_u; -typedef union { ucl_bytep p; ucl_uint32 u32; } __ucl_pu32_u; - -/* align a char pointer on a boundary that is a multiple of `size' */ -UCL_EXTERN(unsigned) __ucl_align_gap(const ucl_voidp _ptr, ucl_uint _size); -#define UCL_PTR_ALIGN_UP(_ptr,_size) \ - ((_ptr) + (ucl_uint) __ucl_align_gap((const ucl_voidp)(_ptr),(ucl_uint)(_size))) - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - diff --git a/tools/z64compress/src/enc/yar.c b/tools/z64compress/src/enc/yar.c deleted file mode 100644 index 823b3425d3..0000000000 --- a/tools/z64compress/src/enc/yar.c +++ /dev/null @@ -1,450 +0,0 @@ -/* yar.c: decode and encode MM yaz archives */ - -#include -#include -#include -#include - -#define FERR(x) { \ - fprintf(stderr, x); \ - fprintf(stderr, "\n"); \ - exit(EXIT_FAILURE); \ -} - -/* surely an archive won't exceed 64 MB */ -#define YAR_MAX (1024 * 1024 * 64) - -/* align out address before writing compressed file */ -#define FILE_ALIGN \ - while ((outSz % align)) \ - { \ - out[outSz] = 0; \ - outSz += 1; \ - } - -struct yarFile -{ - int idx; /* original index in list */ - int ofs; /* global offset of file */ -}; - -static -unsigned int -u32b(void *src) -{ - unsigned char *arr = src; - - return (arr[0] << 24) | (arr[1] << 16) | (arr[2] << 8) | arr[3]; -} - -static -void -u32wr(void *dst, unsigned int src) -{ - unsigned char *arr = dst; - - arr[0] = src >> 24; - arr[1] = src >> 16; - arr[2] = src >> 8; - arr[3] = src; -} - -static -void -progress(const char *name, int progress, int end) -{ - fprintf( - stderr - , "\r""repacking '%s' %d/%d: " - , name - , progress - , end - ); -} - -/* reencode yar archive */ -/* returns 0 on success, pointer to error message otherwise */ -char * -yar_reencode( - unsigned char *src /* source archive */ - , unsigned int sz /* source archive size */ - , unsigned char *dst /* destination archive */ - , unsigned int *dst_sz /* destination archive size */ - , int align /* compressed file alignment */ - - , const char *name /* name of archive (0 = hide progress) */ - , const char *codec /* the expected encoding header "Yaz0" */ - , void *imm /* intermediate buffer for conversion */ - , void *ctx /* compression context (if applicable) */ - - /* decompresses file; return non-zero on fail; optional - * if files are already decompressed (up to user to know) - */ - , int decode(void *src, void *dst, unsigned dstSz, unsigned *srcSz) - - /* compress file; returns non-zero on fail; optional if - * files are desired to be left decompressed - */ - , int encode(void *src, unsigned srcSz, void *dst, unsigned *dstSz, void *ctx) - - /* test if file has been previously encoded; optional */ - , int exist(void *src, unsigned srcSz, void *dst, unsigned *dstSz) -) -{ - unsigned char *ss; - unsigned char *out; - unsigned int end; - unsigned int end_out; - unsigned int outSz = 0; - int progress_end; - struct yarFile *list = 0; - struct yarFile *item; - int list_num; - - assert(src); - assert(sz); - assert(dst_sz); - assert(dst); - assert(align >= 0); - assert((align & 3) == 0); /* cannot have alignment smaller than 4 */ - - out = dst; - - end = 0; - - ss = src; - item = list; - do - { - unsigned ofs; - unsigned uncompSz; - unsigned OG_encSz; - unsigned char *b; - - ofs = u32b(ss) + end; - - /* first entry points to end of list, and first file */ - if (!end) - { - end = ofs; - outSz = end; - - /* allocate file list */ - list_num = (end / 4) + 1; - list = calloc(list_num, sizeof(*list)); - if (!list) - return "memory error"; - item = list; - - FILE_ALIGN - - /* output file may be aligned differently */ - end_out = outSz; - - progress_end = end / 4; - } - - /* b now points to compressed file */ - b = src + ofs; - - /* update progress display */ - if (name) - progress(name, (ss - src) / 4, progress_end); - - /* there should be room for 4-byte codec and 4-byte size */ - if (b + 4 >= src + sz) - break; - - /* decompressed file size is second word */ - uncompSz = u32b(b + 4); - - /* yaz-encoded file */ - if (!memcmp(b, codec, 4)) - { - unsigned char *fout = out + outSz; - unsigned encSz; - - /* user doesn't want encoded data */ - if (!encode) - { - imm = fout; - encSz = uncompSz; - } - - /* decode 'b' only if user provided decoder */ - if (decode) - { - if (decode(b, imm, uncompSz, &OG_encSz)) - return "decoder error"; - } - /* if no decoder is provided, direct copy */ - else - memcpy(imm, b + 0x10, uncompSz); - - /* encode only if user wants that */ - if (encode) - { - /* if no exist function has been provided, or - * if it hasn't been encoded yet, encode it - */ - if (!exist || !exist(imm, uncompSz, fout, &encSz)) - { - if (encode(imm, uncompSz, fout, &encSz, ctx)) - return "encoder error"; - } - } - - /* point current entry to new file location */ - if (ss > src) - u32wr(out + (ss - src), outSz - end_out); - - /* first entry follows different rules */ - else - u32wr(out + (ss - src), end_out); - - /* advance out_sz to immediately after current file */ - outSz += encSz; - - /* align output */ - FILE_ALIGN - } - - /* end of list */ - else if (u32b(b) == 0) - break; - - /* unknown codec */ - else - { - char *errmsg = (char*)out; - char srep[16]; - sprintf(srep, "%08x", u32b(b)); - sprintf( - errmsg - , "unknown codec 0x%s encountered at %08X!\n" - , srep - , ofs - ); - return errmsg; - } - - ss += 4; - item += 1; - - } while (ss - src < end); - - /* update progress display */ - if (name) - progress(name, progress_end, progress_end); - - /* point final entry to end (four 00 bytes) */ - u32wr(out + (ss - src), outSz - end_out); - memset(out + outSz, 0, 16); - outSz += 4; - - /* in case list end changed due to padding, make multiple * - * end-of-list markers throughout the alignment space */ - if (end_out > end) - { - unsigned i; - unsigned last = u32b(out + (end - 4)); - for (i = 0; i < (end_out - end) / 4; ++i) - { - u32wr(out + end + i * 4, last); - } - } - - /* align final output size to 16 */ - if (outSz & 15) - outSz += 16 - (outSz & 15); - - /* if new file was constructed, note its size */ - *dst_sz = outSz; - - /* cleanup */ - free(list); - - /* success */ - return 0; -} - -#ifdef YAR_MAIN_TEST -/* - * - * usage example (writes decompressed archive) - * - */ - -/* yaz decoder, courtesy of spinout182 */ -static -int spinout_yaz_dec(void *_src, void *_dst, int dstSz) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - - int srcPlace = 0, dstPlace = 0; /*current read/write positions*/ - - unsigned int validBitCount = 0; /*number of valid bits left in "code" byte*/ - unsigned char currCodeByte = 0; - - int uncompressedSize = dstSz; - - src += 0x10; - - while(dstPlace < uncompressedSize) - { - /*read new "code" byte if the current one is used up*/ - if(!validBitCount) - { - currCodeByte = src[srcPlace]; - ++srcPlace; - validBitCount = 8; - } - - if(currCodeByte & 0x80) - { - /*direct copy*/ - dst[dstPlace] = src[srcPlace]; - dstPlace++; - srcPlace++; - } - else - { - /*RLE part*/ - unsigned char byte1 = src[srcPlace]; - unsigned char byte2 = src[srcPlace + 1]; - srcPlace += 2; - - unsigned int dist = ((byte1 & 0xF) << 8) | byte2; - unsigned int copySource = dstPlace - (dist + 1); - - unsigned int numBytes = byte1 >> 4; - if(numBytes) - numBytes += 2; - else - { - numBytes = src[srcPlace] + 0x12; - srcPlace++; - } - - /*copy run*/ - int i; - for(i = 0; i < numBytes; ++i) - { - dst[dstPlace] = dst[copySource]; - copySource++; - dstPlace++; - } - } - - /*use next bit from "code" byte*/ - currCodeByte <<= 1; - validBitCount-=1; - } - - return 0; -} - - -/* encodes decompressed data, storing result in dst */ -static -int encode(void *src, int srcSz, void *_dst, int *dstSz, void *ctx) -{ - unsigned char *dst = _dst; - -/* header */ - /* codec */ - memcpy(dst, "raw0", 4); - - /* decompressed size */ - u32wr(dst + 4, srcSz); - - /* 8 more bytes of padding */ - memset(dst + 8, 0, 8); - -/* contents */ - /* direct copy (data left unencoded; you could encode here though) */ - memcpy(dst + 0x10, src, srcSz); - *dstSz = srcSz + 0x10; - - return 0; -} - -/* checks if data has already been encoded */ -/* if it does, dst is filled with that data and 1 is returned */ -/* 0 is returned otherwise */ -static -int exist(void *src, int srcSz, void *dst, int *dstSz) -{ - return 0; -} - -/* unsafe but it's a test program so it's fine */ -static -unsigned char * -file_read(char *fn, unsigned *sz) -{ - FILE *fp; - unsigned char *raw; - - assert(fn); - assert(sz); - - fp = fopen(fn, "rb"); - if (!fp) - FERR("failed to open file for reading"); - - fseek(fp, 0, SEEK_END); - *sz = ftell(fp); - - if (!sz) - FERR("read file size == 0"); - - fseek(fp, 0, SEEK_SET); - raw = malloc(*sz); - if (!raw) - FERR("memory error"); - - if (fread(raw, 1, *sz, fp) != *sz) - FERR("file read error"); - - fclose(fp); - return raw; -} - -int main(int argc, char *argv[]) -{ - unsigned char *raw; - unsigned int raw_sz; - - unsigned char *out; - unsigned char *imm; - unsigned int out_sz = 0; - - if (argc != 2) - FERR("args: unyar in.yar > out.yar"); - - raw = file_read(argv[1], &raw_sz); - fprintf(stderr, "input file %s:\n", argv[1]); - - /* surely an archive won't exceed 64 MB */ - out = malloc(1024 * 1024 * 64); - imm = malloc(1024 * 1024 * 64); - - yar_reencode( - raw, raw_sz, out, &out_sz, 12, "Yaz0", imm - , spinout_yaz_dec - , encode - , exist - ); - - /* write output to stdout */ - fwrite(out, 1, out_sz, stdout); - - free(raw); - free(out); - free(imm); -} - -#endif /* YAR_MAIN_TEST */ - diff --git a/tools/z64compress/src/enc/yar.h b/tools/z64compress/src/enc/yar.h deleted file mode 100644 index 08890949e1..0000000000 --- a/tools/z64compress/src/enc/yar.h +++ /dev/null @@ -1,36 +0,0 @@ -/* yar.c: decode and encode MM yaz archives */ - -#ifndef Z64YAR_H_INCLUDED -#define Z64YAR_H_INCLUDED - -/* reencode yar archive */ -/* returns 0 on success, pointer to error message otherwise */ -char * -yar_reencode( - unsigned char *src /* source archive */ - , unsigned int sz /* source archive size */ - , unsigned char *dst /* destination archive */ - , unsigned int *dst_sz /* destination archive size */ - , int align /* compressed file alignment */ - - , const char *name /* name of archive (0 = hide progress) */ - , const char *codec /* the expected encoding header "Yaz0" */ - , void *imm /* intermediate buffer for conversion */ - , void *ctx /* compression context (if applicable) */ - - /* decompresses file; return non-zero on fail; optional - * if files are already decompressed (up to user to know) - */ - , int decode(void *src, void *dst, unsigned dstSz, unsigned *srcSz) - - /* compress file; returns non-zero on fail; optional if - * files are desired to be left decompressed - */ - , int encode(void *src, unsigned srcSz, void *dst, unsigned *dstSz, void *ctx) - - /* test if file has been previously encoded; optional */ - , int exist(void *src, unsigned srcSz, void *dst, unsigned *dstSz) -); - -#endif /* Z64YAR_H_INCLUDED */ - diff --git a/tools/z64compress/src/enc/yaz.c b/tools/z64compress/src/enc/yaz.c deleted file mode 100644 index a6897a7fd3..0000000000 --- a/tools/z64compress/src/enc/yaz.c +++ /dev/null @@ -1,464 +0,0 @@ -#include -#include -#include -#include -#include "stretchy_buffer.h" - -struct yazCtx -{ - uint16_t *c; - uint32_t *cmds; - uint16_t *ctrl; - uint8_t *raws; - uint8_t *ctl; - uint8_t *back; - int *return_data; -}; - -void yazCtx_free(void *_ctx) -{ - struct yazCtx *ctx = _ctx; - - if (!ctx) - return; - - free(ctx->return_data); - sb_free(ctx->c); - sb_free(ctx->raws); - sb_free(ctx->ctrl); - sb_free(ctx->cmds); - sb_free(ctx->ctl); - sb_free(ctx->back); -} - -void *yazCtx_new(void) -{ - struct yazCtx *ctx = calloc(1, sizeof(*ctx)); - - if (!ctx) - return 0; - - /* allocate everything */ - ctx->c = sb_add(ctx->c, 32); - ctx->return_data = malloc(2 * sizeof(*ctx->return_data)); - ctx->raws = sb_add(ctx->raws, 32); - ctx->ctrl = sb_add(ctx->ctrl, 32); - ctx->cmds = sb_add(ctx->cmds, 32); - ctx->ctl = sb_add(ctx->ctl , 32); - ctx->back = sb_add(ctx->back, 32); - - return ctx; -} - -// MIO0 encoding -#define MIx 0 - -#define min(MINA, MINB) ( ( (MINA)<(MINB) ) ? (MINA) : (MINB) ) -#define max(MAXA, MAXB) ( ( (MAXA)>(MAXB) ) ? (MAXA) : (MAXB) ) - -#define U32b(u32X) ((u32X)[0]<<24|(u32X)[1]<<16|(u32X)[2]<<8|(u32X)[3]) -#define U16b(u32X) ((u32X)[0]<<8|(u32X)[1]) -#define U32wr(u32DST,u32SRC) (*(u32DST+0))=((u32SRC)>>24)&0xFF,\ - (*(u32DST+1))=((u32SRC)>>16)&0xFF,\ - (*(u32DST+2))=((u32SRC)>>8)&0xFF,\ - (*(u32DST+3))=((u32SRC)>>0)&0xFF -#define U16wr(u16DST,u16SRC) (*(u16DST+0))=((u16SRC)>>8)&0xFF,\ - (*(u16DST+1))=((u16SRC)>>0)&0xFF - -static uint16_t *_enc_next_cpy(struct yazCtx *ctx, uint8_t *back) { - stb__sbn(ctx->c)=0; // initialize count to 0 - int x; - for (x=0; x < (sb_count(back) & (0xFFFFFFFE)); x += 2) { - sb_push(ctx->c, (back[x]<<8) | back[x+1]); - } - return ctx->c; -} - -static uint32_t _enc_z_from_tables(struct yazCtx *ctx, uint8_t *ctl, uint8_t *back, uint8_t *values, uint8_t *output, int dec_s, const char *mode) { - //_enc_next_cpy(NULL); - uint8_t *b=ctl, *v=values; - uint16_t *c = _enc_next_cpy(ctx, back); - uint32_t bit=0x10000, output_position=0; - // if dec_s declared, will keep accurate track - while (dec_s > 0) { - // get next bit - if (bit > 0xFFFF) { - bit = b[0]; - b++; - output[output_position++] = bit & 0xFF; - bit |= 0x100; - } - // catch end of control commands - if (bit & 0x80) { - output[output_position++] = v[0]; - v++; - dec_s--; - } else { - uint16_t val=c[0]; - c++; - output[output_position++] = ((val>>8)&0xFF); - output[output_position++] = ((val)&0xFF); - - // decrement dec_s accurately with length - val>>=12; - val&=0xF; - if(MIx) - dec_s--; - else if(val==0) { - val = v[0]; - v++; - output[output_position++]=val; - val+=16; - } - dec_s -= val+2; - } - bit <<= 1; - } - return output_position; -} - -static int _enc_find(struct yazCtx *ctx, uint8_t *array, uint8_t *needle, int needle_len, int start_index, int source_length) { - while(start_index < (source_length - needle_len + 1)) { - int r, index = -1; - for(r=start_index; r < (source_length - needle_len + 1); r++) { - if(array[r]==needle[0]) { - index=r; - break; - } - } - - // if we did not find even the first element, the search has failed - if (index == -1) - return -1; - - int i, p; - // check for needle - for (i = 0, p = index; i < needle_len; i++, p++) { - if (array[p] != needle[i]) - break; - } - if(i==needle_len) { - // needle was found - return index; - } - // continue to search for needle - start_index = index + 1; - } - return -1; -} - -static int *_enc_search(struct yazCtx *ctx, uint8_t *data, uint32_t pos, uint32_t sz, uint32_t cap/*=0x111*/) { - int *return_data = ctx->return_data; - // this is necessary unless pos is signed, so let's play it safe - int mp = (pos>0x1000)?(pos-0x1000):0; - int ml = min(cap, sz - pos); - if(ml<3) { - return_data[0]=return_data[1]=0; - return return_data; - } - int - hitp = 0, - hitl = 3, - hl = -1 - ; - - if (mp < pos) { - hl = _enc_find(ctx, data+mp, data+pos, hitl, 0, pos + hitl - mp); - while (hl < (pos - mp)) { - while ((hitl < ml) && (data[pos + hitl] == data[mp + hl + hitl]) ) { - hitl += 1; - } - mp += hl; - hitp = mp; - if (hitl == ml) { - return_data[0] = hitp; - return_data[1] = hitl; - return return_data; - } - mp += 1; - hitl += 1; - if (mp >= pos) - break; - hl = _enc_find(ctx, data+mp, data+pos, hitl, 0, pos + hitl - mp); - } - } - - // if length < 4, return miss - if (hitl < 4) - hitl = 1; - - return_data[0] = hitp; - return_data[1] = hitl-1; - return return_data; -} - -static -uint32_t encode(struct yazCtx *ctx, uint8_t *data, uint32_t data_size, uint8_t *output, const char *mode) { - uint32_t - cap=0x111, - sz=data_size, - pos=0, - flag=0x80000000 - ; - // initialize count of each to 0 - stb__sbn(ctx->raws)=0; - stb__sbn(ctx->ctrl)=0; - stb__sbn(ctx->cmds)=0; - - sb_push(ctx->cmds, 0); - - if(data_size==0) { - memcpy(output, mode, 4); - int i; - for(i=4; i<16; i++) - output[i]=0x00; - return 16; - } - while(posraws, data[pos]); - ctx->cmds[sb_count(ctx->cmds)-1] |= flag; - pos += 1; - } else { - search_return = _enc_search(ctx, data, pos+1, sz, cap); - int tstp = search_return[0]; - int tstl = search_return[1]; - - if ((hitl + 1) < tstl) { - sb_push(ctx->raws, data[pos]); - ctx->cmds[sb_count(ctx->cmds)-1] |= flag; - pos += 1; - flag >>= 1; - if (flag == 0) { - flag = 0x80000000; - sb_push(ctx->cmds, 0); - } - hitl = tstl; - hitp = tstp; - } - int e = pos - hitp - 1; - pos += hitl; - // handle MIx first, then Yax conditions - if (cap == 0x12) { - hitl -= 3; - sb_push(ctx->ctrl, (hitl<<12) | e); - } else if (hitl < 0x12) { - hitl -= 2; - sb_push(ctx->ctrl, (hitl<<12)|e); - } else { - sb_push(ctx->ctrl, e); - sb_push(ctx->raws, hitl - 0x12); - } - } - // advance the flag and refill if required - flag >>= 1; - if (flag == 0) { - flag = 0x80000000; - sb_push(ctx->cmds, 0);//cmds.push_back(0); - } - } - - // if no cmds in final word, delete it - if (flag == 0x80000000) { - stb__sbn(ctx->cmds) -= 1;//cmds.erase(cmds.end()-1); - } - - // block and stream differentiation - // Yay is block, Yaz is stream - int mode_block=1, mode_stream=1; // temporary, for testing - mode_block=!strcmp(mode,"Yay0"); - if (mode_block ) { - uint32_t l = (sb_count(ctx->cmds) << 2) + 16; - uint32_t o = (sb_count(ctx->ctrl) << 1) + l; - memcpy(output, mode, 4); - U32wr(output+4, sz); - U32wr(output+8, l); - U32wr(output+12, o); - - uint32_t output_position = 16; - uint32_t x; - for (x=0; xcmds); x++) { - U32wr(output+output_position, ctx->cmds[x]); - output_position+=4; - } - for (x=0; xctrl); x++) { - U16wr(output+output_position, ctx->ctrl[x]); - output_position+=2; - } - for (x=0; xraws); x++) { - output[output_position++] = ctx->raws[x]; - } - return output_position; - } else if(mode_stream) { - memcpy(output, mode, 4); - U32wr(output+4, sz); - U32wr(output+8, 0); - U32wr(output+12, 0); - - uint32_t output_position = 0; - stb__sbn(ctx->ctl)=0; // initialize count to 0 - stb__sbn(ctx->back)=0; // initialize count to 0 - uint32_t x; - for (x=0; x < sb_count(ctx->cmds); x++) { - sb_push(ctx->ctl, (ctx->cmds[x]>>24)&0xFF); - sb_push(ctx->ctl, (ctx->cmds[x]>>16)&0xFF); - sb_push(ctx->ctl, (ctx->cmds[x]>>8)&0xFF); - sb_push(ctx->ctl, (ctx->cmds[x])&0xFF); - } - for (x=0; x < sb_count(ctx->ctrl); x++) { - sb_push(ctx->back, (ctx->ctrl[x]>>8)&0xFF); - sb_push(ctx->back, (ctx->ctrl[x])&0xFF); - } - output_position = _enc_z_from_tables(ctx, ctx->ctl, ctx->back, ctx->raws, output+16, data_size, mode); - return 16 + output_position; - } - return 0; -} - - -int -yazenc( - void *_src - , unsigned src_sz - , void *_dst - , unsigned *dst_sz - , void *_ctx -) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - if (!_ctx) - return 1; - *dst_sz = encode(_ctx, src, src_sz, dst, "Yaz0"); - return 0; -} - -/* yaz decoder, courtesy of spinout182 */ -int -yazdec(void *_src, void *_dst, unsigned dstSz, unsigned *srcSz) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - - int srcPlace = 0, dstPlace = 0; /*current read/write positions*/ - - unsigned int validBitCount = 0; /*number of valid bits left in "code" byte*/ - unsigned char currCodeByte = 0; - - int uncompressedSize = dstSz; - - src += 0x10; - - while(dstPlace < uncompressedSize) - { - /*read new "code" byte if the current one is used up*/ - if(!validBitCount) - { - currCodeByte = src[srcPlace]; - ++srcPlace; - validBitCount = 8; - } - - if(currCodeByte & 0x80) - { - /*direct copy*/ - dst[dstPlace] = src[srcPlace]; - dstPlace++; - srcPlace++; - } - else - { - /*RLE part*/ - unsigned char byte1 = src[srcPlace]; - unsigned char byte2 = src[srcPlace + 1]; - srcPlace += 2; - - unsigned int dist = ((byte1 & 0xF) << 8) | byte2; - unsigned int copySource = dstPlace - (dist + 1); - - unsigned int numBytes = byte1 >> 4; - if(numBytes) - numBytes += 2; - else - { - numBytes = src[srcPlace] + 0x12; - srcPlace++; - } - - /*copy run*/ - int i; - for(i = 0; i < numBytes; ++i) - { - dst[dstPlace] = dst[copySource]; - copySource++; - dstPlace++; - } - } - - /*use next bit from "code" byte*/ - currCodeByte <<= 1; - validBitCount-=1; - } - - if (srcSz) - *srcSz = srcPlace; - - return 0; -} - -#ifdef YAZ_MAIN_TEST - -#define FERR(x) { \ - fprintf(stderr, x); \ - fprintf(stderr, "\n"); \ - exit(EXIT_FAILURE); \ -} - -int main(int argc, char* argv[]) -{ - FILE *fp; - struct yazCtx *ctx; - unsigned size; - - if(argc < 2) - FERR("args: yazenc in.raw > out.yaz"); - - fp = fopen(argv[1], "rb"); - if(fp == NULL) - FERR("failed to open file"); - - fseek(fp, 0, SEEK_END); - size = ftell(fp); - fseek(fp, 0, SEEK_SET); - - fprintf(stderr, "input file size: %d\n", size); - - void *buf = malloc(size); - void *outbuf = malloc( (size + 64) * 2); - - if (fread(buf, 1, size, fp) != size) - FERR("failed to read file"); - - fclose(fp); - - ctx = yazCtx_new(); - if (yazenc(buf, size, outbuf, &size, ctx)) - FERR("encoding error"); - - if (fwrite(outbuf, 1, size, stdout) != size) - FERR("failed to write stdout"); - - yazCtx_free(ctx); - free(buf); - free(outbuf); - return EXIT_SUCCESS; -} -#endif /* YAZ_MAIN_TEST */ - - diff --git a/tools/z64compress/src/enc/zx7.c b/tools/z64compress/src/enc/zx7.c deleted file mode 100644 index 4b4fdb0f9a..0000000000 --- a/tools/z64compress/src/enc/zx7.c +++ /dev/null @@ -1,37 +0,0 @@ -#if 0 -#include "zx7/zx7.h" -#include "zx7/optimize.c" -#include "zx7/compress.c" -#include "zx7/zx7.c" - -int -zx7enc( - void *_src - , unsigned src_sz - , void *_dst - , unsigned *dst_sz - , void *_ctx -) -{ - unsigned char *src = _src; - unsigned char *dst = _dst; - - int hlen = 8; /* header length; required due to MM's archives */ - memset(dst, 0, hlen); - memcpy(dst, "ZX70", 4); - dst[4] = (src_sz >> 24); - dst[5] = (src_sz >> 16); - dst[6] = (src_sz >> 8); - dst[7] = (src_sz >> 0); - - *dst_sz = ZX7Compress(src, src_sz, dst + hlen); - - if (!*dst_sz) - return 1; - - *dst_sz += hlen; - - return 0; -} -#endif - diff --git a/tools/z64compress/src/enc/zx7/compress.c b/tools/z64compress/src/enc/zx7/compress.c deleted file mode 100644 index 1df625e3df..0000000000 --- a/tools/z64compress/src/enc/zx7/compress.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * (c) Copyright 2012-2016 by Einar Saukas. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * The name of its author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "zx7.h" - -#if !TARGET_PRIZM - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -static unsigned char* c_output_data; -static unsigned int c_output_index; -static unsigned int c_bit_index; -static int c_bit_mask; - -static inline void c_write_byte(int value) { - c_output_data[c_output_index++] = value; -} - -static void c_write_bit(int value) { - if (c_bit_mask == 0) { - c_bit_mask = 128; - c_bit_index = c_output_index; - c_write_byte(0); - } - if (value > 0) { - c_output_data[c_bit_index] |= c_bit_mask; - } - c_bit_mask >>= 1; -} - -static void write_elias_gamma(int value) { - int i; - - for (i = 2; i <= value; i <<= 1) { - c_write_bit(0); - } - while ((i >>= 1) > 0) { - c_write_bit(value & i); - } -} - -unsigned char *compress( - Optimal *optimal - , unsigned char *input_data - , unsigned int input_size - , long skip - , unsigned int *output_size - , unsigned char *dst -) -{ - unsigned int input_index; - unsigned int input_prev; - int offset1; - int mask; - int i; - - /* calculate and allocate output buffer */ - input_index = input_size-1; - *output_size = (optimal[input_index].bits+18+7)/8 + 3; - unsigned char *ret = dst; - if (!ret) { - return 0; - } - - c_output_data = ret + 3; - - /* un-reverse optimal sequence */ - optimal[input_index].bits = 0; - while (input_index != skip) { - input_prev = input_index - (optimal[input_index].len > 0 ? optimal[input_index].len : 1); - optimal[input_prev].bits = input_index; - input_index = input_prev; - } - - c_output_index = 0; - c_bit_mask = 0; - - /* first byte is always literal */ - c_write_byte(input_data[input_index]); - - /* process remaining bytes */ - while ((input_index = optimal[input_index].bits) > 0) { - if (optimal[input_index].len == 0) { - - /* literal indicator */ - c_write_bit(0); - - /* literal value */ - c_write_byte(input_data[input_index]); - - } else { - - /* sequence indicator */ - c_write_bit(1); - - /* sequence length */ - write_elias_gamma(optimal[input_index].len-1); - - /* sequence offset */ - offset1 = optimal[input_index].offset-1; - if (offset1 < 128) { - c_write_byte(offset1); - } else { - offset1 -= 128; - c_write_byte((offset1 & 127) | 128); - for (mask = 1024; mask > 127; mask >>= 1) { - c_write_bit(offset1 & mask); - } - } - } - } - - /* sequence indicator */ - c_write_bit(1); - - /* end marker > MAX_LEN */ - for (i = 0; i < 16; i++) { - c_write_bit(0); - } - c_write_bit(1); - - // decompressed size is first three bytes - ret[0] = (input_size & 0xFF0000) >> 16; - ret[1] = (input_size & 0x00FF00) >> 8; - ret[2] = (input_size & 0x0000FF); - - return ret; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/tools/z64compress/src/enc/zx7/dzx7.c b/tools/z64compress/src/enc/zx7/dzx7.c deleted file mode 100644 index 5909f31f7a..0000000000 --- a/tools/z64compress/src/enc/zx7/dzx7.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * (c) Copyright 2015 by Einar Saukas. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * The name of its author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "zx7.h" - -#ifdef __cplusplus -extern "C" { -#endif - -static unsigned char *d_input_data; -static unsigned char *d_output_data; -static unsigned int d_input_index; -static unsigned int d_output_index; -static unsigned int d_input_size; -static int bit_mask; -static int bit_value; - -static -int d_read_byte(void) { - return d_input_data[d_input_index++]; -} - -static -int d_read_bit(void) { - bit_mask >>= 1; - if (bit_mask == 0) { - bit_mask = 128; - bit_value = d_read_byte(); - } - return bit_value & bit_mask ? 1 : 0; -} - -static -int read_elias_gamma(void) { - int i; - int value; - - i = 0; - while (!d_read_bit()) { - i++; - } - if (i > 15) { - return -1; - } - value = 1; - while (i--) { - value = value << 1 | d_read_bit(); - } - return value; -} - -int read_offset(void) { - int value; - int i; - - value = d_read_byte(); - if (value < 128) { - return value; - } else { - i = d_read_bit(); - i = i << 1 | d_read_bit(); - i = i << 1 | d_read_bit(); - i = i << 1 | d_read_bit(); - return ((value & 127) | (i << 7)) + 128; - } -} - -static -void d_write_byte(int value) { - d_output_data[d_output_index++] = value; -} - -void d_write_bytes(int offset, int length) { - int i; - while (length-- > 0) { - i = d_output_index-offset; - d_write_byte(d_output_data[i]); - } -} - -unsigned int ZX7GetDecompressedSize(unsigned char* compressedData) { - return compressedData[0] * 65536 + compressedData[1] * 256 + compressedData[2]; -} - -int ZX7Decompress(unsigned char* srcData, unsigned char* destData, unsigned int destLength) { - if (destLength < ZX7GetDecompressedSize(srcData) || !srcData || !destData) { - return -1; - } - - int length; - - d_input_data = srcData + 3; - d_output_data = destData; - - d_input_size = 0; - d_input_index = 0; - d_output_index = 0; - bit_mask = 0; - - d_write_byte(d_read_byte()); - while (1) { - if (!d_read_bit()) { - d_write_byte(d_read_byte()); - } else { - length = read_elias_gamma()+1; - if (length == 0) { - return 0; - } - d_write_bytes(read_offset()+1, length); - } - } -} - -#ifdef __cplusplus -} -#endif diff --git a/tools/z64compress/src/enc/zx7/optimize.c b/tools/z64compress/src/enc/zx7/optimize.c deleted file mode 100644 index e0d59396d8..0000000000 --- a/tools/z64compress/src/enc/zx7/optimize.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * (c) Copyright 2012-2016 by Einar Saukas. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * The name of its author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "zx7.h" - -#if !TARGET_PRIZM - -#ifdef __cplusplus -extern "C" { -#endif - - -#include -#include /* memset */ - -/* reusable memory (free using zx7_shutdown()) */ -static unsigned int *min = 0; -static unsigned int *max = 0; -static unsigned int *matches = 0; -static unsigned int *match_slots = 0; -static Optimal *optimal = 0; - -void -zx7_shutdown(void) -{ - if (min) - free(min); - if (max) - free(max); - if (matches) - free(matches); - if (match_slots) - free(match_slots); - if (optimal) - free(optimal); -} - -static int elias_gamma_bits(int value) { - int bits; - - bits = 1; - while (value > 1) { - bits += 2; - value >>= 1; - } - return bits; -} - -static int count_bits(int offset, int len) { - return 1 + (offset > 128 ? 12 : 8) + elias_gamma_bits(len-1); -} - -Optimal *optimize( - unsigned char *input_data - , unsigned int input_size - , unsigned long skip -) { - - unsigned int *match; - int match_index; - int offset; - unsigned int len; - unsigned int best_len; - unsigned int bits; - unsigned int i; - - /* allocate all data structures at once */ - if (!min) - min = malloc((MAX_OFFSET+1) * sizeof(*min)); - if (!max) - max = malloc((MAX_OFFSET+1) * sizeof(*max)); - if (!matches) - matches = malloc(256 * 256 * sizeof(*matches)); - if (!match_slots) - match_slots = malloc(input_size * sizeof(*match_slots)); - if (!optimal) - optimal = malloc(input_size * sizeof(*optimal)); - - if (!min || !max || !matches || !match_slots || !optimal) - return 0; - - memset(min, 0, (MAX_OFFSET+1) * sizeof(*min)); - memset(max, 0, (MAX_OFFSET+1) * sizeof(*max)); - memset(matches, 0, 256 * 256 * sizeof(*matches)); - memset(match_slots, 0, input_size * sizeof(*match_slots)); - memset(optimal, 0, input_size * sizeof(*optimal)); - - /* index skipped bytes */ - for (i = 1; i <= skip; i++) { - match_index = input_data[i-1] << 8 | input_data[i]; - match_slots[i] = matches[match_index]; - matches[match_index] = i; - } - - /* first byte is always literal */ - optimal[skip].bits = 8; - - /* process remaining bytes */ - for (; i < input_size; i++) { - - optimal[i].bits = optimal[i-1].bits + 9; - match_index = input_data[i-1] << 8 | input_data[i]; - best_len = 1; - for (match = &matches[match_index]; *match != 0 && best_len < MAX_LEN; match = &match_slots[*match]) { - offset = i - *match; - if (offset > MAX_OFFSET) { - *match = 0; - break; - } - - for (len = 2; len <= MAX_LEN && i >= skip+len; len++) { - if (len > best_len) { - best_len = len; - bits = optimal[i-len].bits + count_bits(offset, len); - if (optimal[i].bits > bits) { - optimal[i].bits = bits; - optimal[i].offset = offset; - optimal[i].len = len; - } - } else if (max[offset] != 0 && i+1 == max[offset]+len) { - len = i-min[offset]; - if (len > best_len) { - len = best_len; - } - } - if (i < offset+len || input_data[i-len] != input_data[i-len-offset]) { - break; - } - } - min[offset] = i+1-len; - max[offset] = i; - } - match_slots[i] = matches[match_index]; - matches[match_index] = i; - } - - return optimal; -} - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/tools/z64compress/src/enc/zx7/zx7.c b/tools/z64compress/src/enc/zx7/zx7.c deleted file mode 100644 index 06f65d3748..0000000000 --- a/tools/z64compress/src/enc/zx7/zx7.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (c) Copyright 2012-2016 by Einar Saukas. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * The name of its author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "zx7.h" - -#if !TARGET_PRIZM - -#ifdef __cplusplus -extern "C" { -#endif - -// ZX7 Compress the given data, outData is malloc'd and the return value is the length (first 3 bytes of data will be 24-bit size result for convenience) -unsigned int ZX7Compress(unsigned char *srcData, unsigned int inLength, unsigned char *outData) { - unsigned int output_size; - compress(optimize(srcData, inLength, 0), srcData, inLength, 0, &output_size, outData); - - return output_size; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/tools/z64compress/src/enc/zx7/zx7.h b/tools/z64compress/src/enc/zx7/zx7.h deleted file mode 100644 index a3a4e6cdaf..0000000000 --- a/tools/z64compress/src/enc/zx7/zx7.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * (c) Copyright 2012-2016 by Einar Saukas. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * The name of its author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#if !TARGET_PRIZM - -typedef struct optimal_t { - unsigned int bits; - int offset; - int len; -} Optimal; - -#define MAX_OFFSET 2176 /* range 1..2176 */ -#define MAX_LEN 65536 /* range 2..65536 */ - -Optimal *optimize(unsigned char *input_data, unsigned int input_size, unsigned long skip); - -unsigned char *compress(Optimal *optimal, unsigned char *input_data, unsigned int input_size, long skip, unsigned int *output_size, unsigned char *dst); - -// THOMAS : added these for my use: - -// ZX7 Compress the given data, outData is malloc'd and the return value is the length (first 3 bytes of data will be 24-bit size result for convenience) -unsigned int ZX7Compress(unsigned char *srcData, unsigned int inLength, unsigned char *outData); - -#endif - -// Get decompressed size of ZX7Compress'd data -unsigned int ZX7GetDecompressedSize(unsigned char* compressedData); - -// Decompress the given data. Returns 0 with no errors -int ZX7Decompress(unsigned char* srcData, unsigned char* destData, unsigned int destLength); - -/* free reusable buffers */ -void -zx7_shutdown(void); - -#ifdef __cplusplus -} -#endif diff --git a/tools/z64compress/src/main.c b/tools/z64compress/src/main.c deleted file mode 100644 index bd044059d1..0000000000 --- a/tools/z64compress/src/main.c +++ /dev/null @@ -1,379 +0,0 @@ -#include -#include -#include -#include -#include - -#include "wow.h" -#include "rom.h" - -FILE* printer; - -static void compress(struct rom *rom, int start, int end) -{ - rom_dma_compress(rom, start, end, 1); -} - -static void skip(struct rom *rom, int start, int end) -{ - rom_dma_compress(rom, start, end, 0); -} - -static void repack(struct rom *rom, int start, int end) -{ - rom_dma_repack( - rom - , start - , end - , "yaz" /* old codec */ - , 0 /* new codec */ - ); -} - -static void do_pattern( - struct rom *rom - , const char *str - , void func(struct rom *rom, int start, int end) -) -{ - const char *Ostr = str; - int last_int = -1; - int last_op = 0; - int cur; - int len; - - while (*str) - { - if (*str == '\'' || *str == '"') - { - ++str; - continue; - } - - /* calculate length of current token */ - len = strspn(str, "0123456789xXaAbBcCdDeEfF"); /* allow hex */ - if (!len) /* no len, assume it's an operator */ - len = 1; - - /* is a number or variable */ - if (isdigit(*str) || !strncmp(str, "END", 3)) - { - /* 'END' is shorthand for last entry */ - if (!strncmp(str, "END", 3)) - { - cur = rom_dma_num(rom); - str += 2; - } - - /* otherwise, it's a number */ - else - sscanf(str, "%i", &cur); - - if (cur < last_int) - die( - "invalid pattern '%s'; " - "values are not in ascending order" - , Ostr - ); - - /* apply operations on item(s) */ - if (last_op == '-') - func(rom, last_int, cur); - else - func(rom, cur, cur); - - /* prevents processing this item - * again when 'through' is used - */ - cur += 1; - } - - /* 'through' or 'single item', respectively */ - else if (*str == '-' || *str == ',') - { - if (last_int < 0) - die( - "invalid pattern '%s'; " - "pattern does not begin with number" - , Ostr - ); - last_op = *str; - } - - /* unknown character encountered */ - else - { - die( - "invalid pattern '%s'; " - "encountered unknown operator '%c'" - , Ostr - , *str - ); - } - - /* advance */ - str += len; - last_int = cur; - } -} - -static void usage(void) -{ - /* compression examples for users to adapt to their needs */ - fprintf(printer, "\n"); - fprintf(printer, " compressing oot debug\n"); - fprintf(printer, " --in \"path/to/in.z64\"\n"); - fprintf(printer, " --out \"path/to/out.z64\"\n"); - fprintf(printer, " --mb 32\n"); - fprintf(printer, " --codec yaz\n"); - fprintf(printer, " --cache \"path/to/cache\"\n"); - fprintf(printer, " --dma \"0x12F70,1548\"\n"); - fprintf(printer, " --compress \"9-14,28-END\"\n"); - fprintf(printer, " --threads 4\n"); - fprintf(printer, "\n"); - fprintf(printer, " compressing oot ntsc 1.0\n"); - fprintf(printer, " --in \"path/to/in.z64\"\n"); - fprintf(printer, " --out \"path/to/out.z64\"\n"); - fprintf(printer, " --mb 32\n"); - fprintf(printer, " --codec yaz\n"); - fprintf(printer, " --cache \"path/to/cache\"\n"); - fprintf(printer, " --dma \"0x7430,1526\"\n"); - fprintf(printer, " --compress \"10-14,27-END\"\n"); - fprintf(printer, " --threads 4\n"); - fprintf(printer, "\n"); - fprintf(printer, " compressing mm usa\n"); - fprintf(printer, " --in \"path/to/in.z64\"\n"); - fprintf(printer, " --out \"path/to/out.z64\"\n"); - fprintf(printer, " --mb 32\n"); - fprintf(printer, " --codec yaz\n"); - fprintf(printer, " --cache \"path/to/cache\"\n"); - fprintf(printer, " --dma \"0x1A500,1568\"\n"); - fprintf(printer, " --compress \"10-14,23,24,31-END\"\n"); - fprintf(printer, " --skip \"1127\"\n"); - fprintf(printer, " --repack \"15-20,22\"\n"); - fprintf(printer, " --threads 4\n"); - fprintf(printer, "\n"); - fprintf(printer, " arguments\n"); - fprintf(printer, " --in uncompressed input rom\n"); - fprintf(printer, "\n"); - fprintf(printer, " --out compressed output rom\n"); - fprintf(printer, "\n"); - fprintf(printer, " --matching attempt matching compression at the cost of\n"); - fprintf(printer, " some optimizations and reduced performance\n"); - fprintf(printer, "\n"); - fprintf(printer, " --mb how many mb the compressed rom should be\n"); - fprintf(printer, "\n"); - fprintf(printer, " --codec currently supported codecs\n"); - fprintf(printer, " yaz\n"); - fprintf(printer, " ucl\n"); - fprintf(printer, " lzo\n"); - fprintf(printer, " aplib\n"); - fprintf(printer, " * to use non-yaz codecs, find patches\n"); - fprintf(printer, " and code on my z64enc repo\n"); - fprintf(printer, "\n"); - fprintf(printer, " --cache is optional and won't be created if\n"); - fprintf(printer, " no path is specified (having a cache\n"); - fprintf(printer, " makes subsequent compressions faster)\n"); - fprintf(printer, " * pro-tip: linux users who don't want a\n"); - fprintf(printer, " cache to persist across power cycles\n"); - fprintf(printer, " can use the path \"/tmp/z64compress\"\n"); - fprintf(printer, "\n"); - fprintf(printer, " --dma specify dmadata address and count\n"); - fprintf(printer, "\n"); - fprintf(printer, " --compress enable compression on specified files\n"); - fprintf(printer, "\n"); - fprintf(printer, " --skip disable compression on specified files\n"); - fprintf(printer, "\n"); - fprintf(printer, " --repack handles Majora's Mask archives\n"); - fprintf(printer, "\n"); - fprintf(printer, " --threads optional multithreading;\n"); - fprintf(printer, " exclude this argument to disable it\n"); - fprintf(printer, "\n"); - fprintf(printer, " --only-stdout reserve stderr for errors and print\n"); - fprintf(printer, " everything else to stdout\n"); - fprintf(printer, "\n"); - fprintf(printer, " arguments are executed as they\n"); - fprintf(printer, " are parsed, so order matters!\n"); - fprintf(printer, "\n"); -} - -wow_main -{ - struct rom *rom = 0; - const char *Ain = 0; - const char *Aout = 0; - const char *Adma = 0; - const char *Acodec = 0; - const char *Acache = 0; - int Amb = 0; - int Athreads = 0; - bool Amatching = false; - bool Aonly_stdout = false; - wow_main_argv; - - printer = stderr; - for (int i = 1; i < argc; ++i) - { - if (!strcmp(argv[i], "--only-stdout")) - { - setvbuf(stdout, NULL, _IONBF, 0); - printer = stdout; - } - } - - fprintf(printer, "welcome to z64compress 1.0.2 \n"); - - if (argc <= 1) - { - usage(); - return EXIT_FAILURE; - } - - /* hacky argument handling */ - for (int i = 1; i < argc; i += 2) - { - const char *arg = argv[i]; - - /* arguments that do not require additional parameters */ - - if(!strcmp(arg, "--only-stdout")) - { - if (Aonly_stdout) - die("--only-stdout arg provided more than once"); - // handled above - Aonly_stdout = true; - i--; - continue; - } - else if (!strcmp(arg, "--matching")) - { - if (Amatching) - die("--matching arg provided more than once"); - Amatching = true; - i--; - continue; - } - - /* arguments with additional parameters */ - - const char *next = argv[i + 1]; - - if (!next) - die("%s missing parameter", arg); - - if (!strcmp(arg, "--in")) - { - if (Ain) - die("--in arg provided more than once"); - Ain = next; - rom = rom_new(Ain); - } - else if (!strcmp(arg, "--out")) - { - if (Aout) - die("--out arg provided more than once"); - Aout = next; - } - else if (!strcmp(arg, "--cache")) - { - if (Acache) - die("--cache arg provided more than once"); - Acache = next; - rom_set_cache(rom, Acache); - } - else if (!strcmp(arg, "--codec")) - { - if (Acodec) - die("--codec arg provided more than once"); - if (!Ain) - die("--dma arg provided before --in arg"); - Acodec = next; - rom_set_codec(rom, Acodec); - } - else if (!strcmp(arg, "--dma")) - { - int num; - int start = 0; - - if (!Acodec) - die("--dma arg provided before --codec arg"); - if (!Ain) - die("--dma arg provided before --in arg"); - if (Adma) - die("--dma arg provided more than once"); - Adma = next; - if (sscanf(Adma, "%i,%i", &start, &num) != 2) - die("--dma bad formatting '%s'", Adma); - rom_dma(rom, start, num, Amatching); - } - else if (!strcmp(arg, "--mb")) - { - if (Amb) - die("--mb arg provided more than once"); - if (sscanf(next, "%i", &Amb) != 1) - die("--mb could not get value from string '%s'", next); - if (Amb <= 0) - die("--mb invalid value %d", Amb); - } - else if (!strcmp(arg, "--compress")) - { - if (!Adma) - die("--compress arg provided before --dma arg"); - do_pattern(rom, next, compress); - } - else if (!strcmp(arg, "--skip")) - { - if (!Adma) - die("--skip arg provided before --dma arg"); - do_pattern(rom, next, skip); - } - else if (!strcmp(arg, "--repack")) - { - if (!Adma) - die("--repack arg provided before --dma arg"); - if (!Acodec) - die("--repack arg provided before --codec arg"); - do_pattern(rom, next, repack); - } - else if(!strcmp(arg, "--threads")) - { - if (Athreads) - die("--threads arg provided more than once"); - if (sscanf(next, "%i", &Athreads) != 1) - die("--threads could not get value from string '%s'", next); - if (Athreads < 0) - die("--threads invalid value %d", Athreads); - } - else - { - die("unknown argument '%s'", arg); - } - } - - #define ARG_ZERO_TEST(TEST, NAME) \ - if (!(TEST)) \ - die("no " NAME " arg provided") - - ARG_ZERO_TEST(Ain , "--in" ); - ARG_ZERO_TEST(Aout , "--out" ); - ARG_ZERO_TEST(Acodec, "--codec"); - - #undef ARG_ZERO_TEST - - /* finished initializing dma settings */ - rom_dma_ready(rom, Amatching); - - /* compress rom */ - rom_compress(rom, Amb, Athreads, Amatching); - fprintf(printer, "rom compressed successfully!\n"); - - /* write compressed rom */ - rom_save(rom, Aout); - fprintf(printer, "compressed rom written successfully!\n"); - - /* cleanup */ - rom_free(rom); - - return EXIT_SUCCESS; -} - diff --git a/tools/z64compress/src/n64crc.c b/tools/z64compress/src/n64crc.c deleted file mode 100644 index a34d646eac..0000000000 --- a/tools/z64compress/src/n64crc.c +++ /dev/null @@ -1,197 +0,0 @@ -/* snesrc - SNES Recompiler - * - * Mar 23, 2010: addition by spinout to actually fix CRC if it is incorrect - * - * Copyright notice for this file: - * Copyright (C) 2005 Parasyte - * - * Based on uCON64's N64 checksum algorithm by Andreas Sterbenz - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#define ROL(i, b) (((i) << (b)) | ((i) >> (32 - (b)))) -#define BYTES2LONG(b) ( (b)[0] << 24 | \ - (b)[1] << 16 | \ - (b)[2] << 8 | \ - (b)[3] ) - -#define N64_HEADER_SIZE 0x40 -#define N64_BC_SIZE (0x1000 - N64_HEADER_SIZE) - -#define N64_CRC1 0x10 -#define N64_CRC2 0x14 - -#define CHECKSUM_START 0x00001000 -#define CHECKSUM_LENGTH 0x00100000 -#define CHECKSUM_CIC6102 0xF8CA4DDC -#define CHECKSUM_CIC6103 0xA3886759 -#define CHECKSUM_CIC6105 0xDF26F436 -#define CHECKSUM_CIC6106 0x1FEA617A - - -static void gen_table(unsigned int crc_table[256]) -{ - unsigned int crc, poly; - int i, j; - - poly = 0xEDB88320; - for (i = 0; i < 256; i++) { - crc = i; - for (j = 8; j > 0; j--) { - if (crc & 1) crc = (crc >> 1) ^ poly; - else crc >>= 1; - } - crc_table[i] = crc; - } -} - - -static unsigned int crc32( - unsigned int crc_table[256] - , unsigned char *data - , int len -) -{ - unsigned int crc = ~0; - int i; - - for (i = 0; i < len; i++) { - crc = (crc >> 8) ^ crc_table[(crc ^ data[i]) & 0xFF]; - } - - return ~crc; -} - - -static int N64GetCIC(unsigned int crc_table[256], unsigned char *data) -{ - switch (crc32(crc_table, &data[N64_HEADER_SIZE], N64_BC_SIZE)) { - case 0x6170A4A1: return 6101; - case 0x90BB6CB5: return 6102; - case 0x0B050EE0: return 6103; - case 0x98BC2C86: return 6105; - case 0xACC8580A: return 6106; - } - - return 0; -} - - -static int N64CalcCRC( - unsigned int crc_table[256] - , unsigned int *crc - , unsigned char *data -) -{ - int bootcode, i; - unsigned int seed; - unsigned int t1, t2, t3; - unsigned int t4, t5, t6; - unsigned int r, d; - - switch ((bootcode = N64GetCIC(crc_table, data))) { - case 6101: - case 6102: - seed = CHECKSUM_CIC6102; - break; - case 6103: - seed = CHECKSUM_CIC6103; - break; - case 6105: - seed = CHECKSUM_CIC6105; - break; - case 6106: - seed = CHECKSUM_CIC6106; - break; - default: - return 1; - } - - t1 = t2 = t3 = t4 = t5 = t6 = seed; - - i = CHECKSUM_START; - while (i < (CHECKSUM_START + CHECKSUM_LENGTH)) { - d = BYTES2LONG(&data[i]); - if ((t6 + d) < t6) - t4++; - t6 += d; - t3 ^= d; - r = ROL(d, (d & 0x1F)); - t5 += r; - if (t2 > d) - t2 ^= r; - else - t2 ^= t6 ^ d; - - if (bootcode == 6105) - t1 += BYTES2LONG(&data[N64_HEADER_SIZE + 0x0710 + (i & 0xFF)]) ^ d; - else - t1 += t5 ^ d; - - i += 4; - } - if (bootcode == 6103) { - crc[0] = (t6 ^ t4) + t3; - crc[1] = (t5 ^ t2) + t1; - } - else if (bootcode == 6106) { - crc[0] = (t6 * t4) + t3; - crc[1] = (t5 * t2) + t1; - } - else { - crc[0] = t6 ^ t4 ^ t3; - crc[1] = t5 ^ t2 ^ t1; - } - - return 0; -} - - -/* recalculate rom crc */ -void n64crc(void *rom) -{ - unsigned int crc_table[256]; - unsigned char CRC1[4]; - unsigned char CRC2[4]; - unsigned int crc[2]; - unsigned char *rom8 = rom; - - assert(rom); - - gen_table(crc_table); - - if (!N64CalcCRC(crc_table, crc, rom)) - { - unsigned int kk1 = crc[0]; - unsigned int kk2 = crc[1]; - int i; - - for (i = 0; i < 4; ++i) - { - CRC1[i] = (kk1 >> (24-8*i))&0xFF; - CRC2[i] = (kk2 >> (24-8*i))&0xFF; - } - - for (i = 0; i < 4; ++i) - *(rom8 + N64_CRC1 + i) = CRC1[i]; - - for (i = 0; i < 4; ++i) - *(rom8 + N64_CRC2 + i) = CRC2[i]; - } -} - diff --git a/tools/z64compress/src/n64crc.h b/tools/z64compress/src/n64crc.h deleted file mode 100644 index b5342dac62..0000000000 --- a/tools/z64compress/src/n64crc.h +++ /dev/null @@ -1,32 +0,0 @@ -/* snesrc - SNES Recompiler - * - * Mar 23, 2010: addition by spinout to actually fix CRC if it is incorrect - * - * Copyright notice for this file: - * Copyright (C) 2005 Parasyte - * - * Based on uCON64's N64 checksum algorithm by Andreas Sterbenz - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef N64CRC_H_INCLUDED -#define N64CRC_H_INCLUDED - -/* recalculate rom crc */ -void n64crc(void *rom); - -#endif /* N64CRC_H_INCLUDED */ - diff --git a/tools/z64compress/src/rom.c b/tools/z64compress/src/rom.c deleted file mode 100644 index 008597b524..0000000000 --- a/tools/z64compress/src/rom.c +++ /dev/null @@ -1,1698 +0,0 @@ -/* - * rom.c - * - * functions for compression magic reside herein - * - * z64me - * - */ - -#include -#include -#include -#include -#include -#include -#include - -/* POSIX dependencies */ -#include -#include -#include - -/* threading */ -#include - -#include "enc/enc.h" /* file compression */ -#include "enc/yar.h" /* MM archive tools */ - -#include "sha1.h" /* sha1 helpers */ -#include "n64crc.h" /* n64crc() */ - -#include "wow.h" -#include "wow_dirent.h" /* XXX always #include after dirent.h */ -#undef fopen -#undef fread -#undef fwrite -#undef remove -#define fopen wow_fopen -#define fread wow_fread -#define fwrite wow_fwrite -#define remove wow_remove - -extern FILE* printer; - -#define SIZE_16MB (1024 * 1024 * 16) -#define SIZE_4MB (1024 * 1024 * 4) - -#define DMA_DELETED 0xffffffff /* aka UINT32_MAX */ - -#define DMASORT(ROM, FUNC) \ - qsort( \ - ROM->dma \ - , ROM->dma_num \ - , sizeof(*(ROM->dma)) \ - , FUNC \ - ) - -#define DMASORT_N(ROM, FUNC, NUM) \ - qsort( \ - ROM->dma \ - , NUM \ - , sizeof(*(ROM->dma)) \ - , FUNC \ - ) - -#define DMA_FOR_EACH \ -for (dma = rom->dma; (unsigned)(dma - rom->dma) < rom->dma_num; ++dma) - -#define PROGRESS_A_B (int)(dma - rom->dma), rom->dma_num - -#define ALIGN(x, n) (((x) + ((n)-1)) & ~((n)-1)) -#define ALIGN16(x) ALIGN(x, 16) -#define ALIGN8MB(x) ALIGN(x, 8 * 0x100000) - -/* - * - * private types - * - */ - - -struct encoder -{ - int (*encfunc)( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx - ); - void *(*ctx_new)(void); - void (*ctx_free)(void *); -}; - - -struct dma -{ - char *compname; /* name of compressed file */ - void *compbuf; /* cache-less compressed data */ - unsigned int index; /* original index location */ - int compress; /* entry can be compressed */ - int deleted; /* points to deleted file */ - unsigned compSz; /* cache-less compressed size */ - unsigned int start; /* start offset */ - unsigned int end; /* end offset */ - unsigned int Pstart; /* start of physical (P) data */ - unsigned int Pend; /* end of physical (P) data */ - unsigned int Ostart; /* original (O) start */ - unsigned int Oend; /* original (O) end */ -}; - - -struct rom -{ - char *fn; /* filename of loaded rom */ - char *codec; /* compression codec */ - char *cache; /* compression cache */ - unsigned char *data; /* raw rom data */ - unsigned int data_sz; /* size of rom data */ - unsigned int ofs; /* offset where rom_write() writes */ - int is_comp; /* non-0 if rom has been compressed */ - struct dma *dma; /* dma array */ - unsigned int dma_num; /* number of entries in dma array */ - unsigned char *dma_raw; /* pointer to raw dmadata */ - int dma_ready; /* non-zero after dma_ready() */ - - /* memory pools for things like compression */ - struct - { - void *mb16; /* 16 mb */ - void *mb4; /* 4 mb */ - } mem; -}; - - -struct fldr_item -{ - char *name; /* name */ - void *udata; /* udata */ -}; - - -struct folder -{ - struct fldr_item *item; /* item array */ - int num; /* number of items in array */ - struct fldr_item *active; /* active item */ -}; - - -struct compThread -{ - struct rom *rom; - void *data; - int (*encfunc)( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx - ); - const char *codec; - char *dot_codec; - struct folder *list; - int stride; /* number of entries to advance each time */ - int ofs; /* starting entry in list */ - int report; /* report progress to stderr (last thread only) */ - void *ctx; /* compression context */ - bool matching; - pthread_t pt; /* pthread */ -}; - -/* - * - * private functions - * - */ - - -/* get 32-bit value from raw data */ -static int get32(void *_data) -{ - unsigned char *data = _data; - - return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; -} - - -/* get size of a file; returns 0 if fopen fails */ -static unsigned int file_size(const char *fn) -{ - FILE *fp; - unsigned int sz; - - fp = fopen(fn, "rb"); - if (!fp) - return 0; - - fseek(fp, 0, SEEK_END); - sz = ftell(fp); - fclose(fp); - - return sz; -} - -/* load a file into an existing buffer */ -static void *file_load_into( - const char *dir - , const char *fn - , unsigned int *sz - , void *dst -) -{ - FILE *fp; - - assert(fn); - assert(sz); - assert(dst); - - if (!dir) - dir = ""; - - *sz = 0; - - fp = fopen(fn, "rb"); - if (!fp) - die("failed to open '%s%s' for reading", dir, fn); - - fseek(fp, 0, SEEK_END); - *sz = ftell(fp); - - if (!*sz) - die("size of file '%s%s' is zero", dir, fn); - - fseek(fp, 0, SEEK_SET); - - if (fread(dst, 1, *sz, fp) != *sz) - die("failed to read contents of '%s%s'", dir, fn); - - fclose(fp); - - return dst; -} - -/* load a file */ -static void *file_load(const char *fn, unsigned int *sz) -{ - unsigned char *dst; - - assert(fn); - assert(sz); - - *sz = file_size(fn); - if (!*sz) - die("failed to get size of file '%s'", fn); - - dst = malloc_safe(*sz); - - return file_load_into(0, fn, sz, dst); -} - -/* write file */ -static unsigned int file_write( - const char *fn - , void *data - , unsigned int data_sz -) -{ - FILE *fp; - - assert(fn); - assert(data); - assert(data_sz); - - fp = fopen(fn, "wb"); - if (!fp) - return 0; - - data_sz = fwrite(data, 1, data_sz, fp); - - fclose(fp); - - return data_sz; -} - - -/* allocate a folder structure and parse current working directory */ -static struct folder *folder_new(void) -{ - wow_DIR *dir; - struct wow_dirent *ep; - struct fldr_item *item; - struct folder *folder; - char cwd[4096]; - int count = 0; - int recount = 0; - - /* allocate a folder */ - folder = calloc_safe(1, sizeof(*folder)); - - /* get current working directory for error reporting */ - wow_getcwd_safe(cwd, sizeof(cwd)); - - /* first pass: count the contents */ - dir = wow_opendir("."); - if (!dir) - die("failed to parse directory '%s'", cwd); - while ((ep = wow_readdir(dir))) - count += 1; - wow_closedir(dir); - - /* folder is empty */ - if (!count) - die("folder '%s' is empty", cwd); - - /* allocate item array */ - item = calloc_safe(count, sizeof(*item)); - folder->item = item; - folder->num = count; - - /* second pass: retrieve requested contents */ - dir = wow_opendir("."); - if (!dir) - die("failed to parse directory '%s'", cwd); - for ( - recount = 0 - ; (ep = wow_readdir(dir)) && recount < count - ; ++recount, ++item - ) - { - const char *dn; - - dn = (const char*)ep->d_name; - - /* skip names starting with '.' (covers both "." and "..") */ - if (*dn == '.') - continue; - - /* skip directories */ - if (wow_is_dir(dn)) - continue; - - /* make a copy of the string */ - item->name = strdup_safe(dn); - } - - if (recount != count) - die("contents of '%s' changed during read, try again", cwd); - wow_closedir(dir); - - return folder; -} - - -/* free a folder structure */ -static void folder_free(struct folder *folder) -{ - if (!folder) - return; - - /* folder contains items */ - if (folder->item) - { - struct fldr_item *item; - - /* walk item list, freeing resources owned by each */ - for ( - item = folder->item - ; item - folder->item < folder->num - ; ++item - ) - { - if (item->name) - free(item->name); - } - - /* free item list */ - free(folder->item); - } - - /* free folder */ - free(folder); -} - - -/* locate folder item by name, ignoring extension (such as '.raw') */ -static struct fldr_item *folder_findNameNoExt( - struct folder *folder - , char *name -) -{ - struct fldr_item *item; - - assert(folder); - assert(name); - - for ( - item = folder->item - ; item - folder->item < folder->num - ; ++item - ) - { - char *period; - int nchar; - - /* item has no name */ - if (!item->name) - continue; - - /* doesn't contain a period */ - if (!(period = strrchr(item->name, '.'))) - continue; - - /* number of bytes to compare */ - nchar = period - item->name; - - /* names match */ - if (!memcmp(item->name, name, nchar)) - return item; - } - - return 0; -} - - -/* retrieve encoder from name */ -static const struct encoder *encoder(const char *name) -{ - if (!strcmp(name, "yaz")) - { - static const struct encoder yaz = { - .encfunc = yazenc - , .ctx_new = yazCtx_new - , .ctx_free = yazCtx_free - }; - - return &yaz; - } - else if (!strcmp(name, "lzo")) - { - static const struct encoder lzo = { - .encfunc = lzoenc - , .ctx_new = lzoCtx_new - , .ctx_free = lzoCtx_free - }; - - return &lzo; - } - else if (!strcmp(name, "ucl")) - { - static const struct encoder ucl = { - .encfunc = uclenc - }; - - return &ucl; - } - /*else if (!strcmp(name, "zx7")) - { - static const struct encoder zx7 = { - .encfunc = zx7enc - }; - - return &zx7; - }*/ - else if (!strcmp(name, "aplib")) - { - static const struct encoder aplib = { - .encfunc = aplenc - }; - - return &aplib; - } - else - die("unknown compression codec '%s'", name); - - return 0; -} - - -/* sort dma array by start, ascending */ -static int sortfunc_dma_start_ascend(const void *_a, const void *_b) -{ - const struct dma *a = _a; - const struct dma *b = _b; - - if (a->start < b->start) - return -1; - - else if (a->start > b->start) - return 1; - - return 0; -} - - -/* sort dma array by size, descending */ -static int sortfunc_dma_size_descend(const void *_a, const void *_b) -{ - const struct dma *a = _a; - const struct dma *b = _b; - - unsigned int a_len = a->end - a->start; - unsigned int b_len = b->end - b->start; - - if (a_len < b_len) - return 1; - - else if (a_len > b_len) - return -1; - - return 0; -} - - -/* enter a directory (will be created if it doesn't exist) */ -static void dir_enter(const char *dir) -{ - /* unable to enter directory */ - if (wow_chdir(dir)) - { - /* attempt to create directory */ - if (wow_mkdir(dir)) - die("failed to create directory '%s'", dir); - - if (wow_chdir(dir)) - die("failed to enter directory '%s'", dir); - } -} - - -static void report_progress( - struct rom *rom - , const char *codec - , int v - , int total -) -{ - /* caching enabled */ - if (rom->cache) - fprintf( - printer - , "\r""updating '%s/%s' %d/%d: " - , rom->cache - , codec - , v - , total - ); - - else - fprintf( - printer - , "\r""compressing file %d/%d: " - , v - , total - ); -} - -/* compress a list of files */ -static void dma_compress( - struct rom *rom - , void *compbuf - , int encfunc( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx - ) - , const char *codec - , char *dot_codec - , struct folder *list - , int stride /* number of entries to advance each time */ - , int ofs /* starting entry in list */ - , int report /* report progress to stderr (last thread only) */ - , void *ctx /* compression context */ - , bool matching -) -{ - struct dma *dma; - struct fldr_item *item; - - for (dma = rom->dma + ofs - ; (unsigned)(dma - rom->dma) < rom->dma_num - ; dma += stride - ) - { - char *iname = 0; - unsigned char *data = rom->data + dma->start; - unsigned char checksum[64]; - char readable[64]; - int len = dma->end - dma->start; - - /* report the progress */ - if (report) - report_progress(rom, codec, PROGRESS_A_B); - - /* skip files that have a size of 0 */ - if (dma->start == dma->end) - continue; - - /* caching is disabled, just compress */ - if (!rom->cache) - { - int err; - dma->compbuf = compbuf; - - /* don't compress this file */ - if (!dma->compress) - { - dma->compSz = dma->end - dma->start; - dma->compbuf = memdup_safe( - rom->data + dma->start - , dma->compSz - ); - continue; - } - - err = - encfunc( - rom->data + dma->start - , dma->end - dma->start - , dma->compbuf - , &dma->compSz - , ctx - ); - - /* file doesn't benefit from compression */ - if (!matching && dma->compSz >= dma->end - dma->start) - { - dma->compSz = dma->end - dma->start; - dma->compbuf = memdup_safe( - rom->data + dma->start - , dma->compSz - ); - dma->compress = 0; - } - else - dma->compbuf = memdup_safe(dma->compbuf, dma->compSz); - - if (err) - die("compression error"); - - /* the rest of the loop applies only to caches */ - continue; - } - - /* get readable checksum name */ - stb_sha1(checksum, data, len); - stb_sha1_readable(readable, checksum); - - /* see if item already exists in folder */ - item = folder_findNameNoExt(list, readable); - if (item) - { - /* use full file name, including extension */ - iname = item->name; - - /* it exists, so use udata to mark the file as used */ - item->udata = dot_codec; - dma->compSz = file_size(iname); - - /* uncompressed file */ - if (strstr(iname, ".raw")) - dma->compress = 0; - } - /* item doesn't exist, so create it */ - else - { - void *out = compbuf; - unsigned out_sz; - int err; - - /* file not marked for compression */ - if (!dma->compress) - { - out = rom->data + dma->start; - out_sz = dma->end - dma->start; - dma->compress = 0; - strcat(readable, ".raw"); - - /* write file */ - if (file_write(readable, out, out_sz) != out_sz) - die("error writing file 'cache/%s/%s'", codec, readable); - - dma->compSz = out_sz; - dma->compname = strdup_safe(readable); - - /* the remaining block applies only to compressed files */ - continue; - } - - err = - encfunc( - rom->data + dma->start - , dma->end - dma->start - , out - , &out_sz - , ctx - ); - - if (err) - die("compression error"); - - /* file doesn't benefit from compression */ - if (!matching && out_sz >= dma->end - dma->start) - { - out = rom->data + dma->start; - out_sz = dma->end - dma->start; - dma->compress = 0; - strcat(readable, ".raw"); - } - /* file benefits from compression */ - else - /* add encoding as extension, ex '.yaz' */ - strcat(readable, dot_codec); - - /* write file */ - if (file_write(readable, out, out_sz) != out_sz) - die("error writing file 'cache/%s/%s'", codec, readable); - - dma->compSz = out_sz; - iname = readable; - } - - /* back up compressed filename to - * avoid having to re-checksum later - */ - dma->compname = strdup_safe(iname); - } -} - - -static void *dma_compress_threadfunc(void *_CT) -{ - struct compThread *CT = _CT; - - dma_compress( - CT->rom - , CT->data - , CT->encfunc - , CT->codec - , CT->dot_codec - , CT->list - , CT->stride - , CT->ofs - , CT->report - , CT->ctx - , CT->matching - ); - - return 0; -} - - -static void dma_compress_thread( - struct compThread *CT - , struct rom *rom - , void *compbuf - , int encfunc( - void *src - , unsigned src_sz - , void *dst - , unsigned *dst_sz - , void *_ctx - ) - , const char *codec - , char *dot_codec - , struct folder *list - , int stride /* number of entries to advance each time */ - , int ofs /* starting entry in list */ - , int report /* report progress to stderr (last thread only) */ - , void *ctx /* compression context */ - , bool matching -) -{ - CT->rom = rom; - CT->data = compbuf; - CT->encfunc = encfunc; - CT->codec = codec; - CT->dot_codec = dot_codec; - CT->list = list; - CT->stride = stride; - CT->ofs = ofs; - CT->report = report; - CT->ctx = ctx; - CT->matching = matching; - - if (pthread_create(&CT->pt, 0, dma_compress_threadfunc, CT)) - die("threading error"); -} - - -/* get dma entry by original index (useful after reordering) */ -static struct dma *dma_get_idx(struct rom *rom, unsigned idx) -{ - struct dma *dma; - - assert(idx < rom->dma_num && "dma index too high"); - - /* walk dma list for matching index */ - DMA_FOR_EACH - { - if (dma->index == idx) - break; - } - - return dma; -} - - -/* write 'num' bytes to rom and advance */ -static void rom_write(struct rom *rom, void *data, int sz) -{ - unsigned char *raw; - - assert(rom); - assert(rom->data); - assert(data); - assert(sz); - - if (rom->ofs + sz > rom->data_sz) - die( - "can't write %d bytes at 0x%X b/c it exceeds rom size" - , sz, rom->ofs - ); - - raw = rom->data + rom->ofs; - - memcpy(raw, data, sz); - - rom->ofs += sz; -} - - -/* write 32 bit value to rom and advance */ -static void rom_write32(struct rom *rom, unsigned int value) -{ - unsigned char raw[4]; - - raw[0] = value >> 24; - raw[1] = value >> 16; - raw[2] = value >> 8; - raw[3] = value; - - rom_write(rom, raw, 4); -} - - -/* write dma table into rom */ -static void rom_write_dmadata(struct rom *rom) -{ - struct dma *dma; - int num; - int numUsed; - - assert(rom); - assert(rom->dma); - assert(rom->dma_raw); - - dma = rom->dma; - num = rom->dma_num; - - /* sort all entries by size, descending */ - DMASORT(rom, sortfunc_dma_size_descend); - - /* find first entry where size == 0 (aka first unused entry) */ - for (dma = rom->dma; dma - rom->dma < num; ++dma) - if (dma->start == dma->end) - break; - numUsed = dma - rom->dma; - - /* sort all used entries by start address, ascending */ - DMASORT_N(rom, sortfunc_dma_start_ascend, numUsed); - - /* - * at this point, unused entries have been moved to the end - */ - - /* zero the table */ - memset(rom->dma_raw, 0, num * 16); - - /* write every entry */ - rom->ofs = rom->dma_raw - rom->data; - for (dma = rom->dma; dma - rom->dma < num; ++dma) - { - rom_write32(rom, dma->start); - rom_write32(rom, dma->end); - rom_write32(rom, dma->Pstart); - rom_write32(rom, dma->Pend); - - /* early end condition: all entries have been written */ - if (!dma->end) - break; - } -} - - -/* - * - * public functions - * - */ - -/* compress rom using specified algorithm */ -void rom_compress(struct rom *rom, int mb, int numThreads, bool matching) -{ - struct dma *dma; - struct folder *list = 0; - struct fldr_item *item; - char *dot_codec = 0; - const char *codec; - char cwd[4096] = {0}; - char cache_codec[4096] = {0}; - const char *cache; - const struct encoder *enc = 0; - unsigned int compsz = mb * 0x100000; - unsigned int comp_total = 0; - unsigned int largest_compress = 1024; - float total_compressed = 0; - float total_decompressed = 0; - struct compThread *compThread = 0; - int dma_num = rom->dma_num; - int i; - - assert(rom); - assert(rom->dma); - assert(rom->dma_ready); - assert(rom->is_comp == 0 && "rom_compressed called more than once"); - - rom->is_comp = 1; - - if (numThreads <= 0) - numThreads = 1; - - /* default codec = yaz */ - if (!(codec = rom->codec)) - codec = "yaz"; - - cache = rom->cache; - - if (compsz > rom->data_sz || mb < 0) - die("invalid mb argument %d", mb); - - /* get encoding functions */ - enc = encoder(codec); - - /* restore original start/end for nonexistent files */ - DMA_FOR_EACH - { - if (dma->deleted) - { - dma->start = dma->Ostart; - dma->end = dma->Oend; - dma->compress = 0; /* deleted files don't compress */ - } - } - - /* sort dma entries by size, descending */ - DMASORT(rom, sortfunc_dma_size_descend); - - /* locate largest file that will be compressed */ - DMA_FOR_EACH - { - if (dma->compress && dma->end - dma->start > largest_compress) - largest_compress = dma->end - dma->start; - } - - /* no file should compress to over 2x its uncompressed size */ - largest_compress *= 2; - - /* allocate compression buffer for each thread */ - compThread = calloc_safe(numThreads, sizeof(*compThread)); - for (i = 0; i < numThreads; ++i) - { - compThread[i].data = malloc_safe(largest_compress); - - /* allocate compression contexts (if applicable) */ - if (enc->ctx_new) - { - compThread[i].ctx = enc->ctx_new(); - if (!compThread[i].ctx) - die("memory error"); - } - } - - /* if using compression cache */ - if (cache) - { - sprintf(cache_codec, "%s/%s/", cache, codec); - - /* store current working directory for later */ - wow_getcwd_safe(cwd, sizeof(cwd)); - - /* create and enter cache folder */ - dir_enter(cache); - - /* create and enter directory for the encoding algorithm */ - dir_enter(codec); - - /* make a '.yaz' string from 'yaz' */ - dot_codec = malloc_safe(strlen(codec) + 1/*'.'*/ + 1/*'\0'*/); - strcpy(dot_codec, "."); - strcat(dot_codec, codec); - - /* get list of all files in current working directory */ - list = folder_new(); - } - - /* now compress every compressible file */ - if (numThreads <= 1) - { - dma_compress( - rom - , compThread[0].data - , enc->encfunc - , codec - , dot_codec - , list - , 1 /* stride */ - , 0 /* ofs */ - , 1 /* report */ - , compThread[0].ctx - , matching - ); - } - else - { - /* spawn threads */ - for (i = 0; i < numThreads; ++i) - { - dma_compress_thread( - &compThread[i] - , rom - , compThread[i].data - , enc->encfunc - , codec - , dot_codec - , list - , numThreads /* stride */ - , i /* ofs */ - , (i+1)==numThreads /* report */ - , compThread[i].ctx - , matching - ); - } - - /* wait for all threads to complete */ - for (i = 0; i < numThreads; ++i) - { - if (pthread_join(compThread[i].pt, NULL)) - die("threading error"); - } - } - - /* all files now compressed */ - report_progress(rom, codec, PROGRESS_A_B); - fprintf(printer, "success!\n"); - - /* sort by original start, ascending */ - DMASORT(rom, sortfunc_dma_start_ascend); - - /* determine physical addresses for each segment */ - comp_total = 0; - DMA_FOR_EACH - { - char *fn = dma->compname; - unsigned int sz; - unsigned int sz16; - - if (dma->deleted) - continue; - - /* cached file logic */ - if (cache) - { - /* skip entries that don't reference compressed files */ - if (!fn) - continue; - - sz = dma->compSz; - - /* sz == 0 */ - if (!sz) - die("'%s/%s/%s' file size == 0", cache, codec, fn); - } - - /* in-memory file logic */ - else - { - /* skip entries that don't reference compressed data */ - sz = dma->compSz; - if (!sz) - continue; - } - - /* ensure we remain 16-byte-aligned after advancing */ - sz16 = sz; - if (sz16 & 15) - sz16 += 16 - (sz16 & 15); - - dma->Pstart = comp_total; - if (dma->compress) - { - dma->Pend = dma->Pstart + sz16; - - /* compressed file ratio variables */ - total_compressed += sz16; - total_decompressed += dma->end - dma->start; - } - else - dma->Pend = 0; - comp_total += sz16; - - if (mb != 0 && dma->Pend > compsz) - die("ran out of compressed rom space"); - } - - /* adaptive final size */ - if (mb == 0) - compsz = ALIGN8MB(comp_total); - - if (matching) - { - /* fill the entire (compressed) rom space with 00010203...FF... - in order to match retail rom padding */ - unsigned char n = 0; /* will intentionally overflow */ - for (unsigned int j = 0; j < compsz; j++, n++) - { - rom->data[j] = n; - } - } - else - { - /* zero the entire (compressed) rom space */ - memset(rom->data, 0, compsz); - } - - /* inject compressed files */ - comp_total = 0; - DMA_FOR_EACH - { - unsigned char *dst; - char *fn = dma->compname; - unsigned int sz; - fprintf(printer, "\r""injecting file %d/%d: ", PROGRESS_A_B); - - if (dma->deleted) - continue; - - dst = rom->data + dma->Pstart; - - /* external cached file logic */ - if (cache) - { - /* skip entries that don't reference compressed files */ - if (!fn) - continue; - - /* load file into rom at offset */ - dst = file_load_into(cache_codec, fn, &sz, dst); - } - /* otherwise, a simple memcpy */ - else - { - memcpy(dst, dma->compbuf, dma->compSz); - sz = dma->compSz; - } - - if (matching) - { - /* since matching rom padding is not zero but file padding is zero, - fill file padding space with zeros */ - memset(dst + sz, 0, ALIGN16(sz) - sz); - } - } - fprintf(printer, "\r""injecting file %d/%d: ", dma_num, dma_num); - fprintf(printer, "success!\n"); - - fprintf( - printer - , "compression ratio: %.02f%%\n" - , (total_compressed / total_decompressed) * 100.0f - ); - - /* now free compressed file names */ - DMA_FOR_EACH - { - if (dma->compname) - free(dma->compname); - } - - /* remove unused cache files */ - if (list) - { - for (item = list->item; item - list->item < list->num; ++item) - { - /* udata hasn't been marked, so file is unused */ - if (item->name && !item->udata) - { - if (remove(item->name)) - die("failed to remove '%s/%s/%s'" - , cache, codec, item->name - ); - } - } - } - - /* update rom size for when rom_save() is used */ - rom->data_sz = compsz; - - /* cleanup */ - DMA_FOR_EACH - { - /* zero starts/ends of deleted files */ - if (!matching && dma->deleted) - { - dma->start = 0; - dma->end = 0; - dma->Pstart = 0; - dma->Pend = 0; - } - - /* free any compbufs */ - if (dma->compbuf) - free(dma->compbuf); - dma->compSz = 0; - dma->compbuf = 0; - } - if (list) - folder_free(list); - if (dot_codec) - free(dot_codec); - for (i = 0; i < numThreads; ++i) - { - free(compThread[i].data); - - /* free compression contexts (if applicable) */ - if (enc->ctx_free) - { - assert(compThread[i].ctx); - enc->ctx_free(compThread[i].ctx); - } - } - free(compThread); - - /* return to prior working directory */ - if (*cwd) - wow_chdir(cwd); -} - - -/* specify start of dmadata and number of entries */ -void rom_dma(struct rom *rom, unsigned int offset, int num_entries, bool matching) -{ - struct dma *dma; - unsigned char *raw; - - assert(rom); - assert(rom->data); - assert(rom->dma == 0 && "called rom_dma() more than once"); - - if (num_entries <= 0) - die("invalid number of dma entries %d", num_entries); - - dma = calloc_safe(num_entries, sizeof(*dma)); - rom->dma = dma; - rom->dma_num = num_entries; - - raw = rom->data + offset; - rom->dma_raw = raw; - - /* initialize every entry */ - while (dma - rom->dma < num_entries) - { - /* propagate defaults */ - dma->index = dma - rom->dma; - dma->start = get32(raw); - dma->end = get32(raw + 4); - dma->Pstart = get32(raw + 8); - dma->Pend = get32(raw + 12); - dma->Ostart = dma->start; - dma->Oend = dma->end; - dma->compress = 0; /* compression off by default */ - - /* nonexistent file */ - if (dma->Pstart == DMA_DELETED && dma->Pend == DMA_DELETED) - { - dma->deleted = 1; - - if (!matching) - { - dma->start = 0; - dma->end = 0; - dma->Ostart = 0; - dma->Oend = 0; - dma->Pstart = 0; - dma->Pend = 0; - } - } - - /* invalid dma conditions */ - else if ( - (dma->Pend & 3) /* not 4-byte aligned */ - || (dma->Pstart & 3) - || (dma->start & 3) - || (dma->end & 3) - || dma->start > dma->end - || (dma->Pstart > dma->Pend && dma->Pend) - || dma->Pend > rom->data_sz - ) - { - die( - "invalid dma entry encountered: %08X %08X %08X %08X" - , dma->start, dma->end, dma->Pstart, dma->Pend - ); - } - - /* rom is compressed */ - if (dma->Pend && dma->Pend != DMA_DELETED) - { - die( - "encountered dma entry %08X %08X %08X %08X" - ", which suggests the rom is already compressed...\n" - "now exiting..." - , dma->start, dma->end, dma->Pstart, dma->Pend - ); - } - - /* advance to next entry */ - raw += 16; - dma += 1; - } -} - -/* call this once dma settings are finalized */ -void rom_dma_ready(struct rom *rom, bool matching) -{ - struct dma *dma; - int num; - unsigned int lowest = 0; - unsigned int highest_end = 0; /* highest end dma offset */ - - assert(rom); - assert(rom->data); - assert(rom->dma); - assert(rom->dma_ready == 0 && "dma_ready called more than once"); - - dma = rom->dma; - num = rom->dma_num; - - /* sort by start offset, ascending */ - DMASORT(rom, sortfunc_dma_start_ascend); - - /* confirm no entries overlap */ - for (dma = rom->dma ; dma - rom->dma < num; ++dma) - { - /* skip blank entries */ - if (!dma->start && !dma->end) - continue; - - /* warn on empty files */ - if (dma->end == dma->start) - { - fprintf( - printer - , "warning: dma entry %d is empty file (%08X == %08X)\n" - , dma->index, dma->start, dma->end - ); - dma->Pstart = dma->Pend = DMA_DELETED; - } - - /* nonexistent file */ - if (dma->Pstart == DMA_DELETED && dma->Pend == DMA_DELETED) - { - dma->deleted = 1; - - if (!matching) - { - dma->Ostart = 0; - dma->Oend = 0; - dma->start = 0; - dma->end = 0; - dma->compress = 0; - } - continue; - } - - /* fatal error on entries where end < start */ - if (dma->end < dma->start) - die( - "dma invalid entry %d (%08X < %08X)" - , dma->index, dma->end, dma->start - ); - - /* fatal error on unaligned entries */ - if ((dma->start & 3) || (dma->end & 3)) - die( - "dma unaligned pointer (%08X %08X)" - , dma->start - , dma->end - ); - - /* fatal error on entries exceeding rom size */ - if (dma->end > rom->data_sz) - die( - "dma entry %d (%08X - %08X) exceeds rom size (%08X)" - , dma->index, dma->start, dma->end, rom->data_sz - ); - - /* if at least one entry has been processed, and its - * start is lower than any of the previous ends - */ - if (dma > rom->dma && dma->start < lowest) - die( - "dma table entry %d (%08X - %08X) " - "overlaps entry %d (%08X - %08X)" - , dma->index, dma->start, dma->end - , (dma-1)->index, (dma-1)->start, (dma-1)->end - ); - - /* store highest dma end offset */ - if (dma->end > highest_end) - highest_end = dma->end; - - /* lowest acceptable start for next entry is end of current */ - lowest = dma->end; - } - - /* note dma_ready() has been called */ - rom->dma_ready = 1; -} - -/* reencode existing archives within rom - * NOTE: must be used before dma_ready() - */ -/* TODO optimization opportunities: threading, caching */ -void rom_dma_repack( - struct rom *rom - , unsigned start - , unsigned end - , const char *from /* old codec */ - , const char *to /* new codec */ -) -{ - const struct encoder *enc = 0; - int (*decfunc)( - void *src, void *dst, unsigned dstSz, unsigned *srcSz - ) = 0; - void *ctx = 0; - - assert(rom); - assert(rom->data); - assert(rom->dma); - assert(rom->dma_ready == 0 && "dma_repack must precede dma_ready"); - - /* default codec = yaz */ - if (!from) - from = "yaz"; - if (!(to = rom->codec)) - to = "yaz"; - - /* swap start and end if they are not in ascending order */ - if (end < start) - { - int t = end; - end = start; - start = t; - } - - /* allocate compression buffers, 16 mb */ - if (!rom->mem.mb16) - rom->mem.mb16 = malloc_safe(SIZE_16MB); - if (!rom->mem.mb4) - rom->mem.mb4 = malloc_safe(SIZE_4MB); - - /* no need to reencode when the codec is the same */ - if (!strcmp(from, to)) - return; - - /* get decoding function */ - if (!strcmp(from, "yaz")) - { - from = "Yaz0"; - decfunc = yazdec; - } - else if (!strcmp(from, "raw")) - { - from = "raw0"; - } - else - die("dma_repack from='%s' unsupported", from); - - /* get encoding function */ - enc = encoder(to); - - /* allocate compression context (if applicable) */ - if (enc->ctx_new) - { - ctx = enc->ctx_new(); - if (!ctx) - die("memory error"); - } - - /* start <= idx <= end */ - while (start <= end && start < rom->dma_num) - { - struct dma *dma = dma_get_idx(rom, start); - - unsigned char *dst = rom->data + dma->start; - const char *errstr; - unsigned int Osz = dma->end - dma->start; - unsigned int Nsz; - char name[32]; - - dma->compress = 0; - - sprintf(name, "%08X", dma->start); - - errstr = - yar_reencode( - dst - , Osz - , rom->mem.mb16 - , &Nsz - , 4 - - , name - , from - , rom->mem.mb4 - , ctx - - , decfunc - , enc->encfunc - , 0 - ); - - /* fatal error */ - if (errstr) - die("%s", errstr); - - /* repacked archive won't fit in place of original archive */ - if (Nsz > Osz) - die("repacking failed, new archive 0x%X bytes too big" - , Nsz - Osz - ); - - /* copy encoded file into rom */ - memcpy(dst, rom->mem.mb16, Nsz); - - /* file sizes changed */ - fprintf(printer, "%.2f kb saved!\n", ((float)(Osz-Nsz))/1000.0f); - - dma->end = dma->start + Nsz; - - start += 1; - } - - /* free compression context (if applicable) */ - if (enc->ctx_free) - { - assert(ctx); - enc->ctx_free(ctx); - } -} - - -/* set compression flag on indices start <= idx <= end */ -void rom_dma_compress( - struct rom *rom - , unsigned start - , unsigned end - , int comp -) -{ - assert(rom); - assert(rom->data); - assert(rom->dma); - assert(rom->dma_ready == 0 && "dma_compress must precede dma_ready"); - - /* swap start and end if they are not in ascending order */ - if (end < start) - { - int t = end; - end = start; - start = t; - } - - /* start <= idx <= end */ - while (start <= end && start < rom->dma_num) - { - struct dma *dma = rom->dma + start; - - dma->compress = comp; - start += 1; - } -} - - -/* set rom compressed file cache directory */ -void rom_set_cache(struct rom *rom, const char *cache) -{ - assert(rom); - assert(cache); - - if (rom->cache) - free(rom->cache); - - rom->cache = strdup_safe(cache); -} - -/* get number of dma entries */ -int rom_dma_num(struct rom *rom) -{ - assert(rom); - - return rom->dma_num; -} - -/* set rom compression codec - * valid options: "yaz", "lzo", "ucl", "aplib" - * NOTE: to use codecs besides yaz, get patches from the z64enc repo - */ -void rom_set_codec(struct rom *rom, const char *codec) -{ - assert(rom); - assert(codec); - - if (rom->codec) - free(rom->codec); - - rom->codec = strdup_safe(codec); -} - -/* save rom to disk using specified filename */ -void rom_save(struct rom *rom, const char *fn) -{ - assert(rom); - assert(rom->data); - - /* updates dmadata */ - rom_write_dmadata(rom); - - /* recalculate crc */ - n64crc(rom->data); - - if (file_write(fn, rom->data, rom->data_sz) != rom->data_sz) - die("failed to write file '%s'", fn); -} - -/* allocate a rom structure */ -struct rom *rom_new(const char *fn) -{ - struct rom *dst; - - assert(fn); - - /* allocate destination rom structure */ - dst = calloc_safe(1, sizeof(*dst)); - - /* propagate rom file */ - dst->data = file_load(fn, &dst->data_sz); - - /* back up load file name */ - dst->fn = strdup_safe(fn); - - return dst; -} - -/* free a rom structure */ -void rom_free(struct rom *rom) -{ - if (!rom) - return; - - if (rom->codec) - free(rom->codec); - - if (rom->data) - free(rom->data); - - if (rom->dma) - free(rom->dma); - - if (rom->cache) - free(rom->cache); - - if (rom->fn) - free(rom->fn); - - /* free any memory pools that were allocated */ - if (rom->mem.mb16) - free(rom->mem.mb16); - if (rom->mem.mb4) - free(rom->mem.mb4); - - free(rom); -} - diff --git a/tools/z64compress/src/rom.h b/tools/z64compress/src/rom.h deleted file mode 100644 index dbc6eaa430..0000000000 --- a/tools/z64compress/src/rom.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * rom.h - * - * functions for compression magic reside herein - * - * z64me - * - */ - -#ifndef Z64COMPRESS_ROM_H_INCLUDED -#define Z64COMPRESS_ROM_H_INCLUDED - -/* opaque definition */ -struct rom; - -/* allocate a rom structure and load rom file */ -struct rom *rom_new(const char *fn); - -/* free a rom structure */ -void rom_free(struct rom *rom); - -/* save rom to disk using specified filename */ -void rom_save(struct rom *rom, const char *fn); - -/* compress rom using specified algorithm */ -void rom_compress(struct rom *rom, int mb, int numThreads, bool matching); - -/* specify start of dmadata and number of entries */ -void rom_dma(struct rom *rom, unsigned int offset, int num_entries, bool matching); - -/* call this once dma settings are finalized */ -void rom_dma_ready(struct rom *rom, bool matching); - -/* set compression flag on indices start <= idx <= end */ -void -rom_dma_compress(struct rom *rom, unsigned start, unsigned end, int comp); - -/* reencode existing archives within rom - * NOTE: must be used before dma_ready() - */ -void rom_dma_repack( - struct rom *rom - , unsigned start - , unsigned end - , const char *from /* old codec */ - , const char *to /* new codec */ -); - -/* get number of dma entries */ -int rom_dma_num(struct rom *rom); - -/* set rom compression codec - * valid options: "yaz", "lzo", "ucl", "aplib" - * NOTE: to use codecs besides yaz, get patches from the z64enc repo - */ -void rom_set_codec(struct rom *rom, const char *codec); - -/* set rom compressed file cache directory */ -void rom_set_cache(struct rom *rom, const char *cache); - -#endif /* Z64COMPRESS_ROM_H_INCLUDED */ - diff --git a/tools/z64compress/src/sha1.c b/tools/z64compress/src/sha1.c deleted file mode 100644 index 07b068dd68..0000000000 --- a/tools/z64compress/src/sha1.c +++ /dev/null @@ -1,141 +0,0 @@ -#include -#include -#include - -#define stb_big32(c) (((c)[0]<<24) + (c)[1]*65536 + (c)[2]*256 + (c)[3]) - -static void stb__sha1(unsigned char *chunk, unsigned h[5]) -{ - int i; - unsigned a,b,c,d,e; - unsigned w[80]; - - for (i=0; i < 16; ++i) - w[i] = stb_big32(&chunk[i*4]); - for (i=16; i < 80; ++i) { - unsigned t; - t = w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]; - w[i] = (t + t) | (t >> 31); - } - - a = h[0]; - b = h[1]; - c = h[2]; - d = h[3]; - e = h[4]; - - #define STB__SHA1(k,f) \ - { \ - unsigned temp = (a << 5) + (a >> 27) + (f) + e + (k) + w[i]; \ - e = d; \ - d = c; \ - c = (b << 30) + (b >> 2); \ - b = a; \ - a = temp; \ - } - - i=0; - for (; i < 20; ++i) STB__SHA1(0x5a827999, d ^ (b & (c ^ d)) ); - for (; i < 40; ++i) STB__SHA1(0x6ed9eba1, b ^ c ^ d ); - for (; i < 60; ++i) STB__SHA1(0x8f1bbcdc, (b & c) + (d & (b ^ c)) ); - for (; i < 80; ++i) STB__SHA1(0xca62c1d6, b ^ c ^ d ); - - #undef STB__SHA1 - - h[0] += a; - h[1] += b; - h[2] += c; - h[3] += d; - h[4] += e; -} - -void stb_sha1(unsigned char output[20], unsigned char *buffer, unsigned len) -{ - unsigned char final_block[128]; - unsigned end_start, final_len, j; - int i; - - unsigned h[5]; - - h[0] = 0x67452301; - h[1] = 0xefcdab89; - h[2] = 0x98badcfe; - h[3] = 0x10325476; - h[4] = 0xc3d2e1f0; - - // we need to write padding to the last one or two - // blocks, so build those first into 'final_block' - - // we have to write one special byte, plus the 8-byte length - - // compute the block where the data runs out - end_start = len & ~63; - - // compute the earliest we can encode the length - if (((len+9) & ~63) == end_start) { - // it all fits in one block, so fill a second-to-last block - end_start -= 64; - } - - final_len = end_start + 128; - - // now we need to copy the data in - assert(end_start + 128 >= len+9); - assert(end_start < len || len < 64-9); - - j = 0; - if (end_start > len) - j = (unsigned) - (int) end_start; - - for (; end_start + j < len; ++j) - final_block[j] = buffer[end_start + j]; - final_block[j++] = 0x80; - while (j < 128-5) // 5 byte length, so write 4 extra padding bytes - final_block[j++] = 0; - // big-endian size - final_block[j++] = len >> 29; - final_block[j++] = len >> 21; - final_block[j++] = len >> 13; - final_block[j++] = len >> 5; - final_block[j++] = len << 3; - assert(j == 128 && end_start + j == final_len); - - for (j=0; j < final_len; j += 64) { // 512-bit chunks - if (j+64 >= end_start+64) - stb__sha1(&final_block[j - end_start], h); - else - stb__sha1(&buffer[j], h); - } - - for (i=0; i < 5; ++i) { - output[i*4 + 0] = h[i] >> 24; - output[i*4 + 1] = h[i] >> 16; - output[i*4 + 2] = h[i] >> 8; - output[i*4 + 3] = h[i] >> 0; - } -} - -// client can truncate this wherever they like -void stb_sha1_readable(char display[30], unsigned char sha[20]) -{ - char encoding[65] = "0123456789abcdefghijklmnopqrstuv" - "wxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#$"; - int num_bits = 0, acc=0; - int i=0,o=0; - while (o < 26) { - int v; - // expand the accumulator - if (num_bits < 6) { - assert(i != 20); - acc += sha[i++] << num_bits; - num_bits += 8; - } - v = acc & ((1 << 6) - 1); - display[o++] = encoding[v]; - acc >>= 6; - num_bits -= 6; - } - assert(num_bits == 20*8 - 26*6); - display[o++] = '\0'; -} - diff --git a/tools/z64compress/src/sha1.h b/tools/z64compress/src/sha1.h deleted file mode 100644 index 3c7e0dc238..0000000000 --- a/tools/z64compress/src/sha1.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef STB_SHA1_H_INCLUDED -#define STB_SHA1_H_INCLUDED - -void stb_sha1(unsigned char output[20], unsigned char *buffer, unsigned len); -void stb_sha1_readable(char display[30], unsigned char sha[20]); - -#endif /* STB_SHA1_H_INCLUDED */ - diff --git a/tools/z64compress/src/wow.c b/tools/z64compress/src/wow.c deleted file mode 100644 index 21b2c671df..0000000000 --- a/tools/z64compress/src/wow.c +++ /dev/null @@ -1,3 +0,0 @@ -#define WOW_IMPLEMENTATION -#include "wow.h" - diff --git a/tools/z64compress/src/wow.h b/tools/z64compress/src/wow.h deleted file mode 100644 index cc2d88cd35..0000000000 --- a/tools/z64compress/src/wow.h +++ /dev/null @@ -1,769 +0,0 @@ -/* - * wow.h - * - * a small collection of functions - * to make writing software easier - * - * z64me - * - */ - -#ifndef WOW_H_INCLUDED -#define WOW_H_INCLUDED - -#include /* size_t */ -#include /* file ops */ -#include /* alloc */ -#include /* stat */ -#include /* strdup */ -#include /* chdir, getcwd */ -#include -#include - -#ifdef _WIN32 - #include - #undef near - #undef far -#endif - - -#if (_WIN32 && UNICODE) - #define wow_main int wmain(int argc, wchar_t *Wargv[]) - #define wow_main_argv char **argv = wow_conv_args(argc, (void*)Wargv) -#else - #define wow_main int main(int argc, char *argv[]) - #define wow_main_argv do{}while(0) -#endif - - -#ifndef WOW_API_PREFIX - #define WOW_API_PREFIX -#endif - -WOW_API_PREFIX -void * -wow_utf8_to_wchar(const char *str); - -WOW_API_PREFIX -char * -wow_wchar_to_utf8(void *wstr); - - -/* converts argv[] from wchar to char win32, in place */ -WOW_API_PREFIX -void * -wow_conv_args(int argc, void *argv[]); - - -/* returns non-zero if path is a directory */ -WOW_API_PREFIX -int -wow_is_dir_w(void const *path); - - -/* returns non-zero if path is a directory */ -WOW_API_PREFIX -int -wow_is_dir(char const *path); - - -/* fread abstraction that falls back to buffer-based fread * - * if a big fread fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fread_bytes(void *ptr, size_t bytes, FILE *stream); - - -/* fwrite abstraction that falls back to buffer-based fwrite * - * if a big fwrite fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fwrite_bytes(const void *ptr, size_t bytes, FILE *stream); - - -/* fread abstraction that falls back to buffer-based fread * - * if a big fread fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fread(void *ptr, size_t size, size_t nmemb, FILE *stream); - - -/* fwrite abstraction that falls back to buffer-based fwrite * - * if a big fwrite fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); - - -/* fopen abstraction for utf8 support on windows win32 */ -WOW_API_PREFIX -FILE * -wow_fopen(char const *name, char const *mode); - - -/* remove abstraction for utf8 support on windows win32 */ -WOW_API_PREFIX -int -wow_remove(char const *path); - - -/* mkdir */ -WOW_API_PREFIX -int -wow_mkdir(char const *path); - - -/* chdir */ -WOW_API_PREFIX -int -wow_chdir(char const *path); - - -/* getcwd */ -WOW_API_PREFIX -char * -wow_getcwd(char *buf, size_t size); - - -/* getcwd_safe */ -WOW_API_PREFIX -char * -wow_getcwd_safe(char *buf, size_t size); - - -/* system */ -WOW_API_PREFIX -int -wow_system(char const *path); - -WOW_API_PREFIX void die(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))) -; -WOW_API_PREFIX void *calloc_safe(size_t nmemb, size_t size); -WOW_API_PREFIX void *malloc_safe(size_t size); -WOW_API_PREFIX void *realloc_safe(void *ptr, size_t size); -WOW_API_PREFIX char *strdup_safe(const char *s); -WOW_API_PREFIX void *memdup_safe(void *ptr, size_t size); - -#ifdef WOW_IMPLEMENTATION - -WOW_API_PREFIX void die(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); -#ifdef UNICODE - char buf[4096]; - vsprintf(buf, fmt, args); - wchar_t *wc = wow_utf8_to_wchar(buf); - setlocale(LC_ALL, ""); - fwprintf(stderr, L"%ls", wc); - free(wc); -#else - vfprintf(stderr, fmt, args); -#endif - va_end(args); - fprintf(stderr, "\n"); - exit(EXIT_FAILURE); -} - -WOW_API_PREFIX void *calloc_safe(size_t nmemb, size_t size) -{ - void *result = calloc(nmemb, size); - - if (!result) - die("memory error"); - - return result; -} - -WOW_API_PREFIX void *malloc_safe(size_t size) -{ - void *result = malloc(size); - - if (!result) - die("memory error"); - - return result; -} - -WOW_API_PREFIX void *realloc_safe(void *ptr, size_t size) -{ - void *result = realloc(ptr, size); - - if (!result) - die("memory error"); - - return result; -} - -WOW_API_PREFIX char *strdup_safe(const char *s) -{ - char *result; - int n; - - if (!s) - return 0; - - n = strlen(s) + 1; - - result = malloc_safe(n); - - strcpy(result, s); - - return result; -} - -WOW_API_PREFIX void *memdup_safe(void *ptr, size_t size) -{ - void *result; - - if (!ptr || !size) - return 0; - - result = malloc_safe(size); - - memcpy(result, ptr, size); - - return result; -} - - -WOW_API_PREFIX -void * -wow_utf8_to_wchar(const char *str) -{ -#ifdef UNICODE -extern __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); - wchar_t *wstr; - int wstr_sz = (strlen(str) + 1) * 16;//sizeof(*wstr); - wstr = calloc_safe(1, wstr_sz); - MultiByteToWideChar(65001/*utf8*/, 0, str, -1, wstr, wstr_sz); - return wstr; -#else - return strdup(str); -#endif -} - -WOW_API_PREFIX -char * -wow_wchar_to_utf8_buf(void *wstr, void *dst, int dst_max) -{ -#ifdef UNICODE -extern __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); - WideCharToMultiByte(65001/*utf8*/, 0, wstr, -1, dst, dst_max, NULL, NULL); - return dst; -#else - (void)dst_max; /* unused parameter */ - return strcpy(dst, wstr); -#endif -} - -WOW_API_PREFIX -char * -wow_wchar_to_utf8(void *wstr) -{ -#ifdef UNICODE -extern __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); - char *str; - int str_sz = (wcslen(wstr) + 1) * sizeof(*str); - str = calloc_safe(1, str_sz); - WideCharToMultiByte(65001/*utf8*/, 0, wstr, -1, str, str_sz, NULL, NULL); - return str; -#else - return strdup(wstr); -#endif -} - -WOW_API_PREFIX -char * -wow_wchar_to_utf8_inplace(void *wstr) -{ -#ifdef UNICODE -extern __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); - char buf[4096]; - char *str; - int wstr_len = wcslen(wstr); - unsigned str_sz = (wstr_len + 1) * sizeof(*str); - if (str_sz >= sizeof(buf)) - str = malloc_safe(str_sz); - else - str = buf; - WideCharToMultiByte(65001/*utf8*/, 0, wstr, -1, str, str_sz, NULL, NULL); - memcpy(wstr, str, wstr_len + 1); - ((char*)wstr)[wstr_len+1] = '\0'; - if (str != buf) - free(str); - return wstr; -#else - return wstr; -#endif -} - - -/* argument abstraction: converts argv[] from wchar to char win32 */ -WOW_API_PREFIX -void * -wow_conv_args(int argc, void *argv[]) -{ -#ifdef UNICODE - int i; - for (i=0; i < argc; ++i) - { - //fprintf(stderr, "[%d]: %s\n", i, argv[i]); - //fwprintf(stderr, L"[%d]: %s\n", i, (wchar_t*)argv[i]); - argv[i] = wow_wchar_to_utf8_inplace(argv[i]); - //fwprintf(stderr, L"[%d]: %s\n", i, wow_utf8_to_wchar(argv[i])); - } -#else - (void)argc; /* unused parameter */ -#endif - return argv; -} - -/* returns non-zero if path is a directory */ -WOW_API_PREFIX -int -wow_is_dir_w(void const *path) -{ - struct stat s; -#if (_WIN32 && UNICODE) - if (wstat(path, &s) == 0) -#else - if (stat(path, &s) == 0) -#endif - { - if (s.st_mode & S_IFDIR) - return 1; - } - - return 0; -} - - -/* returns non-zero if path is a directory */ -WOW_API_PREFIX -int -wow_is_dir(char const *path) -{ - int rv; - void *wpath = 0; - -#if (_WIN32 && UNICODE) - wpath = wow_utf8_to_wchar(path); - rv = wow_is_dir_w(wpath); -#else - rv = wow_is_dir_w(path); -#endif - if (wpath) - free(wpath); - - return rv; -} - - -/* fread abstraction that falls back to buffer-based fread * - * if a big fread fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fread_bytes(void *ptr, size_t bytes, FILE *stream) -{ - if (!stream || !ptr || !bytes) - return 0; - - unsigned char *ptr8 = ptr; - size_t Oofs = ftell(stream); - size_t bufsz = 1024 * 1024; /* 1 mb at a time */ - size_t Obytes = bytes; - size_t rem; - - fseek(stream, 0, SEEK_END); - rem = ftell(stream) - Oofs; - fseek(stream, Oofs, SEEK_SET); - - if (bytes > rem) - bytes = rem; - - /* everything worked */ - if (fread(ptr, 1, bytes, stream) == bytes) - return Obytes; - - /* failed: try falling back to slower buffered read */ - fseek(stream, Oofs, SEEK_SET); - while (bytes) - { - /* don't read past end */ - if (bytes < bufsz) - bufsz = bytes; - if (bufsz > rem) - { - bytes = rem; - bufsz = rem; - } - - /* still failed */ - if (fread(ptr8, 1, bufsz, stream) != bufsz) - return 0; - - /* advance */ - ptr8 += bufsz; - bytes -= bufsz; - rem -= bufsz; - } - - /* success */ - return Obytes; -} - - -/* fwrite abstraction that falls back to buffer-based fwrite * - * if a big fwrite fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fwrite_bytes(const void *ptr, size_t bytes, FILE *stream) -{ - if (!stream || !ptr || !bytes) - return 0; - - const unsigned char *ptr8 = ptr; - size_t bufsz = 1024 * 1024; /* 1 mb at a time */ - size_t Obytes = bytes; - - /* everything worked */ - if (fwrite(ptr, 1, bytes, stream) == bytes) - return bytes; - - /* failed: try falling back to slower buffered read */ - while (bytes) - { - /* don't read past end */ - if (bytes < bufsz) - bufsz = bytes; - - /* still failed */ - if (fwrite(ptr8, 1, bufsz, stream) != bufsz) - return 0; - - /* advance */ - ptr8 += bufsz; - bytes -= bufsz; - } - - /* success */ - return Obytes; -} - - -/* fread abstraction that falls back to buffer-based fread * - * if a big fread fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fread(void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - if (!stream || !ptr || !size || !nmemb) - return 0; - - if (wow_fread_bytes(ptr, size * nmemb, stream) == size * nmemb) - return nmemb; - - return 0; -} - - -/* fwrite abstraction that falls back to buffer-based fwrite * - * if a big fwrite fails; if that still fails, returns 0 */ -WOW_API_PREFIX -size_t -wow_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - if (!stream || !ptr || !size || !nmemb) - return 0; - - if (wow_fwrite_bytes(ptr, size * nmemb, stream) == size * nmemb) - return nmemb; - - return 0; -} - - -/* fopen abstraction for utf8 support on windows win32 */ -WOW_API_PREFIX -FILE * -wow_fopen(char const *name, char const *mode) -{ -#ifdef UNICODE - void *wname = 0; - void *wmode = 0; - FILE *fp = 0; - - wname = wow_utf8_to_wchar(name); - if (!wname) - goto L_cleanup; - - /* TODO eventually, an error message would be cool */ - if (wow_is_dir_w(wname)) - goto L_cleanup; - - wmode = wow_utf8_to_wchar(mode); - if (!wmode) - goto L_cleanup; - - fp = _wfopen(wname, wmode); - -L_cleanup: - if (wname) free(wname); - if (wmode) free(wmode); - if (fp) - return fp; - return 0; -#else - /* TODO eventually, an error message would be cool */ - if (wow_is_dir_w(name)) - return 0; - return fopen(name, mode); -#endif -} - - -/* remove abstraction for utf8 support on windows win32 */ -WOW_API_PREFIX -int -wow_remove(char const *path) -{ -#ifdef UNICODE - void *wpath = 0; - int rval; - - wpath = wow_utf8_to_wchar(path); - if (!wpath) - return -1; - - rval = _wremove(wpath); - free(wpath); - return rval; -#else - return remove(path); -#endif -} - - -/* mkdir */ -WOW_API_PREFIX -int -wow_mkdir(char const *path) -{ -#if defined(_WIN32) && defined(UNICODE) -extern int _wmkdir(const wchar_t *); - void *wname = 0; - int rval; - - wname = wow_utf8_to_wchar(path); - if (!wname) - return -1; - - rval = _wmkdir(wname); - - if (wname) - free(wname); - - return rval; -#elif defined(_WIN32) /* win32 no unicode */ -extern int _mkdir(const char *); - return _mkdir(path); -#else /* ! _WIN32 */ - return mkdir(path, 0777); -#endif -} - - -/* chdir */ -WOW_API_PREFIX -int -wow_chdir(char const *path) -{ -#if defined(_WIN32) && defined(UNICODE) -extern int _wchdir(const wchar_t *); - void *wname = 0; - int rval; - - wname = wow_utf8_to_wchar(path); - if (!wname) - return -1; - - rval = _wchdir(wname); - - if (wname) - free(wname); - - return rval; -#elif defined(_WIN32) /* win32 no unicode */ -extern int _chdir(const char *); - return _chdir(path); -#else /* ! _WIN32 */ - return chdir(path); -#endif -} - - -/* getcwd */ -WOW_API_PREFIX -char * -wow_getcwd(char *buf, size_t size) -{ -#if defined(_WIN32) && defined(UNICODE) -//extern int _wgetcwd(const wchar_t *, int); -extern _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); - wchar_t wname[4096]; - - if (!buf || !size) - return 0; - - if (!_wgetcwd(wname, sizeof(wname) / sizeof(wname[0]))) - return 0; - - return wow_wchar_to_utf8_buf(wname, buf, size); -#elif defined(_WIN32) /* win32 no unicode */ -//extern char *_getcwd(char *, int); - return _getcwd(buf, size); -#else /* ! _WIN32 */ - return getcwd(buf, size); -#endif -} - - -/* getcwd_safe */ -WOW_API_PREFIX -char * -wow_getcwd_safe(char *buf, size_t size) -{ - char *result = wow_getcwd(buf, size); - - if (!result) - die("failed to get current working directory"); - - return result; -} - - -/* system */ -WOW_API_PREFIX -int -wow_system(char const *path) -{ -#if defined(_WIN32) && defined(UNICODE) - void *wname = 0; - int rval; - - wname = wow_utf8_to_wchar(path); - if (!wname) - return -1; - - rval = _wsystem(wname); - - if (wname) - free(wname); - - return rval; -#else /* not win32 unicode */ - return system(path); -#endif -} - - -/* system_gui */ -WOW_API_PREFIX -int -wow_system_gui(char const *name, const char *param) -{ -#if defined(_WIN32) - STARTUPINFOW si; - PROCESS_INFORMATION pi; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - ZeroMemory(&pi, sizeof(pi)); - int rval = 0 /*success */; -//extern int ShellExecuteA(void *hwnd, void *op, void *file, void *param, void *dir, int cmd); -//extern int ShellExecuteW(void *hwnd, void *op, void *file, void *param, void *dir, int cmd); -//const int SW_SHOWNORMAL = 1; - #if defined(UNICODE) - void *wname = 0; - void *wparam = 0; - - wname = wow_utf8_to_wchar(name); - if (!wname) - { - return -1; - } - wparam = wow_utf8_to_wchar(param); - if (!wparam) - { - free(wname); - return -1; - } - -#if 0 - if (CreateProcessW( - wname, wparam - , NULL, NULL - , FALSE - , CREATE_NO_WINDOW - , NULL - , NULL - , &si, &pi) - ) - { - //WaitForSingleObject(pi.hProcess, INFINITE); - //CloseHandle(pi.hProcess); - //CloseHandle(pi.hThread); - } - else - rval = 1; -#else - rval = (int)ShellExecuteW(NULL, L"open", wname, wparam, L".", SW_SHOWNORMAL); - rval = rval <= 32; -#endif - - free(wname); - free(wparam); - #else /* win32 non-unicode */ -#if 0 - if (CreateProcessA( - name, x - , NULL, NULL - , FALSE - , CREATE_NO_WINDOW - , NULL - , NULL - , &si, &pi) - ) - { - //WaitForSingleObject(pi.hProcess, INFINITE); - //CloseHandle(pi.hProcess); - //CloseHandle(pi.hThread); - } - else - rval = 1; -#else - rval = (int)ShellExecuteA(NULL, "open", name, param, ".", SW_SHOWNORMAL); - rval = rval <= 32; -#endif - #endif - return rval;//rval <= 32; -#else /* not win32 unicode */ - char *x = malloc_safe(strlen(name) + strlen(param) + 128); - if (!x) - return -1; - strcpy(x, "\""); - strcat(x, name); - strcat(x, "\" "); - strcat(x, param); - int rval = system(x); - free(x); - return rval; -#endif -} - -#endif /* WOW_IMPLEMENTATION */ - -#endif /* WOW_H_INCLUDED */ - diff --git a/tools/z64compress/src/wow_dirent.h b/tools/z64compress/src/wow_dirent.h deleted file mode 100644 index e9db5ca0b0..0000000000 --- a/tools/z64compress/src/wow_dirent.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * wow_dirent.h - * - * dirent wrapper that abstracts unicode/utf8 platforms - * - * must be #include'd after dirent.h - * - * z64me - * - */ - -#ifndef WOW_DIRENT_INCLUDED -#define WOW_DIRENT_INCLUDED -#include "wow.h" - -#if defined(_WIN32) && defined(UNICODE) -# define wow_DIR _WDIR -# define wow_dirent _wdirent -static -wow_DIR * -wow_opendir(const char *path) -{ - void *wpath = wow_utf8_to_wchar(path); - if (!wpath) - return NULL; - - wow_DIR *rv = _wopendir(wpath); - - free(wpath); - - return rv; -} -static -struct wow_dirent * -wow_readdir(wow_DIR *dir) -{ - struct wow_dirent *ep = _wreaddir(dir); - if (!ep) - return 0; - - /* convert d_name to utf8 for working on them directly */ - char *str = wow_wchar_to_utf8(ep->d_name); - memcpy(ep->d_name, str, strlen(str) + 1); - free(str); - - return ep; -} -# define wow_closedir _wclosedir -# define wow_dirent_char wchar_t - -#else /* not win32 unicode */ -# define wow_DIR DIR -# define wow_dirent dirent -# define wow_opendir opendir -# define wow_readdir readdir -# define wow_closedir closedir -# define wow_dirent_char char -#endif - -#endif /* WOW_DIRENT_INCLUDED */ - diff --git a/tools/z64compress_wrapper.py b/tools/z64compress_wrapper.py deleted file mode 100644 index ff2bf1bb6c..0000000000 --- a/tools/z64compress_wrapper.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env python3 -# -# z64compress wrapper for decomp projects -# https://github.com/z64me/z64compress -# Arguments: [--cache [cache directory]] [--threads [num threads]] [--mb [target rom size]] [--matching] -# Example Makefile usage: -# python3 tools/z64compress_wrapper.py --matching --threads $(shell nproc) $< $@ $(ELF) build/$(SPEC) -# - -import argparse, itertools, subprocess, sys - -from elftools.elf.elffile import ELFFile -from elftools.elf.sections import SymbolTableSection - -# Args from command line -parser = argparse.ArgumentParser(description="Compress rom produced by the OoT and MM Decomp projects") - -parser.add_argument("in_rom", help="uncompressed input rom filename") -parser.add_argument("out_rom", help="compressed output rom filename") -parser.add_argument("elf", help="path to the uncompressed rom elf file") -parser.add_argument("spec", help="path to processed spec file") -parser.add_argument("--cache", help="cache directory") -parser.add_argument("--threads", help="number of threads to run compression on, 0 disables multithreading") -parser.add_argument("--mb", help="compressed rom size in MB, default is the smallest multiple of 8mb fitting the whole rom") -parser.add_argument("--matching", help="matching compression, forfeits some useful optimizations", action="store_true") -parser.add_argument("--stderr", help="z64compress will write its output messages to stderr instead of stdout", action="store_true") - -args = parser.parse_args() - -IN_ROM = args.in_rom -OUT_ROM = args.out_rom - -elf_path = args.elf - -CACHE_DIR = args.cache -N_THREADS = int(args.threads or 0) -MB = args.mb -MATCHING = args.matching -STDOUT = not args.stderr - -# Get segments to compress - -spec = "" -with open(args.spec, "r") as infile: - spec = infile.read() - -def ranges(i): - for _, b in itertools.groupby(enumerate(i), lambda pair: pair[1] - pair[0]): - b = list(b) - yield b[0][1], b[-1][1] - -compress_segments = [] - -shift = 0 -for i,segment in enumerate(spec.split("beginseg\n")[1:],0): - directives = segment.split("endseg")[0].split("\n") - - for directive in directives: - directive = directive.strip() - if directive.startswith("flags") and "NOLOAD" in directive: - shift += 1 - elif directive.startswith("compress"): - compress_segments.append(i - shift) - -compress_segments = list(ranges(compress_segments)) -COMPRESS_INDICES = ",".join([f"{start}-{end}" if start != end else f"{start}" for start,end in compress_segments]) - -# Find dmadata - -def get_dmadata_start_len(): - dmadata_start = -1 - dmadata_end = -1 - - with open(elf_path, "rb") as elf_file: - elf = ELFFile(elf_file) - - for section in elf.iter_sections(): - if not isinstance(section, SymbolTableSection): - continue - - for sym in section.iter_symbols(): - if sym.name == "_dmadataSegmentRomStart": - dmadata_start = sym['st_value'] - elif sym.name == "_dmadataSegmentRomEnd": - dmadata_end = sym['st_value'] - if dmadata_start != -1 and dmadata_end != -1: - break - - assert dmadata_start != -1, "_dmadataSegmentRomStart symbol not found in supplied ELF" - assert dmadata_end != -1, "_dmadataSegmentRomEnd symbol not found in supplied ELF" - - return dmadata_start, (dmadata_end - dmadata_start)//0x10 - -DMADATA_ADDR, DMADATA_COUNT = get_dmadata_start_len() - -# Run - -cmd = f"./tools/z64compress/z64compress \ ---in {IN_ROM} \ ---out {OUT_ROM}\ -{' --matching' if MATCHING else ''}\ -{f' --mb {MB}' if MB is not None else ''} \ ---codec yaz\ -{f' --cache {CACHE_DIR}' if CACHE_DIR is not None else ''} \ ---dma 0x{DMADATA_ADDR:X},{DMADATA_COUNT} \ ---compress {COMPRESS_INDICES}\ -{f' --threads {N_THREADS}' if N_THREADS > 0 else ''}\ -{f' --only-stdout' if STDOUT else ''}" - -print(cmd) -try: - subprocess.check_call(cmd, shell=True) -except subprocess.CalledProcessError as e: - # Return the same error code for the wrapper if z64compress fails - sys.exit(e.returncode)