Compare commits

..

22 Commits

Author SHA1 Message Date
Fazana
20f549e2cb Fix conflicts 2021-10-08 14:12:02 +01:00
Fazana
65a7b2dedc Merge branch 'master' into segmented-actor-code-experimental 2021-10-08 14:03:53 +01:00
Fazana
f902e0173d Merge branch 'master' into segmented-actor-code-experimental 2021-09-26 18:05:07 +01:00
Fazana
4e2fdcc3b8 Merge branch 'master' into segmented-actor-code-experimental 2021-09-25 14:10:10 +01:00
Fazana
740325bb27 Fix conflicts 2021-09-24 14:55:49 +01:00
Fazana
74bb98facf Merge branch 'master' into segmented-actor-code-experimental 2021-09-24 14:10:32 +01:00
Fazana
91027d5b4c Fix conflicts 2021-09-21 21:41:14 +01:00
Fazana
96fa795cba Merge branch 'master' into segmented-actor-code-experimental 2021-09-21 21:27:06 +01:00
Fazana
a94613c001 Merge branch 'master' into segmented-actor-code-experimental 2021-09-13 18:38:36 +01:00
Fazana
62070c6f44 Boo 2021-09-09 14:20:55 +01:00
Fazana
441e5ced55 Merge branch 'master' into segmented-actor-code-experimental 2021-09-09 14:16:35 +01:00
Fazana
ec01728f9a Merge branch 'master' into segmented-actor-code-experimental 2021-09-05 21:11:59 +01:00
Fazana
6dbb332269 Merge branch 'master' into segmented-actor-code-experimental 2021-09-05 12:00:34 +01:00
Fazana
5954fed184 Finished moving camera data
Camera.c do be almost 100KB smaller now 😳
2021-08-26 12:32:32 +01:00
Fazana
4433a44c13 Merge branch 'master' into segmented-actor-code-experimental 2021-08-26 10:55:30 +01:00
Fazana
43a86191ea Moving some Camera data to levels
will do more later
2021-08-25 15:53:11 +01:00
Fazana
0f43c4d43b Merge branch 'master' into segmented-actor-code-experimental 2021-08-25 14:30:16 +01:00
Fazana
d6c7665e9a Merge branch 'master' into segmented-actor-code-experimental 2021-08-25 12:33:13 +01:00
Fazana
6ecdebe86e Add camera objects too 2021-08-24 15:07:51 +01:00
Fazana
4be7da3248 Merge branch 'master' into segmented-actor-code-experimental 2021-08-24 14:16:23 +01:00
Fazana
6436f59cf9 epic 2021-08-24 13:43:42 +01:00
Fazana
06dafeb027 Actor Code now stored in segments
Main segment size reduced by around 256KB
Very messy code layout though, made no attempt to organise it.
2021-08-23 22:08:17 +01:00
926 changed files with 42185 additions and 41625 deletions

28
.gitignore vendored
View File

@@ -71,37 +71,9 @@ build/*
!/assets/**/*custom*.bin
!/assets/**/*custom*/**/*.bin
!/textures/crash_custom/*.png
# Specific assets
!/actors/breath_meter/breath_meter_*.png
!/actors/coin/coin_*.ia8.png
!/textures/segment2/light_quarter_circle.ia16.png
!/textures/segment2/segment2.hud_char_j.rgba16.png
!/textures/segment2/segment2.hud_char_q.rgba16.png
!/textures/segment2/segment2.hud_char_v.rgba16.png
!/textures/segment2/segment2.hud_char_x.rgba16.png
!/textures/segment2/segment2.hud_char_z.rgba16.png
!/textures/segment2/segment2.umlaut_us.rgba16.png
!/textures/segment2/segment2.beta_key.rgba16.png
!/textures/segment2/segment2.decimal_point.rgba16.png
!/textures/segment2/segment2.exclamation.rgba16.png
!/textures/segment2/segment2.double_exclamation.rgba16.png
!/textures/segment2/segment2.question.rgba16.png
!/textures/segment2/segment2.ampersand.rgba16.png
!/textures/segment2/segment2.percent.rgba16.png
!/textures/segment2/segment2.minus.rgba16.png
!/textures/segment2/segment2.minus2.rgba16.png
!/textures/segment2/segment2.yellow_coin.rgba16.png
!/textures/segment2/segment2.blue_coin.rgba16.png
!/textures/segment2/segment2.red_coin.rgba16.png
!/textures/segment2/segment2.silver_coin.*.png
!/textures/segment2/shadow_quarter_circle_64.ia8.png
!/textures/segment2/shadow_quarter_square_64.ia8.png
# libultra
!/lib/**/*.o
!/lib/*.a
lib/libs2d_engine.a
!/lib/gcclib/*.a

View File

@@ -17,8 +17,7 @@
"${workspaceFolder}/include/geo_commands.h",
"${workspaceFolder}/include/level_commands.h",
"${workspaceFolder}/include/segment_symbols.h",
"${workspaceFolder}/include/command_macros_base.h",
"${workspaceFolder}/include/object_constants.h"
"${workspaceFolder}/include/command_macros_base.h"
],
"defines": [
"TARGET_N64=1",

10
CHANGES
View File

@@ -1,13 +1,3 @@
Refresh 15 (mostly a hotfix for RSP microcode selection)
1.) Renamed frame_buffer funcs and _ZBUFFER (#1184)
2.) RSP Microcode Hotfix (#1183)
3.) Label osSetTimer.c (#1182)
4.) Fix styling (#1177)
5.) Rename all `FrameBuffer` variants to `Framebuffer` (#1176)
6.) Remove (WIP) from sh.
7.) Allow both archives and ELF objects to be patched (#1127)
Refresh 14
1.) Label whomp and some object fields (#1174)

187
Makefile
View File

@@ -6,9 +6,9 @@ include util.mk
default: all
# Preprocessor definitions
DEFINES :=
DEFINES :=
SRC_DIRS :=
SRC_DIRS :=
USE_DEBUG := 0
#==============================================================================#
@@ -22,7 +22,7 @@ USE_DEBUG := 0
TARGET_N64 ?= 1
# CONSOLE - selects the console to target
# bb - Targets the iQue Player (codenamed BB)
# bb - Targets the iQue Player (codenamed BB)
# n64 - Targets the N64
CONSOLE ?= n64
$(eval $(call validate-option,CONSOLE,n64 bb))
@@ -37,24 +37,24 @@ else ifeq ($(CONSOLE),bb)
endif
# COMPILER - selects the C compiler to use
# gcc - uses the GNU C Compiler
# gcc - uses the GNU C Compiler
# clang - uses clang C/C++ frontend for LLVM
COMPILER ?= gcc
$(eval $(call validate-option,COMPILER,gcc clang))
# LIBGCCDIR - selects the libgcc configuration for checking for dividing by zero
# trap - GCC default behavior, uses teq instructions which some emulators don't like
# LIBGCCDIR - selects the libgcc configuration for checking for dividing by zero
# trap - GCC default behavior, uses teq instructions which some emulators don't like
# divbreak - this is similar to IDO behavior, and is default.
# nocheck - never checks for dividing by 0. Technically fastest, but also UB so not recommended
# nocheck - never checks for dividing by 0. Technically fastest, but also UB so not recommended
LIBGCCDIR ?= divbreak
$(eval $(call validate-option,LIBGCCDIR,trap divbreak nocheck))
# SAVETYPE - selects the save type
# eep4k - uses EEPROM 4kbit
# eep4k - uses EEPROM 4kbit
# eep16k - uses EEPROM 16kbit (There aren't any differences in syntax, but this is provided just in case)
# sram - uses SRAM 256Kbit
# sram - uses SRAM 256Kbit
SAVETYPE ?= eep4k
$(eval $(call validate-option,SAVETYPE,eep4k eep16k sram))
ifeq ($(SAVETYPE),eep4k)
@@ -67,6 +67,25 @@ endif
DEFINES += NO_ERRNO_H=1 NO_GZIP=1
COMPRESS ?= rnc1
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1
else ifeq ($(COMPRESS),rnc1)
DEFINES += RNC1=1
else ifeq ($(COMPRESS),rnc2)
DEFINES += RNC2=1
else ifeq ($(COMPRESS),yay0)
DEFINES += YAY0=1
else ifeq ($(COMPRESS),mio0)
DEFINES += MIO0=1
else ifeq ($(COMPRESS),uncomp)
DEFINES += UNCOMPRESSED=1
endif
GZIPVER ?= std
$(eval $(call validate-option,GZIPVER,std libdef))
# VERSION - selects the version of the game to build
# jp - builds the 1996 Japanese version
# us - builds the 1996 North American version
@@ -76,18 +95,22 @@ VERSION ?= us
$(eval $(call validate-option,VERSION,jp us eu sh))
ifeq ($(VERSION),jp)
DEFINES += VERSION_JP=1
DEFINES += VERSION_JP=1
GRUCODE ?= f3dzex
else ifeq ($(VERSION),us)
DEFINES += VERSION_US=1
DEFINES += VERSION_US=1
GRUCODE ?= f3dzex
else ifeq ($(VERSION),eu)
DEFINES += VERSION_EU=1
DEFINES += VERSION_EU=1
GRUCODE ?= f3dzex
else ifeq ($(VERSION),sh)
DEFINES += VERSION_SH=1
DEFINES += VERSION_SH=1
GRUCODE ?= f3dzex
endif
DEBUG_MAP_STACKTRACE_FLAG := -D DEBUG_MAP_STACKTRACE
TARGET := sm64
TARGET := sm64.$(VERSION)
# GRUCODE - selects which RSP microcode to use.
@@ -96,7 +119,6 @@ TARGET := sm64
# l3dex2 - F3DEX2 version that only renders in wireframe
# f3dzex - newer, experimental microcode used in Animal Crossing
# super3d - extremely experimental version of Fast3D lacking many features for speed
GRUCODE ?= f3dzex
$(eval $(call validate-option,GRUCODE,f3dex f3dex2 f3dex2pl f3dzex super3d l3dex2))
ifeq ($(GRUCODE),f3dex) # Fast3DEX
@@ -120,7 +142,7 @@ LIBRARIES := nustd hvqm2 z goddard
# s2dex_text_engine - Text Engine by someone2639
TEXT_ENGINE := none
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
LIBRARIES += s2d_engine
DUMMY != make -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/
endif
@@ -131,12 +153,7 @@ LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
ifeq ($(COMPILER),gcc)
NON_MATCHING := 1
MIPSISET := -mips3
OPT_FLAGS := \
-Ofast \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=10 \
--param max-unrolled-insns=10 \
-finline-limit=1
OPT_FLAGS := -Ofast
else ifeq ($(COMPILER),clang)
NON_MATCHING := 1
# clang doesn't support ABI 'o32' for 'mips3'
@@ -157,10 +174,21 @@ endif
ifeq ($(NON_MATCHING),1)
DEFINES += NON_MATCHING=1 AVOID_UB=1
COMPARE := 0
endif
TARGET_STRING := sm64
# COMPARE - whether to verify the SHA-1 hash of the ROM after building
# 1 - verifies the SHA-1 hash of the selected version of the game
# 0 - does not verify the hash
COMPARE ?= 0
$(eval $(call validate-option,COMPARE,0 1))
TARGET_STRING := sm64.$(VERSION).$(CONSOLE).$(GRUCODE)
# If non-default settings were chosen, disable COMPARE
ifeq ($(filter $(TARGET_STRING), sm64.jp.f3d_old sm64.us.f3d_old sm64.eu.f3d_new sm64.sh.f3d_new),)
COMPARE := 0
endif
# UNF - whether to use UNFLoader flashcart library
# 1 - includes code in ROM
@@ -168,7 +196,7 @@ TARGET_STRING := sm64
UNF ?= 0
$(eval $(call validate-option,UNF,0 1))
ifeq ($(UNF),1)
DEFINES += UNF=1
DEFINES += UNF=1
SRC_DIRS += src/usb
USE_DEBUG := 1
endif
@@ -198,31 +226,10 @@ endif
HVQM ?= 0
$(eval $(call validate-option,HVQM,0 1))
ifeq ($(HVQM),1)
DEFINES += HVQM=1
DEFINES += HVQM=1
SRC_DIRS += src/hvqm
endif
COMPRESS ?= rnc1
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1
LIBZRULE := $(BUILD_DIR)/libz.a
LIBZLINK := -lz
else ifeq ($(COMPRESS),rnc1)
DEFINES += RNC1=1
else ifeq ($(COMPRESS),rnc2)
DEFINES += RNC2=1
else ifeq ($(COMPRESS),yay0)
DEFINES += YAY0=1
else ifeq ($(COMPRESS),mio0)
DEFINES += MIO0=1
else ifeq ($(COMPRESS),uncomp)
DEFINES += UNCOMPRESSED=1
endif
GZIPVER ?= std
$(eval $(call validate-option,GZIPVER,std libdef))
# GODDARD - whether to use libgoddard (Mario Head)
# 1 - includes code in ROM
# 0 - does not
@@ -241,6 +248,27 @@ endif
# Whether to colorize build messages
COLOR ?= 1
# display selected options unless 'make clean' or 'make distclean' is run
ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
$(info ==== Build Options ====)
$(info Version: $(VERSION))
$(info Microcode: $(GRUCODE))
$(info Console: $(CONSOLE))
$(info Target: $(TARGET))
ifeq ($(COMPARE),1)
$(info Compare ROM: yes)
else
$(info Compare ROM: no)
endif
ifeq ($(NON_MATCHING),1)
$(info Build Matching: no)
else
$(info Build Matching: yes)
endif
$(info =======================)
endif
#==============================================================================#
# Universal Dependencies #
#==============================================================================#
@@ -286,7 +314,7 @@ endif
BUILD_DIR_BASE := build
# BUILD_DIR is the location where all build artifacts are placed
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)
ROM := $(BUILD_DIR)/$(TARGET_STRING).z64
ELF := $(BUILD_DIR)/$(TARGET_STRING).elf
LIBZ := $(BUILD_DIR)/libz.a
@@ -309,7 +337,7 @@ include Makefile.split
# Source code files
LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script.c) $(wildcard levels/*/geo.c)
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
LIBZ_C_FILES := $(foreach dir,$(LIBZ_SRC_DIRS),$(wildcard $(dir)/*.c))
LIBZ_C_FILES := $(foreach dir,$(LIBZ_SRC_DIRS),$(wildcard $(dir)/*.c))
GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
@@ -334,7 +362,7 @@ O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
$(foreach file,$(GENERATED_C_FILES),$(file:.c=.o)) \
lib/PR/hvqm/hvqm2sp1.o lib/PR/hvqm/hvqm2sp2.o
LIBZ_O_FILES := $(foreach file,$(LIBZ_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
LIBZ_O_FILES := $(foreach file,$(LIBZ_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
# Automatic dependency files
@@ -402,7 +430,7 @@ DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
# C compiler options
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
ifeq ($(COMPILER),gcc)
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces -fno-jump-tables -Werror=implicit-function-declaration
else ifeq ($(COMPILER),clang)
CFLAGS += -target mips -mabi=32 -G 0 -mhard-float -fomit-frame-pointer -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces -fno-jump-tables
else
@@ -460,7 +488,7 @@ RED := \033[0;31m
GREEN := \033[0;32m
BLUE := \033[0;34m
YELLOW := \033[0;33m
BLINK := \033[32;5m
BLINK := \033[33;5m
endif
# For non-IDO, use objcopy instead of extract_data_for_mio
@@ -478,12 +506,13 @@ endef
#==============================================================================#
all: $(ROM)
ifeq ($(COMPARE),1)
@$(PRINT) "$(GREEN)Checking if ROM matches.. $(NO_COL)\n"
@$(SHA1SUM) --quiet -c $(TARGET).sha1 && $(PRINT) "$(TARGET): $(GREEN)OK$(NO_COL)\n" || ($(PRINT) "$(YELLOW)Building the ROM file has succeeded, but does not match the original ROM.\nThis is expected, and not an error, if you are making modifications.\nTo silence this message, use 'make COMPARE=0.' $(NO_COL)\n" && false)
else
@$(SHA1SUM) $(ROM)
@$(PRINT) "${BLINK}Build succeeded.\n$(NO_COL)"
@$(PRINT) "==== Build Options ====$(NO_COL)\n"
@$(PRINT) "${GREEN}Version: $(BLUE)$(VERSION)$(NO_COL)\n"
@$(PRINT) "${GREEN}Microcode: $(BLUE)$(GRUCODE)$(NO_COL)\n"
@$(PRINT) "${GREEN}Console: $(BLUE)$(CONSOLE)$(NO_COL)\n"
@$(PRINT) "${GREEN}Build succeeded.$(NO_COL)\n"
endif
clean:
$(RM) -r $(BUILD_DIR_BASE)
@@ -496,9 +525,6 @@ distclean: clean
test: $(ROM)
$(EMULATOR) $(EMU_FLAGS) $<
test-pj64: $(ROM)
wine ~/Desktop/new64/Project64.exe $<
load: $(ROM)
$(LOADER) $(LOADER_FLAGS) $<
@@ -508,7 +534,7 @@ libultra: $(BUILD_DIR)/libultra.a
$(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES)
$(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES)
$(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h
$(BUILD_DIR)/lib/aspMain.o: $(BUILD_DIR)/rsp/audio.bin
$(BUILD_DIR)/lib/rsp.o: $(BUILD_DIR)/rsp/rspboot.bin $(BUILD_DIR)/rsp/audio.bin
$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/sequences.bin $(SOUND_BIN_DIR)/bank_sets
$(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h
@@ -546,33 +572,13 @@ else
endif
endif
$(BUILD_DIR)/src/usb/usb.o: OPT_FLAGS := -O0
$(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wno-unused-function
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
$(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized
$(BUILD_DIR)/src/audio/*.o: OPT_FLAGS := -Os -fno-jump-tables
# Surface Collision
$(BUILD_DIR)/src/engine/surface_collision.o: OPT_FLAGS := \
-Ofast \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=100 \
--param max-unrolled-insns=100 \
-finline-limit=0
# Math Util
$(BUILD_DIR)/src/engine/math_util.o: OPT_FLAGS := \
-Ofast \
-fno-unroll-loops \
-fno-peel-loops \
--param case-values-threshold=20
# - setting any sort of -finline-limit has shown to worsen performance, lower values were the worst, the higher you go - the closer performance gets to not setting it at all
$(BUILD_DIR)/src/game/rendering_graph_node.o: OPT_FLAGS := \
-Ofast \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=100 \
--param max-unrolled-insns=100 \
-finline-limit=0
$(BUILD_DIR)/src/usb/usb.o: OPT_FLAGS := -O0
$(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wno-unused-function
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
$(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized
$(BUILD_DIR)/src/audio/*.o: OPT_FLAGS := -Os -fno-jump-tables
$(BUILD_DIR)/src/engine/math_util.o: OPT_FLAGS := -Ofast -fno-unroll-loops -fno-peel-loops --param case-values-threshold=20
$(BUILD_DIR)/src/game/rendering_graph_node.o: OPT_FLAGS := -Ofast --param case-values-threshold=20
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) asm/debug $(GODDARD_SRC_DIRS) $(LIBZ_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(YAY0_DIR) $(addprefix $(YAY0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
@@ -583,7 +589,8 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
$(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/game/puppycam2.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/game/puppycam2.o: $(BUILD_DIR)/include/text_strings.h
#==============================================================================#
@@ -798,7 +805,7 @@ $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
# Link SM64 ELF file
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc -lrtc
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
# Build ROM
$(ROM): $(ELF)
@@ -807,7 +814,7 @@ ifeq ($(CONSOLE),n64)
$(V)$(OBJCOPY) --pad-to=0x101000 --gap-fill=0xFF $< $@ -O binary
else ifeq ($(CONSOLE),bb)
$(V)$(OBJCOPY) --gap-fill=0x00 $< $@ -O binary
$(V)dd if=$@ of=tmp bs=16K conv=sync status=none
$(V)dd if=$@ of=tmp bs=16K conv=sync
$(V)mv tmp $@
endif
$(V)$(N64CKSUM) $@

View File

@@ -76,7 +76,7 @@ MOLE_DIRS := monty_mole_hole monty_mole smoke ukiki fwoosh
LAKITU_DIRS := lakitu_cameraman toad mips boo_castle
PEACH_DIRS := bird peach yoshi
BOWSER_DIRS := bowser_flame impact_ring yellow_sphere bowser bomb impact_smoke
MARIO_DIRS := mario bubble walk_smoke burn_smoke small_water_splash water_wave sparkle water_splash white_particle_small sparkle_animation
MARIO_DIRS := mario bubble walk_smoke burn_smoke stomp_smoke water_wave sparkle water_splash white_particle_small sparkle_animation
# Actor Textures
AMP_CHUCKYA_TEXTURES := $(foreach dir,$(AMP_DIRS), $(wildcard actors/$(dir)/*.png))

View File

@@ -23,7 +23,8 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- Slope fix and exposed ceilings fix
- No false ledgegrabs fix *
- Jump kick fix *
- Configurable wallkick angle, in degrees *
- 46 degree wallkicks *
- Pole fix
- Possibility of disabling BLJs *
- Hanging fix (mario can grab hangable ceilings from any state, instead of only jump or double jump) *
- Increased maximum pole length (The game will read bparam1 and bparam2 together as a single value, so you can have a very long pole) *
@@ -71,7 +72,6 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- Example Text: `"@FF0000FFRED @00FF00FFGREEN @0000FFFFBLUE @FFFFFF00INVISIBLE @--------NORMAL"`
- NOTE: It is not mandatory to reset the text color with `"@--------"`, but text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset.
- Toggle visiblity of collision surfaces and object hitboxes with Visual Surface Debug. `config.h` has VISUAL_DEBUG which can be turned on to enable this feature.
- Workaround for infinite death loops caused by using the wrong warp type for death warps. Mario's HP will be restored when being warped to any warp if (and only if) he was warped while dead. *
**Other Bugfixes:**
- Castle music fix (Fixes the castle music sometimes triggering after getting a dialog) *
@@ -89,9 +89,6 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- Widescreen (16:9) support toggleable by pressing `L` in the pause menu. *
- S2DEX engine by someone2639! To use it, compile with `make TEXT_ENGINE=s2dex_text_engine` or just set `TEXT_ENGINE` to `s2dex_text_engine` in the makefile.
- ia8 coins (64x64), the vanilla coin texture is upgraded to accomodate. *
- ia8 30 FPS (64x64) coins (Textures by InTheBeef, cleaned up by Arceveti). *
- Floombas! Simply just retextured goombas with custom behaviors (does not overwrite standard goombas). *
- HD texture support for intro splash screen (with floombas if enabled). *
- Mario's silhouette is shown when behind most surfaces (By Frame#5375, Axollyon, AloXado320, Wiseguy, Arceveti) *
- Skybox size modifier. You can have 2x, 3x and 4x size skyboxes (you can select the skybox size in `config.h`.) Please note that this might affect console performance, especially 4x mode. 2x or 3x mode is recommended if aiming for console. By CowQuack *
- You can set the black border size to different values for console and emulator. It's set to 0 by default for both. *
@@ -178,9 +175,7 @@ To switch to no compression, run make with the ``COMPRESS=uncomp`` argument.
Q: Why in the hell are you bundling your own build of ``ld``?
A: Newer binutils (Like the one bundled with Ubuntu, 2.34) break linking with libultra builds due to local asm symbols.
This puts me at a crossroads of either touching leaked code and requiring GCC, or just using an older linker that works just fine.
I went with the latter.
Thanks to "someone2639" for this hacky-ass idea

View File

@@ -1,4 +1,4 @@
// unreferenced animation
// unreferenced
// 0x0500616C
const struct Animation *const blargg_seg5_anims_0500616C[] = {
&blargg_seg5_anim_05006154,

View File

@@ -6,9 +6,9 @@ const GeoLayout fish_shadow_geo[] = {
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, -16, 0, 0, NULL),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 0, 0, 0, blue_fish_seg3_dl_body),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 0, 0, 0, blue_fish_seg3_dl_0301BFB8),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 97, 0, 0, blue_fish_seg3_dl_tail),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 97, 0, 0, blue_fish_seg3_dl_0301C150),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
@@ -22,9 +22,9 @@ const GeoLayout fish_geo[] = {
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, -16, 0, 0, NULL),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 0, 0, 0, blue_fish_seg3_dl_body),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 0, 0, 0, blue_fish_seg3_dl_0301BFB8),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 97, 0, 0, blue_fish_seg3_dl_tail),
GEO_ANIMATED_PART(LAYER_OCCLUDE_SILHOUETTE_OPAQUE, 97, 0, 0, blue_fish_seg3_dl_0301C150),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),

View File

@@ -12,44 +12,48 @@ ALIGNED8 static const Texture blue_fish_seg3_texture_0301B5E0[] = {
};
// 0x0301BDE0
static const Vtx blue_fish_seg3_vertex_body[] = {
{{{ -108, 1, 0}, 0, { 14, 566}, {0x89, 0x00, 0xd7, 0xff}}}, // 0
{{{ -62, -19, 12}, 0, { 210, 502}, {0xe8, 0x84, 0x0a, 0xff}}}, // 1
{{{ -62, 21, 12}, 0, { 210, 502}, {0xe8, 0x7c, 0x0b, 0xff}}}, // 2
{{{ -47, 1, -64}, 0, { 274, 830}, {0xbd, 0xff, 0x95, 0xff}}}, // 3
{{{ -97, 1, 23}, 0, { 62, 462}, {0xa2, 0x00, 0x54, 0xff}}}, // 4
{{{ 55, 1, 127}, 0, { 712, -8}, {0x1a, 0x00, 0x7c, 0xff}}}, // 5
{{{ 41, 16, 56}, 0, { 656, 298}, {0x43, 0x67, 0x1b, 0xff}}}, // 6
{{{ 50, 16, -43}, 0, { 692, 722}, {0x35, 0x6f, 0xe6, 0xff}}}, // 7
{{{ 41, -14, 56}, 0, { 656, 298}, {0x43, 0x99, 0x1b, 0xff}}}, // 8
{{{ 50, -13, -43}, 0, { 692, 722}, {0x35, 0x91, 0xe6, 0xff}}}, // 9
{{{ 62, 1, -92}, 0, { 742, 930}, {0x42, 0xff, 0x94, 0xff}}}, // 10
{{{ 101, 1, 1}, 0, { 910, 520}, {0x7e, 0x00, 0x01, 0xff}}}, // 11
static const Vtx blue_fish_seg3_vertex_0301BDE0[] = {
{{{ -108, 1, 0}, 0, { 14, 566}, {0x89, 0x00, 0xd7, 0xff}}},
{{{ -44, -13, -31}, 0, { 286, 688}, {0xeb, 0x89, 0xdc, 0xff}}},
{{{ -62, -19, 12}, 0, { 210, 502}, {0xe8, 0x84, 0x0a, 0xff}}},
{{{ -44, 16, -31}, 0, { 286, 688}, {0xea, 0x77, 0xdc, 0xff}}},
{{{ -62, 21, 12}, 0, { 210, 502}, {0xe8, 0x7c, 0x0b, 0xff}}},
{{{ -47, 1, -64}, 0, { 274, 830}, {0xbd, 0xff, 0x95, 0xff}}},
{{{ -97, 1, 23}, 0, { 62, 462}, {0xa2, 0x00, 0x54, 0xff}}},
{{{ 55, 1, 127}, 0, { 712, -8}, {0x1a, 0x00, 0x7c, 0xff}}},
{{{ 41, 16, 56}, 0, { 656, 298}, {0x43, 0x67, 0x1b, 0xff}}},
{{{ 50, 16, -43}, 0, { 692, 722}, {0x35, 0x6f, 0xe6, 0xff}}},
{{{ 41, -14, 56}, 0, { 656, 298}, {0x43, 0x99, 0x1b, 0xff}}},
{{{ 50, -13, -43}, 0, { 692, 722}, {0x35, 0x91, 0xe6, 0xff}}},
{{{ 62, 1, -92}, 0, { 742, 930}, {0x42, 0xff, 0x94, 0xff}}},
{{{ 101, 1, 1}, 0, { 910, 520}, {0x7e, 0x00, 0x01, 0xff}}},
};
// 0x0301BEC0 - 0x0301BFB8
const Gfx blue_fish_seg3_sub_dl_body[] = {
const Gfx blue_fish_seg3_dl_0301BEC0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_fish_seg3_texture_0301B5E0),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.l, 1),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.a, 2),
gsSPVertex(blue_fish_seg3_vertex_body, 12, 0),
gsSP2Triangles( 3, 0, 2, 0x0, 1, 4, 0, 0x0),
gsSP2Triangles( 0, 4, 2, 0x0, 3, 1, 0, 0x0),
gsSP2Triangles( 2, 4, 5, 0x0, 4, 1, 5, 0x0),
gsSP2Triangles( 5, 6, 2, 0x0, 7, 2, 6, 0x0),
gsSP2Triangles( 1, 8, 5, 0x0, 9, 8, 1, 0x0),
gsSP2Triangles( 1, 3, 10, 0x0, 10, 3, 2, 0x0),
gsSP2Triangles( 7, 9, 10, 0x0, 2, 7, 10, 0x0),
gsSP2Triangles(10, 9, 1, 0x0, 6, 5, 8, 0x0),
gsSP2Triangles(11, 7, 6, 0x0, 7, 11, 9, 0x0),
gsSP2Triangles( 9, 11, 8, 0x0, 8, 11, 6, 0x0),
gsSPVertex(blue_fish_seg3_vertex_0301BDE0, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 4, 0x0),
gsSP2Triangles( 5, 0, 3, 0x0, 2, 6, 0, 0x0),
gsSP2Triangles( 0, 6, 4, 0x0, 5, 1, 0, 0x0),
gsSP2Triangles( 4, 6, 7, 0x0, 6, 2, 7, 0x0),
gsSP2Triangles( 7, 8, 4, 0x0, 9, 4, 8, 0x0),
gsSP2Triangles( 9, 3, 4, 0x0, 2, 10, 7, 0x0),
gsSP2Triangles( 1, 11, 2, 0x0, 11, 10, 2, 0x0),
gsSP2Triangles( 1, 5, 12, 0x0, 12, 5, 3, 0x0),
gsSP2Triangles( 9, 11, 12, 0x0, 3, 9, 12, 0x0),
gsSP2Triangles(12, 11, 1, 0x0, 8, 7, 10, 0x0),
gsSP2Triangles(13, 9, 8, 0x0, 9, 13, 11, 0x0),
gsSP2Triangles(11, 13, 10, 0x0, 10, 13, 8, 0x0),
gsSPEndDisplayList(),
};
// 0x0301BFB8 - 0x0301C018
const Gfx blue_fish_seg3_dl_body[] = {
const Gfx blue_fish_seg3_dl_0301BFB8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
@@ -57,7 +61,7 @@ const Gfx blue_fish_seg3_dl_body[] = {
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(blue_fish_seg3_sub_dl_body),
gsSPDisplayList(blue_fish_seg3_dl_0301BEC0),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@@ -65,42 +69,48 @@ const Gfx blue_fish_seg3_dl_body[] = {
};
// 0x0301C018
static const Vtx blue_fish_seg3_vertex_tail[] = {
{{{ 67, 0, -58}, 0, { 736, 728}, {0x7a, 0x00, 0xde, 0xff}}}, // 0 bottom tip
{{{ 67, 0, -28}, 0, { 704, 574}, {0x54, 0x7f, 0x14, 0xff}}}, // 1 lower
{{{ 0, 0, 0}, 0, { 1019, 336}, {0xa0, 0xfb, 0x7e, 0xff}}}, // 2 joint
{{{ 53, 0, 0}, 0, { 744, 414}, {0x7e, 0x00, 0xfe, 0xff}}}, // 3 middle
{{{ 67, 0, 27}, 0, { 644, 290}, {0x40, 0x7f, 0xef, 0xff}}}, // 4 upper
{{{ 67, 0, 57}, 0, { 612, 138}, {0x7a, 0x00, 0x22, 0xff}}}, // 5 top tip
static const Vtx blue_fish_seg3_vertex_0301C018[] = {
{{{ 67, 0, -58}, 0, { 736, 728}, {0x7a, 0x00, 0xde, 0xff}}},
{{{ 67, -3, -28}, 0, { 704, 574}, {0x53, 0xa3, 0x14, 0xff}}},
{{{ 0, 1, -3}, 0, { 1022, 356}, {0xa1, 0xf9, 0xad, 0xff}}},
{{{ 67, 4, 27}, 0, { 644, 290}, {0x3f, 0x6d, 0xf3, 0xff}}},
{{{ 53, 0, 0}, 0, { 744, 414}, {0x7e, 0x00, 0xfe, 0xff}}},
{{{ 67, -3, 27}, 0, { 644, 290}, {0x40, 0x95, 0xeb, 0xff}}},
{{{ 0, 0, 5}, 0, { 1016, 312}, {0x9e, 0xfd, 0x50, 0xff}}},
{{{ 67, 4, -28}, 0, { 704, 574}, {0x54, 0x5c, 0x15, 0xff}}},
{{{ 67, 0, 57}, 0, { 612, 138}, {0x7a, 0x00, 0x22, 0xff}}},
};
// 0x0301C0A8 - 0x0301C150
const Gfx blue_fish_seg3_sub_dl_tail[] = {
const Gfx blue_fish_seg3_dl_0301C0A8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_fish_seg3_texture_0301B5E0),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.l, 1),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.a, 2),
gsSPVertex(blue_fish_seg3_vertex_tail, 6, 0),
gsSP2Triangles( 2, 4, 3, 0x0, 3, 1, 2, 0x0),
gsSP2Triangles( 2, 1, 0, 0x0, 2, 5, 4, 0x0),
gsSPVertex(blue_fish_seg3_vertex_0301C018, 9, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0),
gsSP2Triangles( 4, 5, 2, 0x0, 2, 5, 6, 0x0),
gsSP2Triangles( 2, 1, 4, 0x0, 2, 6, 3, 0x0),
gsSP2Triangles( 4, 7, 2, 0x0, 2, 7, 0, 0x0),
gsSP2Triangles( 6, 8, 3, 0x0, 3, 8, 5, 0x0),
gsSP2Triangles( 3, 5, 4, 0x0, 4, 1, 7, 0x0),
gsSP2Triangles( 6, 5, 8, 0x0, 1, 0, 7, 0x0),
gsSPEndDisplayList(),
};
// 0x0301C150 - 0x0301C1B0
const Gfx blue_fish_seg3_dl_tail[] = {
const Gfx blue_fish_seg3_dl_0301C150[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
gsSPClearGeometryMode(G_CULL_BACK),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(blue_fish_seg3_sub_dl_tail),
gsSPDisplayList(blue_fish_seg3_dl_0301C0A8),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_CULL_BACK),
gsSPEndDisplayList(),
};

View File

@@ -4,7 +4,7 @@ const GeoLayout boo_geo[] = {
GEO_OPEN_NODE(),
GEO_SCALE(0x00, 26214),
GEO_OPEN_NODE(),
GEO_ASM(GEO_TRANSPARENCY_MODE_NORMAL, geo_update_layer_transparency),
GEO_ASM(0, geo_update_layer_transparency),
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, boo_seg5_dl_0500C1B0),

View File

@@ -4,7 +4,7 @@ const GeoLayout boo_castle_geo[] = {
GEO_OPEN_NODE(),
GEO_SCALE(0x00, 26214),
GEO_OPEN_NODE(),
GEO_ASM(GEO_TRANSPARENCY_MODE_NORMAL, geo_update_layer_transparency),
GEO_ASM(0, geo_update_layer_transparency),
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, boo_castle_seg6_dl_06017CE0),

View File

@@ -332,7 +332,7 @@ const GeoLayout bowser_shadow_geo[] = {
const GeoLayout bowser_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_ASM(GEO_TRANSPARENCY_MODE_NORMAL, geo_update_layer_transparency),
GEO_ASM(0, geo_update_layer_transparency),
GEO_SWITCH_CASE(3, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_NODE_START(),
@@ -362,7 +362,7 @@ const GeoLayout bowser_geo[] = {
const GeoLayout bowser_geo_no_shadow[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_ASM(GEO_TRANSPARENCY_MODE_NORMAL, geo_update_layer_transparency),
GEO_ASM(0, geo_update_layer_transparency),
GEO_SWITCH_CASE(3, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_NODE_START(),

View File

@@ -1,16 +1,16 @@
// Breakable Box
// 0x08012D70 - 0x08012DF4
const Collision breakable_box_seg8_collision[] = {
const Collision breakable_box_seg8_collision_08012D70[] = {
COL_INIT(),
COL_VERTEX_INIT(0x8),
COL_VERTEX(-100, 0, -100),
COL_VERTEX(-100, 0, 100),
COL_VERTEX(-100, 200, 100),
COL_VERTEX( 100, 0, 100),
COL_VERTEX( 100, 200, 100),
COL_VERTEX( 100, 0, -100),
COL_VERTEX( 100, 200, -100),
COL_VERTEX(-100, 0, -100),
COL_VERTEX(-100, 0, 100),
COL_VERTEX(-100, 200, 100),
COL_VERTEX(100, 0, 100),
COL_VERTEX(100, 200, 100),
COL_VERTEX(100, 0, -100),
COL_VERTEX(100, 200, -100),
COL_VERTEX(-100, 200, -100),
COL_TRI_INIT(SURFACE_NO_CAM_COLLISION, 12),

View File

@@ -2,12 +2,12 @@
const GeoLayout breakable_box_geo[] = {
GEO_CULLING_RADIUS(500),
GEO_OPEN_NODE(),
GEO_SHADOW(SHADOW_SQUARE_PERMANENT, 0xA0, 240),
GEO_SHADOW(SHADOW_SQUARE_PERMANENT, 0xB4, 240),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_crazy_box),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_cork_box),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_08012D20),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_08012D48),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
@@ -15,13 +15,13 @@ const GeoLayout breakable_box_geo[] = {
};
// 0x0F000610
const GeoLayout breakable_box_no_shadow_geo[] = {
const GeoLayout breakable_box_small_geo[] = {
GEO_CULLING_RADIUS(500),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_crazy_box),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_cork_box),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_08012D20),
GEO_DISPLAY_LIST(LAYER_OPAQUE, breakable_box_seg8_dl_08012D48),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_END(),

View File

@@ -1,7 +1,7 @@
// Breakable Box
// 0x08011A78
static const Lights1 breakable_box_seg8_lights_default = gdSPDefLights1(
static const Lights1 breakable_box_seg8_lights_08011A80 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);
@@ -17,7 +17,7 @@ ALIGNED8 static const Texture breakable_box_seg8_texture_08012290[] = {
};
// 0x08012A90
static const Vtx breakable_box_seg8_vertex[] = {
static const Vtx breakable_box_seg8_vertex_08012A90[] = {
{{{ -100, 0, -100}, 0, { 992, 0}, {0x81, 0x00, 0x00, 0xff}}},
{{{ -100, 0, 100}, 0, { 992, 992}, {0x81, 0x00, 0x00, 0xff}}},
{{{ -100, 200, 100}, 0, { 0, 992}, {0x81, 0x00, 0x00, 0xff}}},
@@ -33,6 +33,10 @@ static const Vtx breakable_box_seg8_vertex[] = {
{{{ 100, 200, 100}, 0, { 0, 992}, {0x7f, 0x00, 0x00, 0xff}}},
{{{ 100, 0, 100}, 0, { 992, 992}, {0x7f, 0x00, 0x00, 0xff}}},
{{{ 100, 0, -100}, 0, { 992, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08012B80
static const Vtx breakable_box_seg8_vertex_08012B80[] = {
{{{ -100, 200, 100}, 0, { 0, 0}, {0x00, 0x7f, 0x00, 0xff}}},
{{{ 100, 200, -100}, 0, { 992, 992}, {0x00, 0x7f, 0x00, 0xff}}},
{{{ -100, 200, -100}, 0, { 992, 0}, {0x00, 0x7f, 0x00, 0xff}}},
@@ -47,16 +51,18 @@ static const Vtx breakable_box_seg8_vertex[] = {
};
// 0x08012C30 - 0x08012CD8
const Gfx breakable_box_seg8_sub_dl_end[] = {
gsSPLight(&breakable_box_seg8_lights_default.l, 1),
gsSPLight(&breakable_box_seg8_lights_default.a, 2),
gsSPVertex(breakable_box_seg8_vertex, 26, 0),
const Gfx breakable_box_seg8_dl_08012C30[] = {
gsSPLight(&breakable_box_seg8_lights_08011A80.l, 1),
gsSPLight(&breakable_box_seg8_lights_08011A80.a, 2),
gsSPVertex(breakable_box_seg8_vertex_08012A90, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP2Triangles(11, 13, 14, 0x0, 15, 16, 17, 0x0),
gsSP2Triangles(15, 18, 16, 0x0, 19, 20, 21, 0x0),
gsSP2Triangles(19, 21, 22, 0x0, 23, 24, 25, 0x0),
gsSP1Triangle(11, 13, 14, 0x0),
gsSPVertex(breakable_box_seg8_vertex_08012B80, 11, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
gsSP1Triangle( 8, 9, 10, 0x0),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@@ -65,9 +71,9 @@ const Gfx breakable_box_seg8_sub_dl_end[] = {
};
// 0x08012CD8 - 0x08012D20
const Gfx breakable_box_seg8_sub_dl_begin[] = {
const Gfx breakable_box_seg8_dl_08012CD8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
gsSPClearGeometryMode(G_SHADING_SMOOTH),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
@@ -78,19 +84,19 @@ const Gfx breakable_box_seg8_sub_dl_begin[] = {
};
// 0x08012D20 - 0x08012D48
const Gfx breakable_box_seg8_dl_crazy_box[] = {
gsSPDisplayList(breakable_box_seg8_sub_dl_begin),
const Gfx breakable_box_seg8_dl_08012D20[] = {
gsSPDisplayList(breakable_box_seg8_dl_08012CD8),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, breakable_box_seg8_texture_08011A90),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPBranchList(breakable_box_seg8_sub_dl_end),
gsSPBranchList(breakable_box_seg8_dl_08012C30),
};
// 0x08012D20 - 0x08012D70
const Gfx breakable_box_seg8_dl_cork_box[] = {
gsSPDisplayList(breakable_box_seg8_sub_dl_begin),
const Gfx breakable_box_seg8_dl_08012D48[] = {
gsSPDisplayList(breakable_box_seg8_dl_08012CD8),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, breakable_box_seg8_texture_08012290),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPBranchList(breakable_box_seg8_sub_dl_end),
gsSPBranchList(breakable_box_seg8_dl_08012C30),
};

View File

@@ -2,10 +2,7 @@
const GeoLayout burn_smoke_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
#ifdef BURN_SMOKE_FIX
GEO_ASM(GEO_TRANSPARENCY_MODE_INTER, geo_update_layer_transparency),
#endif
GEO_DISPLAY_LIST(LAYER_TRANSPARENT_INTER, burn_smoke_seg4_dl),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, burn_smoke_seg4_dl_04022070),
GEO_CLOSE_NODE(),
GEO_END(),
};

View File

@@ -1,7 +1,7 @@
// Burn Smoke
// 0x040217C0
static const Vtx burn_smoke_seg4_vertex[] = {
static const Vtx burn_smoke_seg4_vertex_040217C0[] = {
{{{ -50, -50, 0}, 0, { 0, 992}, {0x14, 0x0a, 0x0a, 0xff}}},
{{{ 50, -50, 0}, 0, { 992, 992}, {0x14, 0x0a, 0x0a, 0xff}}},
{{{ 50, 50, 0}, 0, { 992, 0}, {0x14, 0x0a, 0x0a, 0xff}}},
@@ -12,15 +12,15 @@ static const Vtx burn_smoke_seg4_vertex[] = {
// as a transparent black burn smoke. Probably meant to show up as white-ish
// burn smoke, but mistakened for being intended as black smoke.
// 0x04021800
ALIGNED8 static const Texture burn_smoke_seg4_sub_dl_texture[] = {
ALIGNED8 static const Texture burn_smoke_seg4_texture_04021800[] = {
#include "actors/burn_smoke/burn_smoke.ia16.inc.c"
};
// 0x04022000 - 0x04022028
const Gfx burn_smoke_seg4_sub_dl_begin[] = {
const Gfx burn_smoke_seg4_dl_04022000[] = {
gsDPPipeSync(),
#ifdef BURN_SMOKE_FIX
gsDPSetCombineMode(G_CC_MODULATEIFADEA, G_CC_MODULATEIFADEA),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
#else
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
#endif
@@ -30,14 +30,14 @@ const Gfx burn_smoke_seg4_sub_dl_begin[] = {
};
// 0x04022028 - 0x04022048
const Gfx burn_smoke_seg4_sub_dl_model[] = {
gsSPVertex(burn_smoke_seg4_vertex, 4, 0),
const Gfx burn_smoke_seg4_dl_04022028[] = {
gsSPVertex(burn_smoke_seg4_vertex_040217C0, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(),
};
// 0x04022048 - 0x04022070
const Gfx burn_smoke_seg4_sub_dl_end[] = {
const Gfx burn_smoke_seg4_dl_04022048[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@@ -46,14 +46,14 @@ const Gfx burn_smoke_seg4_sub_dl_end[] = {
};
// 0x04022070 - 0x040220C8
const Gfx burn_smoke_seg4_dl[] = {
gsSPDisplayList(burn_smoke_seg4_sub_dl_begin),
const Gfx burn_smoke_seg4_dl_04022070[] = {
gsSPDisplayList(burn_smoke_seg4_dl_04022000),
#ifdef BURN_SMOKE_FIX
gsDPLoadTextureBlock(burn_smoke_seg4_sub_dl_texture, G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPLoadTextureBlock(burn_smoke_seg4_texture_04021800, G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
#else
gsDPLoadTextureBlock(burn_smoke_seg4_sub_dl_texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPLoadTextureBlock(burn_smoke_seg4_texture_04021800, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
#endif
gsSPDisplayList(burn_smoke_seg4_sub_dl_model),
gsSPDisplayList(burn_smoke_seg4_sub_dl_end),
gsSPDisplayList(burn_smoke_seg4_dl_04022028),
gsSPDisplayList(burn_smoke_seg4_dl_04022048),
gsSPEndDisplayList(),
};

View File

@@ -21,7 +21,7 @@ ALIGNED8 static const Texture chair_seg5_texture_05004060[] = {
#include "actors/chair/chair_bottom.rgba16.inc.c"
};
// unreferenced texture
// unreferenced
// 0x05004460
UNUSED ALIGNED8 static const Texture chair_seg5_texture_05004460[] = {
#include "actors/chair/chair_surface_unused.rgba16.inc.c"

View File

@@ -1,7 +1,7 @@
// Checkerboard Platform
// 0x0800D710 - 0x0800D794
const Collision checkerboard_platform_seg8_collision_platform[] = {
const Collision checkerboard_platform_seg8_collision_0800D710[] = {
COL_INIT(),
COL_VERTEX_INIT(0x8),
COL_VERTEX(256, -25, -153),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 989 B

Some files were not shown because too many files have changed in this diff Show More