mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 11:03:46 +00:00
merge main
This commit is contained in:
commit
07aaf900d7
272 changed files with 520 additions and 535 deletions
71
Makefile
71
Makefile
|
@ -40,8 +40,6 @@ COMPILER ?= ido
|
||||||
VERSION ?= gc-eu-mq-dbg
|
VERSION ?= gc-eu-mq-dbg
|
||||||
# Number of threads to extract and compress with.
|
# Number of threads to extract and compress with.
|
||||||
N_THREADS ?= $(shell nproc)
|
N_THREADS ?= $(shell nproc)
|
||||||
# Check code syntax with host compiler.
|
|
||||||
RUN_CC_CHECK ?= 1
|
|
||||||
# If DEBUG_OBJECTS is 1, produce additional debugging files such as objdump output or raw binaries for assets
|
# If DEBUG_OBJECTS is 1, produce additional debugging files such as objdump output or raw binaries for assets
|
||||||
DEBUG_OBJECTS ?= 0
|
DEBUG_OBJECTS ?= 0
|
||||||
# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk!
|
# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk!
|
||||||
|
@ -368,8 +366,8 @@ CPPFLAGS += -P -xc -fno-dollars-in-identifiers $(CPP_DEFINES)
|
||||||
ASFLAGS += -march=vr4300 -32 -no-pad-sections -Iinclude -I$(EXTRACTED_DIR)
|
ASFLAGS += -march=vr4300 -32 -no-pad-sections -Iinclude -I$(EXTRACTED_DIR)
|
||||||
|
|
||||||
ifeq ($(COMPILER),gcc)
|
ifeq ($(COMPILER),gcc)
|
||||||
CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks -fno-PIC -fno-common -ffreestanding -funsigned-char -fbuiltin -fno-builtin-sinf -fno-builtin-cosf $(CHECK_WARNINGS)
|
CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc -MD $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks -fno-PIC -fno-common -ffreestanding -funsigned-char -fbuiltin -fno-builtin-sinf -fno-builtin-cosf $(CHECK_WARNINGS)
|
||||||
CCASFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -fno-PIC -fno-common -Wa,-no-pad-sections
|
CCASFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc -MD $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -fno-PIC -fno-common -Wa,-no-pad-sections
|
||||||
MIPS_VERSION := -mips3
|
MIPS_VERSION := -mips3
|
||||||
else
|
else
|
||||||
# Suppress warnings for wrong number of macro arguments (to fake variadic
|
# Suppress warnings for wrong number of macro arguments (to fake variadic
|
||||||
|
@ -387,7 +385,7 @@ endif
|
||||||
ifeq ($(COMPILER),ido)
|
ifeq ($(COMPILER),ido)
|
||||||
# Have CC_CHECK pretend to be a MIPS compiler
|
# Have CC_CHECK pretend to be a MIPS compiler
|
||||||
MIPS_BUILTIN_DEFS := -D_MIPS_ISA_MIPS2=2 -D_MIPS_ISA=_MIPS_ISA_MIPS2 -D_ABIO32=1 -D_MIPS_SIM=_ABIO32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32
|
MIPS_BUILTIN_DEFS := -D_MIPS_ISA_MIPS2=2 -D_MIPS_ISA=_MIPS_ISA_MIPS2 -D_ABIO32=1 -D_MIPS_SIM=_ABIO32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32
|
||||||
CC_CHECK = gcc -fno-builtin -fsyntax-only -funsigned-char -std=gnu90 -D_LANGUAGE_C $(CPP_DEFINES) $(MIPS_BUILTIN_DEFS) $(GBI_DEFINES) $(INC) $(CHECK_WARNINGS)
|
CC_CHECK = gcc -nostdinc -MD -fno-builtin -fsyntax-only -funsigned-char -std=gnu90 -D_LANGUAGE_C $(CPP_DEFINES) $(MIPS_BUILTIN_DEFS) $(GBI_DEFINES) $(INC) $(CHECK_WARNINGS)
|
||||||
ifeq ($(shell getconf LONG_BIT), 32)
|
ifeq ($(shell getconf LONG_BIT), 32)
|
||||||
# Work around memory allocation bug in QEMU
|
# Work around memory allocation bug in QEMU
|
||||||
export QEMU_GUEST_BASE := 1
|
export QEMU_GUEST_BASE := 1
|
||||||
|
@ -396,7 +394,7 @@ ifeq ($(COMPILER),ido)
|
||||||
CC_CHECK += -m32
|
CC_CHECK += -m32
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
RUN_CC_CHECK := 0
|
CC_CHECK = @:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJDUMP_FLAGS := -d -r -z -Mreg-names=32
|
OBJDUMP_FLAGS := -d -r -z -Mreg-names=32
|
||||||
|
@ -468,7 +466,7 @@ SOUNDFONT_EXTRACT_XMLS := $(foreach dir,$(SOUNDFONT_EXTRACT_DIRS),$(wildcard $(d
|
||||||
SOUNDFONT_BUILD_XMLS := $(foreach f,$(SOUNDFONT_XMLS),$(BUILD_DIR)/$f) $(foreach f,$(SOUNDFONT_EXTRACT_XMLS),$(f:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%))
|
SOUNDFONT_BUILD_XMLS := $(foreach f,$(SOUNDFONT_XMLS),$(BUILD_DIR)/$f) $(foreach f,$(SOUNDFONT_EXTRACT_XMLS),$(f:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%))
|
||||||
SOUNDFONT_O_FILES := $(foreach f,$(SOUNDFONT_BUILD_XMLS),$(f:.xml=.o))
|
SOUNDFONT_O_FILES := $(foreach f,$(SOUNDFONT_BUILD_XMLS),$(f:.xml=.o))
|
||||||
SOUNDFONT_HEADERS := $(foreach f,$(SOUNDFONT_BUILD_XMLS),$(f:.xml=.h))
|
SOUNDFONT_HEADERS := $(foreach f,$(SOUNDFONT_BUILD_XMLS),$(f:.xml=.h))
|
||||||
SOUNDFONT_DEP_FILES := $(foreach f,$(SOUNDFONT_O_FILES),$(f:.o=.d))
|
SOUNDFONT_DEP_FILES := $(foreach f,$(SOUNDFONT_O_FILES),$(f:.o=.c.d))
|
||||||
|
|
||||||
SEQUENCE_FILES := $(foreach dir,$(SEQUENCE_DIRS),$(wildcard $(dir)/*.seq))
|
SEQUENCE_FILES := $(foreach dir,$(SEQUENCE_DIRS),$(wildcard $(dir)/*.seq))
|
||||||
SEQUENCE_EXTRACT_FILES := $(foreach dir,$(SEQUENCE_EXTRACT_DIRS),$(wildcard $(dir)/*.seq))
|
SEQUENCE_EXTRACT_FILES := $(foreach dir,$(SEQUENCE_EXTRACT_DIRS),$(wildcard $(dir)/*.seq))
|
||||||
|
@ -502,7 +500,7 @@ OVL_RELOC_FILES := $(filter %_reloc.o,$(SPEC_O_FILES))
|
||||||
|
|
||||||
# Automatic dependency files
|
# Automatic dependency files
|
||||||
# (Only asm_processor dependencies and reloc dependencies are handled for now)
|
# (Only asm_processor dependencies and reloc dependencies are handled for now)
|
||||||
DEP_FILES := $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d)
|
DEP_FILES := $(O_FILES:.o=.d) $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d) $(BUILD_DIR)/spec.d
|
||||||
|
|
||||||
TEXTURE_FILES_PNG_EXTRACTED := $(foreach dir,$(ASSET_BIN_DIRS_EXTRACTED),$(wildcard $(dir)/*.png))
|
TEXTURE_FILES_PNG_EXTRACTED := $(foreach dir,$(ASSET_BIN_DIRS_EXTRACTED),$(wildcard $(dir)/*.png))
|
||||||
TEXTURE_FILES_PNG_COMMITTED := $(foreach dir,$(ASSET_BIN_DIRS_COMMITTED),$(wildcard $(dir)/*.png))
|
TEXTURE_FILES_PNG_COMMITTED := $(foreach dir,$(ASSET_BIN_DIRS_COMMITTED),$(wildcard $(dir)/*.png))
|
||||||
|
@ -860,7 +858,7 @@ $(O_FILES): | asset_files
|
||||||
.PHONY: o_files asset_files
|
.PHONY: o_files asset_files
|
||||||
|
|
||||||
$(BUILD_DIR)/spec: $(SPEC) $(SPEC_INCLUDES)
|
$(BUILD_DIR)/spec: $(SPEC) $(SPEC_INCLUDES)
|
||||||
$(CPP) $(CPPFLAGS) -I. $< | $(BUILD_DIR_REPLACE) > $@
|
$(CPP) $(CPPFLAGS) -MD -MF $@.d -MT $@ -I. $< | $(BUILD_DIR_REPLACE) > $@
|
||||||
|
|
||||||
$(LDSCRIPT): $(BUILD_DIR)/spec
|
$(LDSCRIPT): $(BUILD_DIR)/spec
|
||||||
$(MKLDSCRIPT) $< $@
|
$(MKLDSCRIPT) $< $@
|
||||||
|
@ -872,7 +870,7 @@ $(BUILD_DIR)/baserom/%.o: $(EXTRACTED_DIR)/baserom/%
|
||||||
$(OBJCOPY) -I binary -O elf32-big $< $@
|
$(OBJCOPY) -I binary -O elf32-big $< $@
|
||||||
|
|
||||||
$(BUILD_DIR)/data/%.o: data/%.s
|
$(BUILD_DIR)/data/%.o: data/%.s
|
||||||
$(CPP) $(CPPFLAGS) -Iinclude $< | $(AS) $(ASFLAGS) -o $@
|
$(CPP) $(CPPFLAGS) -MD -MF $(@:.o=.d) -MT $@ -Iinclude $< | $(AS) $(ASFLAGS) -o $@
|
||||||
|
|
||||||
ifeq ($(PLATFORM),IQUE)
|
ifeq ($(PLATFORM),IQUE)
|
||||||
NES_CHARMAP := assets/text/charmap.chn.txt
|
NES_CHARMAP := assets/text/charmap.chn.txt
|
||||||
|
@ -881,24 +879,23 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/text/%.enc.nes.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h $(NES_CHARMAP)
|
$(BUILD_DIR)/assets/text/%.enc.nes.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h $(NES_CHARMAP)
|
||||||
$(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) $< | $(PYTHON) tools/msgenc.py --encoding utf-8 --charmap $(NES_CHARMAP) - $@
|
$(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) -MD -MF $(@:.o=.d) -MT $@ $< | $(PYTHON) tools/msgenc.py --encoding utf-8 --charmap $(NES_CHARMAP) - $@
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/text/%.enc.jpn.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h assets/text/charmap.jpn.txt
|
$(BUILD_DIR)/assets/text/%.enc.jpn.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h assets/text/charmap.jpn.txt
|
||||||
$(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) $< | $(PYTHON) tools/msgenc.py --encoding SHIFT-JIS --wchar --charmap assets/text/charmap.jpn.txt - $@
|
$(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) -MD -MF $(@:.o=.d) -MT $@ $< | $(PYTHON) tools/msgenc.py --encoding SHIFT-JIS --wchar --charmap assets/text/charmap.jpn.txt - $@
|
||||||
|
|
||||||
# Dependencies for files including message data headers
|
# Dependencies for encoded message headers. These dependencies are not automatic as these headers are generated
|
||||||
# TODO remove when full header dependencies are used.
|
# as part of the build. A clean build must know to generate them before the relevant .d files are created.
|
||||||
$(BUILD_DIR)/assets/text/jpn_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.jpn.h
|
$(BUILD_DIR)/assets/text/jpn_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.jpn.h
|
||||||
$(BUILD_DIR)/assets/text/nes_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
|
$(BUILD_DIR)/assets/text/nes_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
|
||||||
$(BUILD_DIR)/assets/text/ger_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
|
$(BUILD_DIR)/assets/text/ger_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
|
||||||
$(BUILD_DIR)/assets/text/fra_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
|
$(BUILD_DIR)/assets/text/fra_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
|
||||||
$(BUILD_DIR)/assets/text/staff_message_data_static.o: $(BUILD_DIR)/assets/text/message_data_staff.enc.nes.h
|
$(BUILD_DIR)/assets/text/staff_message_data_static.o: $(BUILD_DIR)/assets/text/message_data_staff.enc.nes.h
|
||||||
$(BUILD_DIR)/src/code/z_message.o: assets/text/message_data.h assets/text/message_data_staff.h
|
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/text/%.o: assets/text/%.c
|
$(BUILD_DIR)/assets/text/%.o: assets/text/%.c
|
||||||
ifneq ($(COMPILER),gcc)
|
ifneq ($(COMPILER),gcc)
|
||||||
# Preprocess text with modern cpp for varargs macros
|
# Preprocess text with modern cpp for varargs macros
|
||||||
$(CPP) -undef -D_LANGUAGE_C -D__sgi $(CPPFLAGS) $(INC) $< -o $(@:.o=.c)
|
$(CPP) -undef -D_LANGUAGE_C -D__sgi $(CPPFLAGS) -MD -MT $@ $(INC) $< -o $(@:.o=.c)
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $(@:.o=.c)
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $(@:.o=.c)
|
||||||
else
|
else
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||||
|
@ -906,17 +903,19 @@ endif
|
||||||
$(OBJCOPY) -O binary --only-section .rodata $@ $@.bin
|
$(OBJCOPY) -O binary --only-section .rodata $@ $@.bin
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/%.o: assets/%.c
|
$(BUILD_DIR)/assets/%.o: assets/%.c
|
||||||
|
$(CC_CHECK) $< -o $@
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||||
$(OBJCOPY_CMD)
|
$(OBJCOPY_CMD)
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/%.o: $(EXTRACTED_DIR)/assets/%.c
|
$(BUILD_DIR)/assets/%.o: $(EXTRACTED_DIR)/assets/%.c
|
||||||
|
$(CC_CHECK) $< -o $@
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||||
$(OBJCOPY_CMD)
|
$(OBJCOPY_CMD)
|
||||||
|
|
||||||
# Assemble the ROM header with GNU AS always
|
# Assemble the ROM header with GNU AS always
|
||||||
$(BUILD_DIR)/src/makerom/rom_header.o: src/makerom/rom_header.s
|
$(BUILD_DIR)/src/makerom/rom_header.o: src/makerom/rom_header.s
|
||||||
ifeq ($(COMPILER),ido)
|
ifeq ($(COMPILER),ido)
|
||||||
$(CPP) $(CPPFLAGS) $(MIPS_BUILTIN_DEFS) $(INC) $< | $(AS) $(ASFLAGS) -o $@
|
$(CPP) $(CPPFLAGS) $(MIPS_BUILTIN_DEFS) $(INC) -MD -MF $(@:.o=.d) -MT $@ $< | $(AS) $(ASFLAGS) -o $@
|
||||||
else
|
else
|
||||||
$(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $@ $<
|
$(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $@ $<
|
||||||
endif
|
endif
|
||||||
|
@ -927,12 +926,15 @@ $(BUILD_DIR)/src/makerom/ipl3.o: $(EXTRACTED_DIR)/incbin/ipl3
|
||||||
|
|
||||||
$(BUILD_DIR)/src/%.o: src/%.s
|
$(BUILD_DIR)/src/%.o: src/%.s
|
||||||
ifeq ($(COMPILER),ido)
|
ifeq ($(COMPILER),ido)
|
||||||
|
# For header dependencies
|
||||||
|
$(CPP) $(MIPS_BUILTIN_DEFS) $(CPPFLAGS) -x assembler-with-cpp $(INC) -MD -MF $(@:.o=.d) -MT $@ $< -o /dev/null
|
||||||
$(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $(@:.o=.tmp.o) $<
|
$(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $(@:.o=.tmp.o) $<
|
||||||
# IDO generates bad symbol tables, fix the symbol table with strip..
|
# IDO generates bad symbol tables, fix the symbol table with strip..
|
||||||
$(STRIP) $(@:.o=.tmp.o) -N dummy-symbol-name
|
$(STRIP) $(@:.o=.tmp.o) -N dummy-symbol-name
|
||||||
# but strip doesn't know about file-relative offsets in .mdebug and doesn't relocate them, ld will
|
# but strip doesn't know about file-relative offsets in .mdebug and doesn't relocate them, ld will
|
||||||
# segfault unless .mdebug is removed
|
# segfault unless .mdebug is removed
|
||||||
$(OBJCOPY) --remove-section .mdebug $(@:.o=.tmp.o) $@
|
$(OBJCOPY) --remove-section .mdebug $(@:.o=.tmp.o) $@
|
||||||
|
@$(RM) $(@:.o=.tmp.o)
|
||||||
else
|
else
|
||||||
$(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $@ $<
|
$(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $@ $<
|
||||||
endif
|
endif
|
||||||
|
@ -944,6 +946,8 @@ $(BUILD_DIR)/src/code/z_message_z_game_over.o: $(BUILD_DIR)/src/code/z_message.o
|
||||||
$(LD) -r -G 0 -T linker_scripts/data_with_rodata.ld -o $@ $^
|
$(LD) -r -G 0 -T linker_scripts/data_with_rodata.ld -o $@ $^
|
||||||
$(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
|
$(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
|
||||||
|
|
||||||
|
DEP_FILES += $(BUILD_DIR)/src/code/z_message.d $(BUILD_DIR)/src/code/z_game_over.d
|
||||||
|
|
||||||
$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/spec
|
$(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
|
$(MKDMADATA) $< $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt
|
||||||
|
|
||||||
|
@ -951,34 +955,18 @@ $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)
|
||||||
$(BUILD_DIR)/src/boot/z_std_dma.o: $(BUILD_DIR)/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_DIR)/src/dmadata/dmadata.o: $(BUILD_DIR)/dmadata_table_spec.h
|
||||||
|
|
||||||
# Dependencies for files including from include/tables/
|
|
||||||
# TODO remove when full header dependencies are used.
|
|
||||||
$(BUILD_DIR)/src/code/graph.o: include/tables/gamestate_table.h
|
|
||||||
$(BUILD_DIR)/src/code/object_table.o: include/tables/object_table.h
|
|
||||||
$(BUILD_DIR)/src/code/z_actor.o: include/tables/actor_table.h # so uses of ACTOR_ID_MAX update when the table length changes
|
|
||||||
$(BUILD_DIR)/src/code/z_actor_dlftbls.o: include/tables/actor_table.h
|
|
||||||
$(BUILD_DIR)/src/code/z_effect_soft_sprite_dlftbls.o: include/tables/effect_ss_table.h
|
|
||||||
$(BUILD_DIR)/src/code/z_game_dlftbls.o: include/tables/gamestate_table.h
|
|
||||||
$(BUILD_DIR)/src/code/z_scene_table.o: include/tables/scene_table.h include/tables/entrance_table.h
|
|
||||||
$(BUILD_DIR)/src/audio/general.o: $(SEQUENCE_TABLE) include/tables/sfx/*.h
|
|
||||||
$(BUILD_DIR)/src/audio/sfx_params.o: include/tables/sfx/*.h
|
|
||||||
|
|
||||||
$(BUILD_DIR)/src/%.o: src/%.c
|
$(BUILD_DIR)/src/%.o: src/%.c
|
||||||
ifneq ($(RUN_CC_CHECK),0)
|
$(CC_CHECK) $< -o $@
|
||||||
$(CC_CHECK) $<
|
|
||||||
endif
|
|
||||||
$(PREPROCESS) $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
$(PREPROCESS) $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||||
$(POSTPROCESS_OBJ) $@
|
$(POSTPROCESS_OBJ) $@
|
||||||
$(OBJDUMP_CMD)
|
$(OBJDUMP_CMD)
|
||||||
|
|
||||||
$(BUILD_DIR)/src/audio/session_init.o: src/audio/session_init.c $(BUILD_DIR)/assets/audio/soundfont_sizes.h $(BUILD_DIR)/assets/audio/sequence_sizes.h
|
$(BUILD_DIR)/src/audio/session_init.o: src/audio/session_init.c $(BUILD_DIR)/assets/audio/soundfont_sizes.h $(BUILD_DIR)/assets/audio/sequence_sizes.h
|
||||||
ifneq ($(RUN_CC_CHECK),0)
|
$(CC_CHECK) $< -o $@
|
||||||
$(CC_CHECK) $<
|
|
||||||
endif
|
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
|
||||||
$(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $(@:.o=.tmp)
|
$(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $(@:.o=.tmp)
|
||||||
$(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
|
$(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
|
||||||
@$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s)
|
$(OBJDUMP_CMD)
|
||||||
|
|
||||||
ifeq ($(PLATFORM),IQUE)
|
ifeq ($(PLATFORM),IQUE)
|
||||||
ifneq ($(NON_MATCHING),1)
|
ifneq ($(NON_MATCHING),1)
|
||||||
|
@ -1075,11 +1063,12 @@ $(BUILD_DIR)/assets/audio/soundfonts/%.xml: $(EXTRACTED_DIR)/assets/audio/soundf
|
||||||
$(BUILD_DIR)/assets/audio/soundfonts/%.c $(BUILD_DIR)/assets/audio/soundfonts/%.h $(BUILD_DIR)/assets/audio/soundfonts/%.name: $(BUILD_DIR)/assets/audio/soundfonts/%.xml | $(SAMPLEBANK_BUILD_XMLS) $(AIFC_FILES)
|
$(BUILD_DIR)/assets/audio/soundfonts/%.c $(BUILD_DIR)/assets/audio/soundfonts/%.h $(BUILD_DIR)/assets/audio/soundfonts/%.name: $(BUILD_DIR)/assets/audio/soundfonts/%.xml | $(SAMPLEBANK_BUILD_XMLS) $(AIFC_FILES)
|
||||||
# This rule can be triggered for either the .c or .h file, so $@ may refer to either the .c or .h file. A simple
|
# This rule can be triggered for either the .c or .h file, so $@ may refer to either the .c or .h file. A simple
|
||||||
# substitution $(@:.c=.h) will fail ~50% of the time with -j. Instead, don't assume anything about the suffix of $@.
|
# substitution $(@:.c=.h) will fail ~50% of the time with -j. Instead, don't assume anything about the suffix of $@.
|
||||||
$(SFC) $(SFCFLAGS) --makedepend $(basename $@).d $< $(basename $@).c $(basename $@).h $(basename $@).name
|
$(SFC) $(SFCFLAGS) --makedepend $(basename $@).c.d $< $(basename $@).c $(basename $@).h $(basename $@).name
|
||||||
|
|
||||||
-include $(SOUNDFONT_DEP_FILES)
|
-include $(SOUNDFONT_DEP_FILES)
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/audio/soundfonts/%.o: $(BUILD_DIR)/assets/audio/soundfonts/%.c $(BUILD_DIR)/assets/audio/soundfonts/%.name
|
$(BUILD_DIR)/assets/audio/soundfonts/%.o: $(BUILD_DIR)/assets/audio/soundfonts/%.c $(BUILD_DIR)/assets/audio/soundfonts/%.name
|
||||||
|
$(CPP) $(MIPS_BUILTIN_DEFS) $(CPPFLAGS) -x assembler-with-cpp $(INC) -I include/audio -MD -MF $(@:.o=.d) -MT $@ $< -o /dev/null
|
||||||
# compile c to unlinked object
|
# compile c to unlinked object
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -I include/audio -o $(@:.o=.tmp) $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -I include/audio -o $(@:.o=.tmp) $<
|
||||||
# partial link
|
# partial link
|
||||||
|
@ -1100,11 +1089,11 @@ endif
|
||||||
# then assemble the sequences...
|
# then assemble the sequences...
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/audio/sequences/%.o: assets/audio/sequences/%.seq include/audio/aseq.h $(SEQUENCE_TABLE) | $(SOUNDFONT_HEADERS)
|
$(BUILD_DIR)/assets/audio/sequences/%.o: assets/audio/sequences/%.seq include/audio/aseq.h $(SEQUENCE_TABLE) | $(SOUNDFONT_HEADERS)
|
||||||
$(SEQ_CPP) $(SEQ_CPPFLAGS) $< -o $(@:.o=.s) -MMD -MT $@
|
$(SEQ_CPP) $(SEQ_CPPFLAGS) -MD -MT $@ $< -o $(@:.o=.s)
|
||||||
$(AS) $(ASFLAGS) -I $(BUILD_DIR)/assets/audio/soundfonts -I include/audio -I $(dir $<) $(@:.o=.s) -o $@
|
$(AS) $(ASFLAGS) -I $(BUILD_DIR)/assets/audio/soundfonts -I include/audio -I $(dir $<) $(@:.o=.s) -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/audio/sequences/%.o: $(EXTRACTED_DIR)/assets/audio/sequences/%.seq include/audio/aseq.h $(SEQUENCE_TABLE) | $(SOUNDFONT_HEADERS)
|
$(BUILD_DIR)/assets/audio/sequences/%.o: $(EXTRACTED_DIR)/assets/audio/sequences/%.seq include/audio/aseq.h $(SEQUENCE_TABLE) | $(SOUNDFONT_HEADERS)
|
||||||
$(SEQ_CPP) $(SEQ_CPPFLAGS) $< -o $(@:.o=.s) -MMD -MT $@
|
$(SEQ_CPP) $(SEQ_CPPFLAGS) -MD -MT $@ $< -o $(@:.o=.s)
|
||||||
$(AS) $(ASFLAGS) -I $(BUILD_DIR)/assets/audio/soundfonts -I include/audio -I $(dir $<) $(@:.o=.s) -o $@
|
$(AS) $(ASFLAGS) -I $(BUILD_DIR)/assets/audio/soundfonts -I include/audio -I $(dir $<) $(@:.o=.s) -o $@
|
||||||
ifeq ($(AUDIO_BUILD_DEBUG),1)
|
ifeq ($(AUDIO_BUILD_DEBUG),1)
|
||||||
$(OBJCOPY) -O binary -j.data $@ $(@:.o=.aseq)
|
$(OBJCOPY) -O binary -j.data $@ $(@:.o=.aseq)
|
||||||
|
@ -1138,9 +1127,7 @@ $(BUILD_DIR)/src/audio/tables/sequence_table.o: src/audio/tables/sequence_table.
|
||||||
$(BUILD_DIR)/src/audio/tables/sequence_table.o: CFLAGS += -I include/tables
|
$(BUILD_DIR)/src/audio/tables/sequence_table.o: CFLAGS += -I include/tables
|
||||||
|
|
||||||
$(BUILD_DIR)/src/audio/tables/%.o: src/audio/tables/%.c
|
$(BUILD_DIR)/src/audio/tables/%.o: src/audio/tables/%.c
|
||||||
ifneq ($(RUN_CC_CHECK),0)
|
$(CC_CHECK) $< -o $@
|
||||||
$(CC_CHECK) $<
|
|
||||||
endif
|
|
||||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
|
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
|
||||||
$(LD) -r -T linker_scripts/data_with_rodata.ld $(@:.o=.tmp) -o $@
|
$(LD) -r -T linker_scripts/data_with_rodata.ld $(@:.o=.tmp) -o $@
|
||||||
$(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
|
$(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
|
||||||
|
|
|
@ -55,12 +55,12 @@ cd build-binutils
|
||||||
|
|
||||||
Configure the build
|
Configure the build
|
||||||
```bash
|
```bash
|
||||||
../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror
|
../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --with-system-zlib --disable-gprof --disable-gdb --disable-werror
|
||||||
```
|
```
|
||||||
|
|
||||||
Make and install binutils
|
Make and install binutils
|
||||||
```bash
|
```bash
|
||||||
make -j
|
make -j$(nproc)
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -82,3 +82,44 @@ If this worked, you can now delete the temporary directory `~/binutils-tmp`.
|
||||||
Apple's version of `make` is very out-of-date, so you should use the brew-installed `gmake` in place of `make` in this repo from now on.
|
Apple's version of `make` is very out-of-date, so you should use the brew-installed `gmake` in place of `make` in this repo from now on.
|
||||||
|
|
||||||
You should now be able to continue from [step 2](../README.md#2-clone-the-repository) of the Linux instructions.
|
You should now be able to continue from [step 2](../README.md#2-clone-the-repository) of the Linux instructions.
|
||||||
|
|
||||||
|
|
||||||
|
## 4. Building GCC (optional)
|
||||||
|
|
||||||
|
If you'd like to compile with GCC instead of IDO (e.g. for modding), you can build it from source similarly to how we built binutils:
|
||||||
|
|
||||||
|
Install dependences
|
||||||
|
```bash
|
||||||
|
brew install gcc@14 gmp isl libmpc mpfr
|
||||||
|
```
|
||||||
|
|
||||||
|
Create and enter local working dir
|
||||||
|
```bash
|
||||||
|
mkdir ~/gcc-tmp
|
||||||
|
cd ~/gcc-tmp
|
||||||
|
```
|
||||||
|
|
||||||
|
Get and extract gcc source
|
||||||
|
```bash
|
||||||
|
curl -O https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz
|
||||||
|
tar xvf gcc-14.2.0.tar.xz
|
||||||
|
```
|
||||||
|
|
||||||
|
Create and enter a build directory
|
||||||
|
```bash
|
||||||
|
mkdir build-gcc
|
||||||
|
cd build-gcc
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the build
|
||||||
|
```bash
|
||||||
|
CC=gcc-14 CXX=g++-14 ../gcc-14.2.0/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-nls --enable-languages=c --with-gmp=$(brew --prefix)/opt/gmp --with-mpfr=$(brew --prefix)/opt/mpfr --with-mpc=$(brew --prefix)/opt/libmpc --with-isl=$(brew --prefix)/opt/isl
|
||||||
|
```
|
||||||
|
|
||||||
|
Make and install gcc
|
||||||
|
```bash
|
||||||
|
CC=gcc-14 CXX=g++-14 make all-gcc -j$(nproc)
|
||||||
|
sudo make install-gcc
|
||||||
|
```
|
||||||
|
|
||||||
|
If this worked, you can now delete the temporary directory `~/gcc-tmp`.
|
||||||
|
|
8
include/array_count.h
Normal file
8
include/array_count.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef ARRAY_COUNT_H
|
||||||
|
#define ARRAY_COUNT_H
|
||||||
|
|
||||||
|
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||||
|
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||||
|
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
|
||||||
|
|
||||||
|
#endif
|
13
include/avoid_ub.h
Normal file
13
include/avoid_ub.h
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef AVOID_UB_H
|
||||||
|
#define AVOID_UB_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This macro is used when the return type of a function is incorrect
|
||||||
|
*/
|
||||||
|
#ifndef AVOID_UB
|
||||||
|
#define BAD_RETURN(type) type
|
||||||
|
#else
|
||||||
|
#define BAD_RETURN(type) void
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -2,7 +2,6 @@
|
||||||
#define BUFFERS_H
|
#define BUFFERS_H
|
||||||
|
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
|
|
||||||
extern u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; // 0x25800 bytes
|
extern u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; // 0x25800 bytes
|
||||||
|
|
|
@ -33,4 +33,6 @@ typedef union Color_RGBA16 {
|
||||||
u16 rgba;
|
u16 rgba;
|
||||||
} Color_RGBA16;
|
} Color_RGBA16;
|
||||||
|
|
||||||
|
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#ifndef FAULT_H
|
#ifndef FAULT_H
|
||||||
#define FAULT_H
|
#define FAULT_H
|
||||||
|
|
||||||
#include "ultra64.h"
|
#include "libu64/debug.h"
|
||||||
#include "attributes.h"
|
|
||||||
#include "libu64/pad.h"
|
#include "libu64/pad.h"
|
||||||
|
#include "attributes.h"
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
#if !PLATFORM_N64
|
#if !PLATFORM_N64
|
||||||
// These are the same as the 3-bit ansi color codes
|
// These are the same as the 3-bit ansi color codes
|
||||||
|
@ -50,6 +51,12 @@ void Fault_Init(void);
|
||||||
NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2);
|
NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2);
|
||||||
NORETURN void Fault_AddHungupAndCrash(const char* file, int line);
|
NORETURN void Fault_AddHungupAndCrash(const char* file, int line);
|
||||||
|
|
||||||
|
#if PLATFORM_N64 || DEBUG_FEATURES
|
||||||
|
#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
|
||||||
|
#else
|
||||||
|
#define HUNGUP_AND_CRASH(file, line) LogUtils_HungupThread(file, line)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Client Registration
|
// Client Registration
|
||||||
|
|
||||||
void Fault_AddClient(FaultClient* client, void* callback, void* arg0, void* arg1);
|
void Fault_AddClient(FaultClient* client, void* callback, void* arg0, void* arg1);
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
#include "thga.h"
|
#include "thga.h"
|
||||||
#include "versions.h"
|
#include "versions.h"
|
||||||
|
|
||||||
|
#define SCREEN_WIDTH 320
|
||||||
|
#define SCREEN_HEIGHT 240
|
||||||
|
|
||||||
// Texture memory size, 4 KiB
|
// Texture memory size, 4 KiB
|
||||||
#define TMEM_SIZE 0x1000
|
#define TMEM_SIZE 0x1000
|
||||||
|
|
||||||
|
@ -124,4 +127,39 @@ void Graph_ThreadEntry(void*);
|
||||||
extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
|
extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
|
||||||
extern u64 gMojiFontTex[]; // original name: "font_ff"
|
extern u64 gMojiFontTex[]; // original name: "font_ff"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `x` vertex x
|
||||||
|
* `y` vertex y
|
||||||
|
* `z` vertex z
|
||||||
|
* `s` texture s coordinate
|
||||||
|
* `t` texture t coordinate
|
||||||
|
* `crnx` red component of color vertex, or x component of normal vertex
|
||||||
|
* `cgny` green component of color vertex, or y component of normal vertex
|
||||||
|
* `cbnz` blue component of color vertex, or z component of normal vertex
|
||||||
|
* `a` alpha
|
||||||
|
*/
|
||||||
|
#define VTX(x,y,z,s,t,crnx,cgny,cbnz,a) { { { x, y, z }, 0, { s, t }, { crnx, cgny, cbnz, a } } }
|
||||||
|
|
||||||
|
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
|
||||||
|
|
||||||
|
#define gDPSetTileCustom(pkt, fmt, siz, uls, ult, lrs, lrt, pal, \
|
||||||
|
cms, cmt, masks, maskt, shifts, shiftt) \
|
||||||
|
_DW({ \
|
||||||
|
gDPPipeSync(pkt); \
|
||||||
|
gDPTileSync(pkt); \
|
||||||
|
gDPSetTile(pkt, fmt, siz, \
|
||||||
|
(((((lrs) - (uls) + 1) * siz##_TILE_BYTES) + 7) >> 3), 0, \
|
||||||
|
G_TX_LOADTILE, 0, cmt, maskt, shiftt, cms, masks, \
|
||||||
|
shifts); \
|
||||||
|
gDPTileSync(pkt); \
|
||||||
|
gDPSetTile(pkt, fmt, siz, \
|
||||||
|
(((((lrs) - (uls) + 1) * siz##_LINE_BYTES) + 7) >> 3), 0, \
|
||||||
|
G_TX_RENDERTILE, pal, cmt, maskt, shiftt, cms, masks, shifts); \
|
||||||
|
gDPSetTileSize(pkt, G_TX_RENDERTILE, \
|
||||||
|
(uls) << G_TEXTURE_IMAGE_FRAC, \
|
||||||
|
(ult) << G_TEXTURE_IMAGE_FRAC, \
|
||||||
|
(lrs) << G_TEXTURE_IMAGE_FRAC, \
|
||||||
|
(lrt) << G_TEXTURE_IMAGE_FRAC); \
|
||||||
|
})
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#ifndef GLOBAL_H
|
|
||||||
#define GLOBAL_H
|
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#endif
|
|
12
include/language_array.h
Normal file
12
include/language_array.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef LANGUAGE_ARRAY_H
|
||||||
|
#define LANGUAGE_ARRAY_H
|
||||||
|
|
||||||
|
#include "versions.h"
|
||||||
|
|
||||||
|
#if OOT_NTSC
|
||||||
|
#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { jpn, eng }
|
||||||
|
#else
|
||||||
|
#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { eng, ger, fra }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,90 +0,0 @@
|
||||||
#ifndef MACROS_H
|
|
||||||
#define MACROS_H
|
|
||||||
|
|
||||||
#include "versions.h"
|
|
||||||
|
|
||||||
#define SCREEN_WIDTH 320
|
|
||||||
#define SCREEN_HEIGHT 240
|
|
||||||
|
|
||||||
#ifndef AVOID_UB
|
|
||||||
#define BAD_RETURN(type) type
|
|
||||||
#else
|
|
||||||
#define BAD_RETURN(type) void
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
|
||||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
|
||||||
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
|
|
||||||
|
|
||||||
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
|
|
||||||
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)
|
|
||||||
|
|
||||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
|
||||||
#define DECR(x) ((x) == 0 ? 0 : --(x))
|
|
||||||
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
|
|
||||||
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
|
|
||||||
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
|
|
||||||
|
|
||||||
#define SWAP(type, a, b) \
|
|
||||||
{ \
|
|
||||||
type _temp = (a); \
|
|
||||||
(a) = (b); \
|
|
||||||
(b) = _temp; \
|
|
||||||
} \
|
|
||||||
(void)0
|
|
||||||
|
|
||||||
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
|
|
||||||
|
|
||||||
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
|
|
||||||
|
|
||||||
#if PLATFORM_N64 || DEBUG_FEATURES
|
|
||||||
#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
|
|
||||||
#else
|
|
||||||
#define HUNGUP_AND_CRASH(file, line) LogUtils_HungupThread(file, line)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MATRIX_FINALIZE_AND_LOAD(pkt, gfxCtx, file, line) \
|
|
||||||
gSPMatrix(pkt, MATRIX_FINALIZE(gfxCtx, file, line), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW)
|
|
||||||
|
|
||||||
#if OOT_NTSC
|
|
||||||
#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { jpn, eng }
|
|
||||||
#else
|
|
||||||
#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { eng, ger, fra }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `x` vertex x
|
|
||||||
* `y` vertex y
|
|
||||||
* `z` vertex z
|
|
||||||
* `s` texture s coordinate
|
|
||||||
* `t` texture t coordinate
|
|
||||||
* `crnx` red component of color vertex, or x component of normal vertex
|
|
||||||
* `cgny` green component of color vertex, or y component of normal vertex
|
|
||||||
* `cbnz` blue component of color vertex, or z component of normal vertex
|
|
||||||
* `a` alpha
|
|
||||||
*/
|
|
||||||
#define VTX(x,y,z,s,t,crnx,cgny,cbnz,a) { { { x, y, z }, 0, { s, t }, { crnx, cgny, cbnz, a } } }
|
|
||||||
|
|
||||||
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
|
|
||||||
|
|
||||||
#define gDPSetTileCustom(pkt, fmt, siz, uls, ult, lrs, lrt, pal, \
|
|
||||||
cms, cmt, masks, maskt, shifts, shiftt) \
|
|
||||||
_DW({ \
|
|
||||||
gDPPipeSync(pkt); \
|
|
||||||
gDPTileSync(pkt); \
|
|
||||||
gDPSetTile(pkt, fmt, siz, \
|
|
||||||
(((((lrs) - (uls) + 1) * siz##_TILE_BYTES) + 7) >> 3), 0, \
|
|
||||||
G_TX_LOADTILE, 0, cmt, maskt, shiftt, cms, masks, \
|
|
||||||
shifts); \
|
|
||||||
gDPTileSync(pkt); \
|
|
||||||
gDPSetTile(pkt, fmt, siz, \
|
|
||||||
(((((lrs) - (uls) + 1) * siz##_LINE_BYTES) + 7) >> 3), 0, \
|
|
||||||
G_TX_RENDERTILE, pal, cmt, maskt, shiftt, cms, masks, shifts); \
|
|
||||||
gDPSetTileSize(pkt, G_TX_RENDERTILE, \
|
|
||||||
(uls) << G_TEXTURE_IMAGE_FRAC, \
|
|
||||||
(ult) << G_TEXTURE_IMAGE_FRAC, \
|
|
||||||
(lrs) << G_TEXTURE_IMAGE_FRAC, \
|
|
||||||
(lrt) << G_TEXTURE_IMAGE_FRAC); \
|
|
||||||
})
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -64,6 +64,9 @@ Mtx* Matrix_Finalize(struct GraphicsContext* gfxCtx);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MATRIX_FINALIZE_AND_LOAD(pkt, gfxCtx, file, line) \
|
||||||
|
gSPMatrix(pkt, MATRIX_FINALIZE(gfxCtx, file, line), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW)
|
||||||
|
|
||||||
/* Vector operations */
|
/* Vector operations */
|
||||||
|
|
||||||
void Matrix_MultVec3f(Vec3f* src, Vec3f* dest);
|
void Matrix_MultVec3f(Vec3f* src, Vec3f* dest);
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
// TODO: This file still exists ONLY to provide neccesary headers to extracted assets.
|
// TODO: This file still exists ONLY to provide neccesary headers to extracted assets.
|
||||||
// After assets are modified to include the headers they need directly, delete this file.
|
// After assets are modified to include the headers they need directly, delete this file.
|
||||||
|
|
||||||
|
#include "array_count.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "sys_matrix.h"
|
#include "sys_matrix.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
|
|
|
@ -160,6 +160,8 @@ typedef struct ActorShape {
|
||||||
// Flag controlling the use of `Actor.sfx`. Do not use directly. See Actor_PlaySfx_FlaggedTimer
|
// Flag controlling the use of `Actor.sfx`. Do not use directly. See Actor_PlaySfx_FlaggedTimer
|
||||||
#define ACTOR_FLAG_SFX_TIMER (1 << 28)
|
#define ACTOR_FLAG_SFX_TIMER (1 << 28)
|
||||||
|
|
||||||
|
#define ACTOR_FLAGS_CHECK_ALL(thisx, mask) (((thisx)->flags & (mask)) == (mask))
|
||||||
|
|
||||||
#define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5)
|
#define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5)
|
||||||
#define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF)
|
#define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef Z64_ANIMATION_H
|
#ifndef Z64_ANIMATION_H
|
||||||
#define Z64_ANIMATION_H
|
#define Z64_ANIMATION_H
|
||||||
|
|
||||||
|
#include "avoid_ub.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64dma.h"
|
#include "z64dma.h"
|
||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
struct PlayState;
|
struct PlayState;
|
||||||
struct Actor;
|
struct Actor;
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
#ifndef Z64MATH_H
|
#ifndef Z64MATH_H
|
||||||
#define Z64MATH_H
|
#define Z64MATH_H
|
||||||
|
|
||||||
#include "ultra64.h"
|
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
|
#include "ultra64.h"
|
||||||
#define SQ(x) ((x)*(x))
|
|
||||||
#define VEC_SET(V,X,Y,Z) (V).x=(X);(V).y=(Y);(V).z=(Z)
|
|
||||||
|
|
||||||
typedef union FloatInt {
|
typedef union FloatInt {
|
||||||
f32 f;
|
f32 f;
|
||||||
|
@ -95,6 +92,27 @@ typedef VecSphGeo VecSph;
|
||||||
// Pitch is 0 along the xz-plane (horizon)
|
// Pitch is 0 along the xz-plane (horizon)
|
||||||
typedef VecSphGeo VecGeo;
|
typedef VecSphGeo VecGeo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Macros
|
||||||
|
*/
|
||||||
|
|
||||||
|
// General number macros
|
||||||
|
#define SQ(x) ((x)*(x))
|
||||||
|
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||||
|
#define DECR(x) ((x) == 0 ? 0 : --(x))
|
||||||
|
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
|
||||||
|
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
|
||||||
|
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
|
||||||
|
|
||||||
|
#define SWAP(type, a, b) \
|
||||||
|
{ \
|
||||||
|
type _temp = (a); \
|
||||||
|
(a) = (b); \
|
||||||
|
(b) = _temp; \
|
||||||
|
} \
|
||||||
|
(void)0
|
||||||
|
|
||||||
|
// LERP macros
|
||||||
#define LERP(x, y, scale) (((y) - (x)) * (scale) + (x))
|
#define LERP(x, y, scale) (((y) - (x)) * (scale) + (x))
|
||||||
#define LERP32(x, y, scale) ((s32)(((y) - (x)) * (scale)) + (x))
|
#define LERP32(x, y, scale) ((s32)(((y) - (x)) * (scale)) + (x))
|
||||||
#define LERP16(x, y, scale) ((s16)(((y) - (x)) * (scale)) + (x))
|
#define LERP16(x, y, scale) ((s16)(((y) - (x)) * (scale)) + (x))
|
||||||
|
@ -110,6 +128,7 @@ typedef VecSphGeo VecGeo;
|
||||||
(dst)->z = (v0)->z + (((v1)->z - (v0)->z) * t); \
|
(dst)->z = (v0)->z + (((v1)->z - (v0)->z) * t); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Floating point macros
|
||||||
#define IS_ZERO(f) (fabsf(f) < 0.008f)
|
#define IS_ZERO(f) (fabsf(f) < 0.008f)
|
||||||
|
|
||||||
// Casting a float to an integer, when the float value is larger than what the integer type can hold,
|
// Casting a float to an integer, when the float value is larger than what the integer type can hold,
|
||||||
|
@ -145,6 +164,7 @@ typedef VecSphGeo VecGeo;
|
||||||
#define CAM_BINANG_TO_DEG(binang) ((f32)(binang) * (360.0001525f / 65535.0f))
|
#define CAM_BINANG_TO_DEG(binang) ((f32)(binang) * (360.0001525f / 65535.0f))
|
||||||
|
|
||||||
// Vector macros
|
// Vector macros
|
||||||
|
#define VEC_SET(V,X,Y,Z) (V).x=(X);(V).y=(Y);(V).z=(Z)
|
||||||
#define SQXZ(vec) ((vec).x * (vec).x + (vec).z * (vec).z)
|
#define SQXZ(vec) ((vec).x * (vec).x + (vec).z * (vec).z)
|
||||||
#define DOTXZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).z * (vec2).z)
|
#define DOTXZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).z * (vec2).z)
|
||||||
#define SQXYZ(vec) ((vec).x * (vec).x + (vec).y * (vec).y + (vec).z * (vec).z)
|
#define SQXYZ(vec) ((vec).x * (vec).x + (vec).y * (vec).y + (vec).z * (vec).z)
|
||||||
|
|
|
@ -593,13 +593,10 @@ typedef enum LinkAge {
|
||||||
EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_2_RESCUED) | EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_3_RESCUED))
|
EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_2_RESCUED) | EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_3_RESCUED))
|
||||||
|
|
||||||
#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED() \
|
#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED() \
|
||||||
CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED], \
|
((gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) == (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK))
|
||||||
EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK)
|
|
||||||
|
|
||||||
#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED2() \
|
#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED2() \
|
||||||
CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & \
|
((gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK | 0xF0) & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) == (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK))
|
||||||
(EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK | 0xF0), \
|
|
||||||
EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK)
|
|
||||||
|
|
||||||
#define ENDAIKU_CARPENTER_RESCUED_MASK(carpenterType) (1 << (carpenterType))
|
#define ENDAIKU_CARPENTER_RESCUED_MASK(carpenterType) (1 << (carpenterType))
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef Z64SCENE_H
|
#ifndef Z64SCENE_H
|
||||||
#define Z64SCENE_H
|
#define Z64SCENE_H
|
||||||
|
|
||||||
#include "macros.h"
|
#include "avoid_ub.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64bgcheck.h"
|
#include "z64bgcheck.h"
|
||||||
#include "z64environment.h"
|
#include "z64environment.h"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef Z64VIEW_H
|
#ifndef Z64VIEW_H
|
||||||
#define Z64VIEW_H
|
#define Z64VIEW_H
|
||||||
|
|
||||||
#include "macros.h"
|
#include "avoid_ub.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
#include "array_count.h"
|
||||||
|
#include "sfx.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "sfx.h"
|
|
||||||
|
|
||||||
// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
|
// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
|
||||||
u8 gSfxRequestWriteIndex = 0;
|
u8 gSfxRequestWriteIndex = 0;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
#include "ultra64.h"
|
#include "array_count.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "audiothread_cmd.h"
|
#include "audiothread_cmd.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
|
@ -8,12 +8,11 @@
|
||||||
#include "seqcmd.h"
|
#include "seqcmd.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
#include "ultra64.h"
|
||||||
#include "versions.h"
|
#include "versions.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
#include "z64ocarina.h"
|
#include "z64ocarina.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||||
|
|
||||||
#if !PLATFORM_N64
|
#if !PLATFORM_N64
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Original Filename: system.c
|
* Original Filename: system.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "array_count.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "segment_symbols.h"
|
#include "segment_symbols.h"
|
||||||
|
@ -8,8 +10,6 @@
|
||||||
#include "versions.h"
|
#include "versions.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#define MK_ASYNC_MSG(retData, tableType, id, loadStatus) \
|
#define MK_ASYNC_MSG(retData, tableType, id, loadStatus) \
|
||||||
(((retData) << 24) | ((tableType) << 16) | ((id) << 8) | (loadStatus))
|
(((retData) << 24) | ((tableType) << 16) | ((id) << 8) | (loadStatus))
|
||||||
#define ASYNC_TBLTYPE(v) ((u8)(v >> 16))
|
#define ASYNC_TBLTYPE(v) ((u8)(v >> 16))
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
|
||||||
void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
|
void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
* Otherwise, each set of instructions has its own command interpreter
|
* Otherwise, each set of instructions has its own command interpreter
|
||||||
*/
|
*/
|
||||||
#include "audio/aseq.h"
|
#include "audio/aseq.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* Original Filename: sub_sys.c
|
* Original Filename: sub_sys.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "array_count.h"
|
||||||
#include "audiothread_cmd.h"
|
#include "audiothread_cmd.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "versions.h"
|
#include "versions.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
|
|
@ -17,15 +17,14 @@
|
||||||
* Nor are these commands to be confused with the internal audio commands used to transfer requests from
|
* Nor are these commands to be confused with the internal audio commands used to transfer requests from
|
||||||
* the graph thread to the audio thread.
|
* the graph thread to the audio thread.
|
||||||
*/
|
*/
|
||||||
|
#include "array_count.h"
|
||||||
#include "audiothread_cmd.h"
|
#include "audiothread_cmd.h"
|
||||||
#include "ultra64.h"
|
|
||||||
#include "ultra64/abi.h"
|
|
||||||
#include "seqcmd.h"
|
#include "seqcmd.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
#include "ultra64.h"
|
||||||
|
#include "ultra64/abi.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
// Direct audio command (skips the queueing system)
|
// Direct audio command (skips the queueing system)
|
||||||
#define SEQCMD_SET_SEQPLAYER_VOLUME_NOW(seqPlayerIndex, duration, volume) \
|
#define SEQCMD_SET_SEQPLAYER_VOLUME_NOW(seqPlayerIndex, duration, volume) \
|
||||||
Audio_ProcessSeqCmd((SEQCMD_OP_SET_SEQPLAYER_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | \
|
Audio_ProcessSeqCmd((SEQCMD_OP_SET_SEQPLAYER_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | \
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "assets/audio/sequence_sizes.h"
|
#include "assets/audio/sequence_sizes.h"
|
||||||
#include "assets/audio/soundfont_sizes.h"
|
#include "assets/audio/soundfont_sizes.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "audiothread_cmd.h"
|
#include "audiothread_cmd.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "z_locale.h"
|
#include "z_locale.h"
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:128"
|
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:128"
|
||||||
|
|
||||||
StackEntry sBootThreadInfo;
|
StackEntry sBootThreadInfo;
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
s32 func_80001714(void);
|
s32 func_80001714(void);
|
||||||
|
|
||||||
OSTask D_800067C0_unknown = {
|
OSTask D_800067C0_unknown = {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "idle.h"
|
#include "idle.h"
|
||||||
|
@ -13,8 +14,6 @@
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
#include "z64dma.h"
|
#include "z64dma.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
||||||
"ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
|
"ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "idle.h"
|
#include "idle.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
s8 D_80009430 = 1;
|
s8 D_80009430 = 1;
|
||||||
vu8 gViConfigBlack = true;
|
vu8 gViConfigBlack = true;
|
||||||
u8 gViConfigAdditionalScanLines = 0;
|
u8 gViConfigAdditionalScanLines = 0;
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
#include "vi_mode.h"
|
#include "vi_mode.h"
|
||||||
#include "z_locale.h"
|
#include "z_locale.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
s32 gCurrentRegion = 0;
|
s32 gCurrentRegion = 0;
|
||||||
|
|
||||||
typedef struct LocaleCartInfo {
|
typedef struct LocaleCartInfo {
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "libc64/sleep.h"
|
#include "libc64/sleep.h"
|
||||||
#include "libc64/sprintf.h"
|
#include "libc64/sprintf.h"
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "carthandle.h"
|
#include "carthandle.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
@ -44,8 +45,6 @@
|
||||||
#include "z64dma.h"
|
#include "z64dma.h"
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:66" \
|
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:66" \
|
||||||
"pal-1.0:64 pal-1.1:64"
|
"pal-1.0:64 pal-1.1:64"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "alignment.h"
|
#include "alignment.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "ultra64/ultratypes.h"
|
#include "ultra64/ultratypes.h"
|
||||||
|
|
||||||
ALIGNED(64) u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH];
|
ALIGNED(64) u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH];
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
|
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
|
||||||
this->widthSave = width;
|
this->widthSave = width;
|
||||||
this->heightSave = height;
|
this->heightSave = height;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
u8 sSfxBankIds[] = {
|
u8 sSfxBankIds[] = {
|
||||||
BANK_PLAYER, BANK_ITEM, BANK_ENV, BANK_ENEMY, BANK_SYSTEM, BANK_OCARINA, BANK_VOICE,
|
BANK_PLAYER, BANK_ITEM, BANK_ENV, BANK_ENEMY, BANK_SYSTEM, BANK_OCARINA, BANK_VOICE,
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* and sending the audio rsp tasks generated by the driver to the task scheduler.
|
* and sending the audio rsp tasks generated by the driver to the task scheduler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "array_count.h"
|
||||||
#include "audiomgr.h"
|
#include "audiomgr.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
|
@ -12,8 +13,6 @@
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
#include "z64dma.h"
|
#include "z64dma.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
void AudioMgr_NotifyTaskDone(AudioMgr* audioMgr) {
|
void AudioMgr_NotifyTaskDone(AudioMgr* audioMgr) {
|
||||||
AudioTask* task = audioMgr->rspTask;
|
AudioTask* task = audioMgr->rspTask;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "db_camera.h"
|
#include "db_camera.h"
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#define LOG_SEVERITY_NOLOG 0
|
#define LOG_SEVERITY_NOLOG 0
|
||||||
#define LOG_SEVERITY_ERROR 2
|
#define LOG_SEVERITY_ERROR 2
|
||||||
#define LOG_SEVERITY_VERBOSE 3
|
#define LOG_SEVERITY_VERBOSE 3
|
||||||
|
|
|
@ -41,13 +41,15 @@
|
||||||
* DPad-Down disables sending fault pages over osSyncPrintf.
|
* DPad-Down disables sending fault pages over osSyncPrintf.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-eu-mq-dbg:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192" \
|
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \
|
||||||
"gc-us-mq:192 ique-cn:192"
|
"gc-us-mq:160 ique-cn:160"
|
||||||
|
|
||||||
#include "libc64/sleep.h"
|
#include "libc64/sleep.h"
|
||||||
#include "libc64/sprintf.h"
|
#include "libc64/sprintf.h"
|
||||||
#include "alloca.h"
|
#include "alloca.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "padmgr.h"
|
#include "padmgr.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
@ -56,8 +58,6 @@
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
void Fault_Init(void);
|
void Fault_Init(void);
|
||||||
void Fault_SetOsSyncPrintfEnabled(u32 enabled);
|
void Fault_SetOsSyncPrintfEnabled(u32 enabled);
|
||||||
void Fault_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 color);
|
void Fault_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 color);
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* the crash screen implemented by fault.c
|
* the crash screen implemented by fault.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "array_count.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||||
|
|
||||||
typedef struct FaultDrawer {
|
typedef struct FaultDrawer {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#include "libc64/os_malloc.h"
|
#include "libc64/os_malloc.h"
|
||||||
#include "libc64/sleep.h"
|
#include "libc64/sleep.h"
|
||||||
#include "libc64/sprintf.h"
|
#include "libc64/sprintf.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "padmgr.h"
|
#include "padmgr.h"
|
||||||
#include "segmented_address.h"
|
#include "segmented_address.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
@ -11,9 +13,7 @@
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
|
||||||
#include "global.h"
|
#pragma increment_block_number "ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144 pal-1.0:144 pal-1.1:144"
|
||||||
|
|
||||||
#pragma increment_block_number "ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:176 pal-1.1:176"
|
|
||||||
|
|
||||||
typedef struct FaultMgr {
|
typedef struct FaultMgr {
|
||||||
OSThread thread;
|
OSThread thread;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "libc64/os_malloc.h"
|
#include "libc64/os_malloc.h"
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "audiomgr.h"
|
#include "audiomgr.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
|
@ -31,9 +32,6 @@
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
#include "z64vis.h"
|
#include "z64vis.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||||
|
|
||||||
SpeedMeter D_801664D0;
|
SpeedMeter D_801664D0;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "gamealloc.h"
|
#include "gamealloc.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
void GameAlloc_Log(GameAlloc* this) {
|
void GameAlloc_Log(GameAlloc* this) {
|
||||||
GameAllocEntry* iter;
|
GameAllocEntry* iter;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "libc64/malloc.h"
|
#include "libc64/malloc.h"
|
||||||
#include "libc64/sprintf.h"
|
#include "libc64/sprintf.h"
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "console_logo_state.h"
|
#include "console_logo_state.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
|
@ -30,9 +30,6 @@
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#define GFXPOOL_HEAD_MAGIC 0x1234
|
#define GFXPOOL_HEAD_MAGIC 0x1234
|
||||||
#define GFXPOOL_TAIL_MAGIC 0x5678
|
#define GFXPOOL_TAIL_MAGIC 0x5678
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
* @see sched.c
|
* @see sched.c
|
||||||
*/
|
*/
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "irqmgr.h"
|
#include "irqmgr.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "stackcheck.h"
|
#include "stackcheck.h"
|
||||||
|
@ -41,8 +42,6 @@
|
||||||
#include "versions.h"
|
#include "versions.h"
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
|
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
|
||||||
volatile OSTime sIrqMgrResetTime = 0;
|
volatile OSTime sIrqMgrResetTime = 0;
|
||||||
volatile OSTime gIrqMgrRetraceTime = 0;
|
volatile OSTime gIrqMgrRetraceTime = 0;
|
||||||
|
|
|
@ -19,6 +19,7 @@ extern struct IrqMgr gIrqMgr;
|
||||||
#include "libc64/malloc.h"
|
#include "libc64/malloc.h"
|
||||||
#include "libu64/rcp_utils.h"
|
#include "libu64/rcp_utils.h"
|
||||||
#include "libu64/runtime.h"
|
#include "libu64/runtime.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "audiomgr.h"
|
#include "audiomgr.h"
|
||||||
#include "debug_arena.h"
|
#include "debug_arena.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
@ -42,10 +43,8 @@ extern struct IrqMgr gIrqMgr;
|
||||||
#include "z64debug.h"
|
#include "z64debug.h"
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||||
"ique-cn:0 ntsc-1.0:35 ntsc-1.1:35 ntsc-1.2:35 pal-1.0:33 pal-1.1:33"
|
"ique-cn:0 ntsc-1.0:34 ntsc-1.1:34 ntsc-1.2:34 pal-1.0:32 pal-1.1:32"
|
||||||
|
|
||||||
extern u8 _buffersSegmentEnd[];
|
extern u8 _buffersSegmentEnd[];
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "padmgr.h"
|
#include "padmgr.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#define MEMPAK_MAX_FILES 11
|
#define MEMPAK_MAX_FILES 11
|
||||||
|
|
||||||
OSPfs sMempakPfsHandle;
|
OSPfs sMempakPfsHandle;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "segment_symbols.h"
|
#include "segment_symbols.h"
|
||||||
#include "romfile.h"
|
#include "romfile.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64object.h"
|
#include "z64object.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
s16 gLinkObjectIds[] = { OBJECT_LINK_BOY, OBJECT_LINK_CHILD };
|
s16 gLinkObjectIds[] = { OBJECT_LINK_BOY, OBJECT_LINK_CHILD };
|
||||||
|
|
||||||
u32 gObjectTableSize = ARRAY_COUNT(gObjectTable);
|
u32 gObjectTableSize = ARRAY_COUNT(gObjectTable);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*/
|
*/
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
#include "libu64/padsetup.h"
|
#include "libu64/padsetup.h"
|
||||||
#include "macros.h"
|
#include "array_count.h"
|
||||||
#include "padmgr.h"
|
#include "padmgr.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
*/
|
*/
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
#include "libu64/rcp_utils.h"
|
#include "libu64/rcp_utils.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
#include "irqmgr.h"
|
#include "irqmgr.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
@ -53,9 +54,6 @@
|
||||||
#include "vi_mode.h"
|
#include "vi_mode.h"
|
||||||
#include "z64thread.h"
|
#include "z64thread.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#define RSP_DONE_MSG 667
|
#define RSP_DONE_MSG 667
|
||||||
#define RDP_DONE_MSG 668
|
#define RDP_DONE_MSG 668
|
||||||
#define NOTIFY_MSG 670 // original name: ENTRY_MSG
|
#define NOTIFY_MSG 670 // original name: ENTRY_MSG
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
typedef enum LetterboxState {
|
typedef enum LetterboxState {
|
||||||
/* 0 */ LETTERBOX_STATE_IDLE,
|
/* 0 */ LETTERBOX_STATE_IDLE,
|
||||||
/* 1 */ LETTERBOX_STATE_GROWING,
|
/* 1 */ LETTERBOX_STATE_GROWING,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"pal-1.0:0 pal-1.1:0"
|
"pal-1.0:0 pal-1.1:0"
|
||||||
#include "libc64/malloc.h"
|
#include "libc64/malloc.h"
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
|
|
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "line_numbers.h"
|
#include "line_numbers.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||||
"pal-1.1:128"
|
"pal-1.1:128"
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "sys_freeze.h"
|
#include "sys_freeze.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
NORETURN void func_800D31A0(void) {
|
NORETURN void func_800D31A0(void) {
|
||||||
PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST);
|
PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "z_lib.h"
|
#include "z_lib.h"
|
||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:77 gc-eu-mq:77 gc-jp:77 gc-jp-ce:77 gc-jp-mq:77 gc-us:77 gc-us-mq:77 ique-cn:67" \
|
#pragma increment_block_number "gc-eu:77 gc-eu-mq:77 gc-jp:77 gc-jp-ce:77 gc-jp-mq:77 gc-us:77 gc-us-mq:77 ique-cn:67" \
|
||||||
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
|
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "sys_math.h"
|
#include "sys_math.h"
|
||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
static u16 sAtan2Tbl[] = {
|
static u16 sAtan2Tbl[] = {
|
||||||
0x0000, 0x000A, 0x0014, 0x001F, 0x0029, 0x0033, 0x003D, 0x0047, 0x0051, 0x005C, 0x0066, 0x0070, 0x007A, 0x0084,
|
0x0000, 0x000A, 0x0014, 0x001F, 0x0029, 0x0033, 0x003D, 0x0047, 0x0051, 0x005C, 0x0066, 0x0070, 0x007A, 0x0084,
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#if DEBUG_FEATURES
|
#if DEBUG_FEATURES
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
#endif
|
#endif
|
||||||
#include "macros.h"
|
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "sys_matrix.h"
|
#include "sys_matrix.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
void Setup_InitImpl(SetupState* this) {
|
void Setup_InitImpl(SetupState* this) {
|
||||||
PRINTF(T("ゼルダ共通データ初期化\n", "Zelda common data initialization\n"));
|
PRINTF(T("ゼルダ共通データ初期化\n", "Zelda common data initialization\n"));
|
||||||
SaveContext_Init();
|
SaveContext_Init();
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
#include "ucode_disas.h"
|
|
||||||
#include "ultra64.h"
|
|
||||||
#include "ultra64/gs2dex.h"
|
|
||||||
#include "libu64/mtxuty-cvt.h"
|
#include "libu64/mtxuty-cvt.h"
|
||||||
|
#include "ultra64/gs2dex.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "segmented_address.h"
|
#include "segmented_address.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
#include "ucode_disas.h"
|
||||||
#include "macros.h"
|
#include "ultra64.h"
|
||||||
|
|
||||||
#if DEBUG_FEATURES
|
#if DEBUG_FEATURES
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ typedef void (*UcodeDisasCallback)(UCodeDisas*, u32);
|
||||||
void* UCodeDisas_TranslateAddr(UCodeDisas* this, uintptr_t addr) {
|
void* UCodeDisas_TranslateAddr(UCodeDisas* this, uintptr_t addr) {
|
||||||
uintptr_t physical = this->segments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr);
|
uintptr_t physical = this->segments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr);
|
||||||
|
|
||||||
return PHYSICAL_TO_VIRTUAL(physical);
|
return OS_PHYSICAL_TO_K0(physical);
|
||||||
}
|
}
|
||||||
|
|
||||||
F3dzexConst sUCodeDisasGeometryModes[] = {
|
F3dzexConst sUCodeDisasGeometryModes[] = {
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z_game_dlftbls.h"
|
#include "z_game_dlftbls.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||||
if (overlayEntry->loadedRamAddr != NULL) {
|
if (overlayEntry->loadedRamAddr != NULL) {
|
||||||
PRINTF(T("既にリンクされています\n", "Already linked\n"));
|
PRINTF(T("既にリンクされています\n", "Already linked\n"));
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "libc64/math64.h"
|
#include "libc64/math64.h"
|
||||||
#include "libu64/overlay.h"
|
#include "libu64/overlay.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
|
@ -27,8 +28,6 @@
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
#include "z64skin_matrix.h"
|
#include "z64skin_matrix.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
|
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
|
||||||
#include "overlays/actors/ovl_En_Part/z_en_part.h"
|
#include "overlays/actors/ovl_En_Part/z_en_part.h"
|
||||||
|
|
||||||
|
@ -595,7 +594,7 @@ void Attention_Update(Attention* attention, Player* player, Actor* playerFocusAc
|
||||||
attention->reticleFadeAlphaControl = 0;
|
attention->reticleFadeAlphaControl = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
lockOnSfxId = CHECK_FLAG_ALL(playerFocusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
|
lockOnSfxId = ACTOR_FLAGS_CHECK_ALL(playerFocusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
|
||||||
? NA_SE_SY_LOCK_ON
|
? NA_SE_SY_LOCK_ON
|
||||||
: NA_SE_SY_LOCK_ON_HUMAN;
|
: NA_SE_SY_LOCK_ON_HUMAN;
|
||||||
Sfx_PlaySfxCentered(lockOnSfxId);
|
Sfx_PlaySfxCentered(lockOnSfxId);
|
||||||
|
@ -931,7 +930,7 @@ void Actor_SetScale(Actor* actor, f32 scale) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actor_SetObjectDependency(PlayState* play, Actor* actor) {
|
void Actor_SetObjectDependency(PlayState* play, Actor* actor) {
|
||||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
|
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actor_Init(Actor* actor, PlayState* play) {
|
void Actor_Init(Actor* actor, PlayState* play) {
|
||||||
|
@ -3467,9 +3466,9 @@ void Attention_FindActorInCategory(PlayState* play, ActorContext* actorCtx, Play
|
||||||
|
|
||||||
while (actor != NULL) {
|
while (actor != NULL) {
|
||||||
if ((actor->update != NULL) && ((Player*)actor != player) &&
|
if ((actor->update != NULL) && ((Player*)actor != player) &&
|
||||||
CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED)) {
|
ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED)) {
|
||||||
if ((actorCategory == ACTORCAT_ENEMY) &&
|
if ((actorCategory == ACTORCAT_ENEMY) &&
|
||||||
CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
|
ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
|
||||||
(actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sBgmEnemyDistSq)) {
|
(actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sBgmEnemyDistSq)) {
|
||||||
actorCtx->attention.bgmEnemy = actor;
|
actorCtx->attention.bgmEnemy = actor;
|
||||||
sBgmEnemyDistSq = actor->xyzDistToPlayerSq;
|
sBgmEnemyDistSq = actor->xyzDistToPlayerSq;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "segment_symbols.h"
|
#include "segment_symbols.h"
|
||||||
#include "z_actor_dlftbls.h"
|
#include "z_actor_dlftbls.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
// Linker symbol declarations (used in the table below)
|
// Linker symbol declarations (used in the table below)
|
||||||
#define DEFINE_ACTOR(name, _1, _2, _3) DECLARE_OVERLAY_SEGMENT(name)
|
#define DEFINE_ACTOR(name, _1, _2, _3) DECLARE_OVERLAY_SEGMENT(name)
|
||||||
#define DEFINE_ACTOR_INTERNAL(_0, _1, _2, _3)
|
#define DEFINE_ACTOR_INTERNAL(_0, _1, _2, _3)
|
||||||
|
|
|
@ -82,7 +82,7 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) {
|
||||||
if (dynaActor != NULL) {
|
if (dynaActor != NULL) {
|
||||||
DynaPolyActor_SetActorOnTop(dynaActor);
|
DynaPolyActor_SetActorOnTop(dynaActor);
|
||||||
|
|
||||||
if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_CAN_PRESS_SWITCHES)) {
|
if (ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_CAN_PRESS_SWITCHES)) {
|
||||||
DynaPolyActor_SetSwitchPressed(dynaActor);
|
DynaPolyActor_SetSwitchPressed(dynaActor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "line_numbers.h"
|
#include "line_numbers.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#include "libc64/math64.h"
|
#include "libc64/math64.h"
|
||||||
#include "libc64/qrand.h"
|
#include "libc64/qrand.h"
|
||||||
#include "ultra64.h"
|
#include "array_count.h"
|
||||||
|
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "db_camera.h"
|
#include "db_camera.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "letterbox.h"
|
#include "letterbox.h"
|
||||||
#include "one_point_cutscene.h"
|
#include "one_point_cutscene.h"
|
||||||
#include "quake.h"
|
#include "quake.h"
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
#include "sys_math3d.h"
|
#include "sys_math3d.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
#include "ultra64.h"
|
||||||
#include "z_lib.h"
|
#include "z_lib.h"
|
||||||
#include "zelda_arena.h"
|
#include "zelda_arena.h"
|
||||||
#include "z64audio.h"
|
#include "z64audio.h"
|
||||||
|
@ -3660,7 +3661,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||||
"ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
|
"ique-cn:128 ntsc-1.0:86 ntsc-1.1:86 ntsc-1.2:86 pal-1.0:86 pal-1.1:86"
|
||||||
|
|
||||||
s32 Camera_KeepOn4(Camera* camera) {
|
s32 Camera_KeepOn4(Camera* camera) {
|
||||||
static Vec3f D_8015BD50;
|
static Vec3f D_8015BD50;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
typedef struct CameraModeValue {
|
typedef struct CameraModeValue {
|
||||||
s16 val;
|
s16 val;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
#include "z64collision_check.h"
|
#include "z64collision_check.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
static DamageTable sDamageTablePresets[] = {
|
static DamageTable sDamageTablePresets[] = {
|
||||||
{ {
|
{ {
|
||||||
// 0
|
// 0
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
#include "z64camera.h"
|
#include "z64camera.h"
|
||||||
#include "z64cutscene_spline.h"
|
#include "z64cutscene_spline.h"
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
// The code in this file is very similar to a spline system used in Super Mario 64 for cutscene camera movement
|
// The code in this file is very similar to a spline system used in Super Mario 64 for cutscene camera movement
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "libc64/malloc.h"
|
#include "libc64/malloc.h"
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
#include "libu64/pad.h"
|
#include "libu64/pad.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
|
@ -10,8 +11,6 @@
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64debug.h"
|
#include "z64debug.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
typedef struct DebugCamTextBufferEntry {
|
typedef struct DebugCamTextBufferEntry {
|
||||||
/* 0x0 */ u8 x;
|
/* 0x0 */ u8 x;
|
||||||
/* 0x1 */ u8 y;
|
/* 0x1 */ u8 y;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||||
"ique-cn:128 ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
|
"ique-cn:128 ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
|
||||||
#include "global.h"
|
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfxalloc.h"
|
#include "gfxalloc.h"
|
||||||
|
|
|
@ -9,9 +9,6 @@
|
||||||
#include "z64effect.h"
|
#include "z64effect.h"
|
||||||
#include "z64skin_matrix.h"
|
#include "z64skin_matrix.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "z64.h" // required for gameplay keep, the header doesnt include any external dependencies
|
#include "z64.h" // required for gameplay keep, the header doesnt include any external dependencies
|
||||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "libc64/qrand.h"
|
#include "libc64/qrand.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
@ -9,9 +10,6 @@
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
#include "z64skin_matrix.h"
|
#include "z64skin_matrix.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
static Vtx sVertices[5] = {
|
static Vtx sVertices[5] = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "libc64/qrand.h"
|
#include "libc64/qrand.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
@ -8,9 +9,6 @@
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
#include "z64skin_matrix.h"
|
#include "z64skin_matrix.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
// original name: "spark"
|
// original name: "spark"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "libu64/overlay.h"
|
#include "libu64/overlay.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "libc64/qrand.h"
|
#include "libc64/qrand.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
|
@ -70,7 +71,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
|
||||||
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
|
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
|
||||||
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
|
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
|
||||||
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
|
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
|
||||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
|
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
|
||||||
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
|
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
|
||||||
|
|
||||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
|
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "ultra64.h"
|
#include "ultra64.h"
|
||||||
#include "z64cutscene_flags.h"
|
#include "z64cutscene_flags.h"
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
#include "z64transition_instances.h"
|
#include "z64transition_instances.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
// color framebuffer
|
// color framebuffer
|
||||||
extern u16 D_0F000000[];
|
extern u16 D_0F000000[];
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#include "transition_circle.h"
|
#include "transition_circle.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
typedef enum TransitionCircleDirection {
|
typedef enum TransitionCircleDirection {
|
||||||
/* 0 */ TRANS_CIRCLE_DIR_IN,
|
/* 0 */ TRANS_CIRCLE_DIR_IN,
|
||||||
/* 1 */ TRANS_CIRCLE_DIR_OUT
|
/* 1 */ TRANS_CIRCLE_DIR_OUT
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
#include "z64transition_instances.h"
|
#include "z64transition_instances.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
typedef enum TransitionFadeDirection {
|
typedef enum TransitionFadeDirection {
|
||||||
/* 0 */ TRANS_FADE_DIR_IN,
|
/* 0 */ TRANS_FADE_DIR_IN,
|
||||||
/* 1 */ TRANS_FADE_DIR_OUT
|
/* 1 */ TRANS_FADE_DIR_OUT
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "transition_triforce.h"
|
#include "transition_triforce.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
|
||||||
#include "assets/code/fbdemo_triforce/z_fbdemo_triforce.c"
|
#include "assets/code/fbdemo_triforce/z_fbdemo_triforce.c"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
* File: z_fcurve_data.c
|
* File: z_fcurve_data.c
|
||||||
* Description: Interpolation functions for use with Curve SkelAnime
|
* Description: Interpolation functions for use with Curve SkelAnime
|
||||||
*/
|
*/
|
||||||
#include "global.h"
|
|
||||||
#include "z64curve.h"
|
#include "z64curve.h"
|
||||||
|
|
||||||
#define FCURVE_INTERP_CUBIC 0 // Interpolate using a Hermite cubic spline
|
#define FCURVE_INTERP_CUBIC 0 // Interpolate using a Hermite cubic spline
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "libu64/pad.h"
|
#include "libu64/pad.h"
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
|
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
|
||||||
frameAdvCtx->timer = 0;
|
frameAdvCtx->timer = 0;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "letterbox.h"
|
#include "letterbox.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
#include "rumble.h"
|
#include "rumble.h"
|
||||||
|
@ -7,9 +8,6 @@
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
void GameOver_Init(PlayState* play) {
|
void GameOver_Init(PlayState* play) {
|
||||||
play->gameOverCtx.state = GAMEOVER_INACTIVE;
|
play->gameOverCtx.state = GAMEOVER_INACTIVE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "array_count.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "z_lib.h"
|
#include "z_lib.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#include "global.h"
|
|
||||||
#include "ultra64.h"
|
|
||||||
#include "attributes.h"
|
|
||||||
#include "jpeg.h"
|
#include "jpeg.h"
|
||||||
|
|
||||||
|
#include "array_count.h"
|
||||||
|
#include "attributes.h"
|
||||||
|
#include "gfx.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "sys_ucode.h"
|
#include "sys_ucode.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
#include "ultra64.h"
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#define MARKER_ESCAPE 0x00
|
#define MARKER_ESCAPE 0x00
|
||||||
#define MARKER_SOI 0xD8
|
#define MARKER_SOI 0xD8
|
||||||
|
@ -48,12 +48,12 @@ void Jpeg_ScheduleDecoderTask(JpegContext* ctx) {
|
||||||
JpegWork* workBuf = ctx->workBuf;
|
JpegWork* workBuf = ctx->workBuf;
|
||||||
s32 pad[2];
|
s32 pad[2];
|
||||||
|
|
||||||
workBuf->taskData.address = VIRTUAL_TO_PHYSICAL(&workBuf->data);
|
workBuf->taskData.address = OS_K0_TO_PHYSICAL(&workBuf->data);
|
||||||
workBuf->taskData.mode = ctx->mode;
|
workBuf->taskData.mode = ctx->mode;
|
||||||
workBuf->taskData.mbCount = 4;
|
workBuf->taskData.mbCount = 4;
|
||||||
workBuf->taskData.qTableYPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableY);
|
workBuf->taskData.qTableYPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableY);
|
||||||
workBuf->taskData.qTableUPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableU);
|
workBuf->taskData.qTableUPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableU);
|
||||||
workBuf->taskData.qTableVPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableV);
|
workBuf->taskData.qTableVPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableV);
|
||||||
|
|
||||||
sJpegTask.t.flags = 0;
|
sJpegTask.t.flags = 0;
|
||||||
sJpegTask.t.ucode_boot = SysUcode_GetUCodeBoot();
|
sJpegTask.t.ucode_boot = SysUcode_GetUCodeBoot();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "libu64/debug.h"
|
#include "libu64/debug.h"
|
||||||
#include "libu64/overlay.h"
|
#include "libu64/overlay.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "kaleido_manager.h"
|
#include "kaleido_manager.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "segment_symbols.h"
|
#include "segment_symbols.h"
|
||||||
|
@ -7,8 +8,6 @@
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#define KALEIDO_OVERLAY(name, nameString) \
|
#define KALEIDO_OVERLAY(name, nameString) \
|
||||||
{ NULL, ROM_FILE(ovl_##name), _ovl_##name##SegmentStart, _ovl_##name##SegmentEnd, 0, nameString, }
|
{ NULL, ROM_FILE(ovl_##name), _ovl_##name##SegmentStart, _ovl_##name##SegmentEnd, 0, nameString, }
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
#include "z64play.h"
|
#include "z64play.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||||
void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||||
f32 gBossMarkScale;
|
f32 gBossMarkScale;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "z64font.h"
|
#include "z64font.h"
|
||||||
#include "z64message.h"
|
#include "z64message.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a texture from kanji for the requested `character` into the character texture buffer
|
* Loads a texture from kanji for the requested `character` into the character texture buffer
|
||||||
* at `codePointIndex`. The value of `character` is the SHIFT-JIS encoding of the character.
|
* at `codePointIndex`. The value of `character` is the SHIFT-JIS encoding of the character.
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "libc64/qrand.h"
|
#include "libc64/qrand.h"
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "ichain.h"
|
#include "ichain.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
#include "macros.h"
|
|
||||||
#include "sys_math.h"
|
#include "sys_math.h"
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "avoid_ub.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#define LOG_SEVERITY_NOLOG 0
|
#define LOG_SEVERITY_NOLOG 0
|
||||||
#define LOG_SEVERITY_ERROR 2
|
#define LOG_SEVERITY_ERROR 2
|
||||||
#define LOG_SEVERITY_VERBOSE 3
|
#define LOG_SEVERITY_VERBOSE 3
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "z64player.h"
|
#include "z64player.h"
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||||
#include "assets/textures/parameter_static/parameter_static.h"
|
#include "assets/textures/parameter_static/parameter_static.h"
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
#include "assets/textures/parameter_static/parameter_static.h"
|
#include "assets/textures/parameter_static/parameter_static.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
typedef struct MapMarkInfo {
|
typedef struct MapMarkInfo {
|
||||||
/* 0x00 */ void* texture;
|
/* 0x00 */ void* texture;
|
||||||
/* 0x04 */ u32 imageFormat;
|
/* 0x04 */ u32 imageFormat;
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#include "libu64/gfxprint.h"
|
#include "libu64/gfxprint.h"
|
||||||
|
#include "array_count.h"
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
#include "gfx_setupdl.h"
|
#include "gfx_setupdl.h"
|
||||||
#include "gfxalloc.h"
|
#include "gfxalloc.h"
|
||||||
|
#include "language_array.h"
|
||||||
#include "memory_utils.h"
|
#include "memory_utils.h"
|
||||||
#include "message_data_static.h"
|
#include "message_data_static.h"
|
||||||
#if PLATFORM_N64
|
#if PLATFORM_N64
|
||||||
|
@ -22,8 +24,6 @@
|
||||||
#include "z64player.h"
|
#include "z64player.h"
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
|
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
#include "assets/textures/parameter_static/parameter_static.h"
|
#include "assets/textures/parameter_static/parameter_static.h"
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:32" \
|
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:32" \
|
||||||
|
|
|
@ -3,10 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
// how big to draw the characters on screen
|
// how big to draw the characters on screen
|
||||||
#define DISP_CHAR_WIDTH 8
|
#define DISP_CHAR_WIDTH 8
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
#include "one_point_cutscene.h"
|
||||||
|
|
||||||
#include "libc64/math64.h"
|
#include "libc64/math64.h"
|
||||||
#include "libc64/qrand.h"
|
#include "libc64/qrand.h"
|
||||||
#include "one_point_cutscene.h"
|
#include "array_count.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "quake.h"
|
#include "quake.h"
|
||||||
#include "sfx.h"
|
#include "sfx.h"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue