You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
67 Commits
v2.1.3
...
develop/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8676898ae9 | ||
|
|
c4c18b3d0e | ||
|
|
7298e94a1f | ||
|
|
27d328f86a | ||
|
|
27372fe74a | ||
|
|
3f1f7f41be | ||
|
|
bf70500b4d | ||
|
|
27fedee76f | ||
|
|
a918785a92 | ||
|
|
10720ea056 | ||
|
|
8dc47095e2 | ||
|
|
e3472e05cf | ||
|
|
74cb8ce062 | ||
|
|
9ef945296b | ||
|
|
e1c00d4bef | ||
|
|
aacf2c5e6d | ||
|
|
4500ffb579 | ||
|
|
a6782e6912 | ||
|
|
750ba10cb1 | ||
|
|
500507509b | ||
|
|
7381e35db4 | ||
|
|
6a3e7e7a87 | ||
|
|
9adb8c6de8 | ||
|
|
03ba81b5e3 | ||
|
|
98b6231216 | ||
|
|
252a900b91 | ||
|
|
92822c6412 | ||
|
|
0221d4ddf0 | ||
|
|
dcd58b2aad | ||
|
|
7ffa9a3bd7 | ||
|
|
dbba4871e1 | ||
|
|
520a6f3aed | ||
|
|
4d260f6885 | ||
|
|
aedae64e8b | ||
|
|
f3e1496d29 | ||
|
|
0005bbbd6a | ||
|
|
e494069b0a | ||
|
|
f852ff4359 | ||
|
|
2ae3426957 | ||
|
|
ca937d23ee | ||
|
|
7353db562c | ||
|
|
82e0fdf391 | ||
|
|
3e5d14e650 | ||
|
|
197d8074e3 | ||
|
|
c5d9f535ee | ||
|
|
8257f77c57 | ||
|
|
78747e9836 | ||
|
|
c96118bcd8 | ||
|
|
4c8233fe6a | ||
|
|
524e35c974 | ||
|
|
fc5ffa7438 | ||
|
|
d07e6383f6 | ||
|
|
1de4b9144b | ||
|
|
88c2cdb0a0 | ||
|
|
3a5a2f14dd | ||
|
|
b9ba17a4d6 | ||
|
|
5064fcfb69 | ||
|
|
bf924a8ec3 | ||
|
|
1d7a690361 | ||
|
|
6148582f5e | ||
|
|
913cda93b8 | ||
|
|
d7c840b8f1 | ||
|
|
b73d8dd178 | ||
|
|
9fc928ed70 | ||
|
|
76dae5e8dd | ||
|
|
1646702393 | ||
|
|
dcfcf50a80 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2149,3 +2149,6 @@ lib/libs2d_engine.a
|
||||
|
||||
# :Zone_Identifier files
|
||||
*Zone.Identifier
|
||||
|
||||
# user-specific config file
|
||||
include/config/config_local.h
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "lib/libpl"]
|
||||
path = lib/libpl
|
||||
url = https://gitlab.com/parallel-launcher/libpl.git
|
||||
4
.vscode/c_cpp_properties.json
vendored
4
.vscode/c_cpp_properties.json
vendored
@@ -26,7 +26,9 @@
|
||||
"VERSION_US=1",
|
||||
"F3DEX_GBI_2=1",
|
||||
"F3DZEX_NON_GBI_2=1",
|
||||
"F3DEX_GBI_SHARED=1"
|
||||
"F3DEX_GBI_SHARED=1",
|
||||
"LIBPL=1",
|
||||
"SDATA=1"
|
||||
],
|
||||
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
|
||||
"cStandard": "gnu17",
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @Reonu
|
||||
* @thecozies
|
||||
* @gheskett
|
||||
* @Reonu @gheskett @arthurtilly
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
# So if a pull request only touches javascript files, only these owners
|
||||
|
||||
132
Makefile
132
Makefile
@@ -135,7 +135,7 @@ endif
|
||||
#==============================================================================#
|
||||
|
||||
# Default non-gcc opt flags
|
||||
DEFAULT_OPT_FLAGS = -Ofast
|
||||
DEFAULT_OPT_FLAGS = -Ofast -falign-functions=32
|
||||
# Note: -fno-associative-math is used here to suppress warnings, ideally we would enable this as an optimization but
|
||||
# this conflicts with -ftrapping-math apparently.
|
||||
# TODO: Figure out how to allow -fassociative-math to be enabled
|
||||
@@ -253,11 +253,32 @@ ifeq ($(HVQM),1)
|
||||
SRC_DIRS += src/hvqm
|
||||
endif
|
||||
|
||||
# LIBPL - whether to include libpl library for interfacing with Parallel Launcher
|
||||
# (library will be pulled into repo after building with this enabled for the first time)
|
||||
# 1 - includes code in ROM
|
||||
# 0 - does not
|
||||
LIBPL ?= 0
|
||||
LIBPL_DIR := lib/libpl
|
||||
$(eval $(call validate-option,LIBPL,0 1))
|
||||
ifeq ($(LIBPL),1)
|
||||
DEFINES += LIBPL=1
|
||||
SRC_DIRS += $(LIBPL_DIR)
|
||||
endif
|
||||
|
||||
# SDATA - use 64kb sdata and sbss sections to enhance performance (requires some housekeeping; recommended for experienced hackers only)
|
||||
# 1 - includes sdata and sbss in ROM
|
||||
# 0 - does not
|
||||
SDATA ?= 0
|
||||
$(eval $(call validate-option,SDATA,0 1))
|
||||
ifeq ($(SDATA),1)
|
||||
DEFINES += SDATA=1
|
||||
endif
|
||||
|
||||
BUILD_DIR_BASE := build
|
||||
# BUILD_DIR is the location where all build artifacts are placed
|
||||
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
|
||||
|
||||
COMPRESS ?= rnc1
|
||||
COMPRESS ?= yay0
|
||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||
ifeq ($(COMPRESS),gzip)
|
||||
DEFINES += GZIP=1
|
||||
@@ -335,6 +356,18 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to build tools)
|
||||
endif
|
||||
|
||||
# Clone any needed submodules
|
||||
ifeq ($(LIBPL),1)
|
||||
ifeq ($(wildcard $(LIBPL_DIR)/*.h),)
|
||||
$(info Cloning libpl submodule...)
|
||||
DUMMY != git submodule update --init $(LIBPL_DIR) > /dev/null || echo FAIL
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to clone libpl submodule)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
$(info Building ROM...)
|
||||
|
||||
endif
|
||||
@@ -375,6 +408,9 @@ 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
|
||||
|
||||
# Ignore all .inc.c files
|
||||
C_FILES := $(filter-out %.inc.c,$(C_FILES))
|
||||
|
||||
# Sound files
|
||||
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
|
||||
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
|
||||
@@ -417,8 +453,12 @@ else ifneq ($(call find-command,mips-linux-gnu-ld),)
|
||||
CROSS := mips-linux-gnu-
|
||||
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
|
||||
CROSS := mips64-linux-gnu-
|
||||
else ifneq ($(call find-command,mips64-none-elf-ld),)
|
||||
CROSS := mips64-none-elf-
|
||||
else ifneq ($(call find-command,mips-ld),)
|
||||
CROSS := mips-
|
||||
else ifneq ($(call find-command,mips-suse-linux-ld ),)
|
||||
CROSS := mips-suse-linux-
|
||||
else
|
||||
$(error Unable to detect a suitable MIPS toolchain installed)
|
||||
endif
|
||||
@@ -435,6 +475,10 @@ ifeq ($(COMPILER),gcc)
|
||||
CXX := $(CROSS)g++
|
||||
$(BUILD_DIR)/actors/%.o: OPT_FLAGS := -Ofast -mlong-calls
|
||||
$(BUILD_DIR)/levels/%.o: OPT_FLAGS := -Ofast -mlong-calls
|
||||
ifeq ($(SDATA),1)
|
||||
$(BUILD_DIR)/actors/%.o: CFLAGS += -G 0
|
||||
$(BUILD_DIR)/levels/%.o: CFLAGS += -G 0
|
||||
endif
|
||||
else ifeq ($(COMPILER),clang)
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
@@ -475,17 +519,25 @@ C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
|
||||
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)
|
||||
CFLAGS = $(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
|
||||
CFLAGS += -Wno-missing-braces
|
||||
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces
|
||||
else ifeq ($(COMPILER),clang)
|
||||
CFLAGS += -mfpxx -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
|
||||
CFLAGS += -Wno-missing-braces
|
||||
CFLAGS += -mfpxx -target mips -mabi=32 -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
|
||||
else
|
||||
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
|
||||
endif
|
||||
ASMFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) -mips3 $(DEF_INC_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
|
||||
ASMFLAGS = -G 3 $(OPT_FLAGS) $(TARGET_CFLAGS) -mips3 $(DEF_INC_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
|
||||
|
||||
ifeq ($(SDATA),1)
|
||||
ASMFLAGS += -G 3
|
||||
else
|
||||
CFLAGS += -G 0
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CFLAGS += -fno-zero-initialized-in-bss
|
||||
endif
|
||||
ASMFLAGS += -G 0
|
||||
endif
|
||||
|
||||
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
|
||||
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
||||
@@ -524,13 +576,28 @@ ifneq (,$(call find-command,armips))
|
||||
else
|
||||
RSPASM := $(TOOLS_DIR)/armips
|
||||
endif
|
||||
EMULATOR = mupen64plus
|
||||
EMU_FLAGS =
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe
|
||||
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
|
||||
else
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader
|
||||
EMULATOR = parallel-launcher
|
||||
endif
|
||||
|
||||
EMU_FLAGS =
|
||||
|
||||
# Adding a txt file to this location will then reference a UNFLoader path specified in the file, instead of locally.
|
||||
# This is expecially important for WSL users because UNFLoader.exe is incredibly slow when run within WSL's filesystem, so this can be used to point to the C drive.
|
||||
# The file should only contain the directory path that contains UNFLoader[.exe] (do not specify the filename).
|
||||
LOADER_DIR_FILE_SPECIFICATION_PATH = ~/.local/share/HackerSM64/UNFLoader-dir.txt
|
||||
LOADER_DIR = ./$(TOOLS_DIR)
|
||||
|
||||
ifneq (,$(wildcard $(LOADER_DIR_FILE_SPECIFICATION_PATH)))
|
||||
LOADER_DIR = $(shell cat $(LOADER_DIR_FILE_SPECIFICATION_PATH))
|
||||
endif
|
||||
ifneq (,$(call find-command,wslview))
|
||||
LOADER_EXEC = $(LOADER_DIR)/UNFLoader.exe
|
||||
else
|
||||
LOADER_EXEC = $(LOADER_DIR)/UNFLoader
|
||||
endif
|
||||
|
||||
SHA1SUM = sha1sum
|
||||
@@ -586,17 +653,17 @@ test-pj64: $(ROM)
|
||||
# someone2639
|
||||
|
||||
# download and extract most recent unfloader build if needed
|
||||
$(LOADER):
|
||||
ifeq (,$(wildcard $(LOADER)))
|
||||
$(LOADER_EXEC):
|
||||
ifeq (,$(wildcard $(LOADER_EXEC)))
|
||||
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR)
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(LOADER_DIR)
|
||||
endif
|
||||
|
||||
load: $(ROM) $(LOADER)
|
||||
$(LOADER) -r $<
|
||||
load: $(ROM) $(LOADER_EXEC)
|
||||
$(LOADER_EXEC) -r $<
|
||||
|
||||
unf: $(ROM) $(LOADER)
|
||||
$(LOADER) -d -r $<
|
||||
unf: $(ROM) $(LOADER_EXEC)
|
||||
$(LOADER_EXEC) -d -r $<
|
||||
|
||||
libultra: $(BUILD_DIR)/libultra.a
|
||||
|
||||
@@ -650,8 +717,13 @@ $(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wn
|
||||
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
|
||||
$(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized
|
||||
# File specific opt flags
|
||||
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
ifeq ($(SDATA),1)
|
||||
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables -ffunction-sections -fdata-sections
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables -ffunction-sections -fdata-sections
|
||||
else
|
||||
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/src/engine/surface_collision.o: OPT_FLAGS := $(COLLISION_OPT_FLAGS)
|
||||
$(BUILD_DIR)/src/engine/math_util.o: OPT_FLAGS := $(MATH_UTIL_OPT_FLAGS)
|
||||
@@ -745,7 +817,7 @@ endif
|
||||
|
||||
$(BUILD_DIR)/%.table: %.aiff
|
||||
$(call print,Extracting codebook:,$<,$@)
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< $@
|
||||
|
||||
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
|
||||
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
|
||||
@@ -833,9 +905,23 @@ ifeq ($(FIXLIGHTS),1)
|
||||
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) actors
|
||||
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) levels
|
||||
endif
|
||||
|
||||
ifeq ($(SDATA),1)
|
||||
$(BUILD_DIR)/src/boot/%.o: src/boot/%.c
|
||||
$(call print,Compiling Boot:,$<,$@)
|
||||
$(V)$(CC) -c -G 0 $(CFLAGS) -MMD -MF $(BUILD_DIR)/src/boot/$*.d -o $@ $<
|
||||
$(BUILD_DIR)/src/%.o: src/%.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
$(V)$(CC) -c -G 64 $(CFLAGS) -MMD -MF $(BUILD_DIR)/src/$*.d -o $@ $<
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
$(V)$(CC) -c -G 0 -fno-zero-initialized-in-bss $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
else
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/%.o: %.cpp
|
||||
$(call print,Compiling (C++):,$<,$@)
|
||||
$(V)$(CXX) -c $(CFLAGS) -std=c++17 -Wno-register -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
@@ -889,7 +975,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) $(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 $(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 $(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
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
|
||||
@@ -36,7 +36,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
|
||||
**Lighting Engine by Wiseguy**
|
||||
- Lighting Engine is available on a separate branch ([base/lighting-engine](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine)). Instructions on how to use it are in the readme of that branch.
|
||||
- Alternatively, the main repo has `Puppylights` available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at `puppylights.c` to find out how to use it.
|
||||
|
||||
**Puppycam**
|
||||
- Puppycam is available on the master branch now, you can toggle it in `config/config_camera.h`. *
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.1.3
|
||||
v2.3.0
|
||||
|
||||
18
asm/setgp.s
Normal file
18
asm/setgp.s
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifdef SDATA
|
||||
|
||||
// assembler directives
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
glabel setgp
|
||||
lui $gp, %hi(_gp)
|
||||
jr $ra
|
||||
addiu $gp, %lo(_gp)
|
||||
|
||||
#endif
|
||||
@@ -30,7 +30,7 @@ const u8 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const Vtx vertex_billboard_num[] = {
|
||||
// 0x0200EFF0 - 0x0200F038
|
||||
const Gfx dl_billboard_num_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
@@ -2490,6 +2491,7 @@ const Gfx dl_billboard_num_end[] = {
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#define BC_HH(a, b) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 0, 16))
|
||||
#define BC_W(a) ((uintptr_t)(u32)(a))
|
||||
#define BC_PTR(a) ((uintptr_t)(a))
|
||||
#define BC_BPTR(a, b) (_SHIFTL(a, 24, 8) + OS_K0_TO_PHYSICAL(b))
|
||||
|
||||
enum BehaviorCommands {
|
||||
/*0x00*/ BHV_CMD_BEGIN,
|
||||
@@ -180,8 +181,7 @@ enum BehaviorCommands {
|
||||
|
||||
// Executes a native game function.
|
||||
#define CALL_NATIVE(func) \
|
||||
BC_B(BHV_CMD_CALL_NATIVE), \
|
||||
BC_PTR(func)
|
||||
BC_BPTR(BHV_CMD_CALL_NATIVE, func)
|
||||
|
||||
// Adds a float to the specified field.
|
||||
#define ADD_FLOAT(field, value) \
|
||||
@@ -386,8 +386,7 @@ enum BehaviorCommands {
|
||||
|
||||
// Spawns a water droplet with the given parameters.
|
||||
#define SPAWN_WATER_DROPLET(dropletParams) \
|
||||
BC_B(BHV_CMD_SPAWN_WATER_DROPLET), \
|
||||
BC_PTR(dropletParams)
|
||||
BC_BPTR(BHV_CMD_SPAWN_WATER_DROPLET, dropletParams)
|
||||
|
||||
|
||||
const BehaviorScript bhvStarDoor[] = {
|
||||
@@ -2695,7 +2694,7 @@ const BehaviorScript bhvSushiShark[] = {
|
||||
|
||||
const BehaviorScript bhvJrbSlidingBox[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT),
|
||||
LOAD_COLLISION_DATA(jrb_seg7_collision_floating_box),
|
||||
SET_HOME(),
|
||||
BEGIN_LOOP(),
|
||||
@@ -5438,11 +5437,7 @@ const BehaviorScript bhvTTCPendulum[] = {
|
||||
|
||||
const BehaviorScript bhvTTCTreadmill[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
#ifdef PLATFORM_DISPLACEMENT_2
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_VELOCITY_PLATFORM)),
|
||||
#else
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
#endif
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT)),
|
||||
SET_FLOAT(oCollisionDistance, 750),
|
||||
CALL_NATIVE(bhv_ttc_treadmill_init),
|
||||
DELAY(1),
|
||||
@@ -5873,7 +5868,7 @@ const BehaviorScript bhvRacingPenguin[] = {
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
LOAD_ANIMATIONS(oAnimations, penguin_seg5_anims_05008B74),
|
||||
ANIMATE(PENGUIN_ANIM_IDLE),
|
||||
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 300, /*Gravity*/ -800, /*Bounciness*/ -5, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0),
|
||||
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 200, /*Gravity*/ -800, /*Bounciness*/ -5, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0),
|
||||
SCALE(/*Unused*/ 0, /*Field*/ 400),
|
||||
CALL_NATIVE(bhv_racing_penguin_init),
|
||||
BEGIN_LOOP(),
|
||||
|
||||
@@ -177,9 +177,15 @@ def main():
|
||||
# presence of the correct roms automatically
|
||||
|
||||
# Make sure tools exist
|
||||
subprocess.check_call(
|
||||
["make", "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
||||
)
|
||||
tools = [ "n64graphics", "skyconv", "mio0", "aifc_decode" ]
|
||||
if os.name == 'nt':
|
||||
tools = [tool + ".exe" for tool in tools]
|
||||
make = "mingw32-make"
|
||||
else:
|
||||
make = "make"
|
||||
|
||||
cmd = [make, "-s", "-C", "tools/"] + tools
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
# Go through the assets in roughly alphabetical order (but assets in the same
|
||||
# mio0 file still go together).
|
||||
|
||||
28
fast64.json
Normal file
28
fast64.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"version": 1.0,
|
||||
"autoLoad": true,
|
||||
"microcode": "F3DEX2/LX2",
|
||||
"rdpDefaults": {
|
||||
"geometryMode": {
|
||||
"zBuffer": true,
|
||||
"shade": true,
|
||||
"cullBack": true,
|
||||
"lighting": true,
|
||||
"shadeSmooth": true
|
||||
},
|
||||
"otherModeH": {
|
||||
"textureConvert": "G_TC_FILT",
|
||||
"textureFilter": "G_TF_BILERP",
|
||||
"perspectiveCorrection": "G_TP_PERSP",
|
||||
"pipelineMode": "G_PM_1PRIMITIVE"
|
||||
},
|
||||
"otherModeL": {},
|
||||
"other": {}
|
||||
},
|
||||
"sm64": {
|
||||
"refresh_version": "HackerSM64 2.3.0",
|
||||
"compression_format": "yay0",
|
||||
"force_extended_ram": false,
|
||||
"matstack_fix": true
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,10 @@
|
||||
#include "config/config_objects.h"
|
||||
#include "config/config_rom.h"
|
||||
|
||||
// Local config - include a gitignore'd config file that's specific to just the user (if the file exists)
|
||||
#if __has_include("config/config_local.h")
|
||||
#include "config/config_local.h"
|
||||
#endif
|
||||
|
||||
/* WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing */
|
||||
// WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing
|
||||
#include "config/config_safeguards.h"
|
||||
|
||||
@@ -17,3 +17,9 @@
|
||||
* Skips the title/splash screen (Super Mario 64 logo).
|
||||
*/
|
||||
// #define SKIP_TITLE_SCREEN
|
||||
|
||||
/**
|
||||
* Skips the File Select screen
|
||||
*/
|
||||
// #define SKIP_FILE_SELECT
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
/**
|
||||
* Makes the coins ia8 64x64 instead of ia16 32x32. Uses new ia8 textures so that vanilla coins look better.
|
||||
*/
|
||||
#define IA8_COINS
|
||||
// #define IA8_COINS
|
||||
|
||||
/**
|
||||
* Similar to the above, but 30 FPS (Textures by InTheBeef, cleaned up by Arceveti).
|
||||
*/
|
||||
#define IA8_30FPS_COINS
|
||||
// #define IA8_30FPS_COINS
|
||||
|
||||
/**
|
||||
* Use .rej microcode for certain objects (experimental - only should be used when F3DEX_GBI_2 is defined).
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/**
|
||||
* Decides whether you can exit course while moving (has no effect if you disable Exit Course).
|
||||
*/
|
||||
#define EXIT_COURSE_WHILE_MOVING
|
||||
// #define EXIT_COURSE_WHILE_MOVING
|
||||
|
||||
/**
|
||||
* Decides whether to treat exiting course as if the player had died.
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
* - Precise turning control.
|
||||
* - Prevents falling from the edges.
|
||||
*/
|
||||
#define BETTER_HANGING
|
||||
// #define BETTER_HANGING
|
||||
|
||||
/**
|
||||
* Change the movement speed when hanging from a ceiling (the vanilla value is 4.0f, has no effect if BETTER_HANGING is enabled).
|
||||
*/
|
||||
#define HANGING_SPEED 12.0f
|
||||
#define HANGING_SPEED 4.0f
|
||||
|
||||
/**
|
||||
* Prevents Mario from falling asleep while idle.
|
||||
@@ -81,12 +81,12 @@
|
||||
/**
|
||||
* If A and Z are pressed on the same frame while running, Mario will long jump instead of ground pound.
|
||||
*/
|
||||
#define EASIER_LONG_JUMPS
|
||||
// #define EASIER_LONG_JUMPS
|
||||
|
||||
/**
|
||||
* Enables the ability to hold Z while twirling to descend faster.
|
||||
*/
|
||||
#define Z_TWIRL
|
||||
// #define Z_TWIRL
|
||||
|
||||
/**
|
||||
* Disables bonks when ground pounding next to a wall.
|
||||
@@ -101,7 +101,7 @@
|
||||
/**
|
||||
* Allows Mario to grab hangable ceilings from any state.
|
||||
*/
|
||||
#define HANGING_FIX
|
||||
// #define HANGING_FIX
|
||||
|
||||
/**
|
||||
* The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under.
|
||||
@@ -113,6 +113,11 @@
|
||||
*/
|
||||
#define DONT_LEDGE_GRAB_STEEP_SLOPES
|
||||
|
||||
/**
|
||||
* Buffers an A input if you jump off a slope during the landing lag
|
||||
*/
|
||||
// #define SLOPE_BUFFER
|
||||
|
||||
/**
|
||||
* Disables BLJs and crushes SimpleFlips's dreams.
|
||||
*/
|
||||
@@ -129,16 +134,10 @@
|
||||
* be interrupted with text
|
||||
* Uncomment this to fix this bug, and frustrate speedrunners
|
||||
*/
|
||||
// #define BUGFIX_DIALOG_TIME_STOP
|
||||
|
||||
/**
|
||||
* Enables Platform Displacement 2, an upgrade to the physics involving moving platforms and how Mario interacts with them.
|
||||
*/
|
||||
#define PLATFORM_DISPLACEMENT_2
|
||||
#define BUGFIX_DIALOG_TIME_STOP
|
||||
|
||||
/**
|
||||
* Inertia defines; allow Mario to preserve his momemtum when leaving moving platforms.
|
||||
* These require Platform Displacement 2 to be enabled.
|
||||
*/
|
||||
#define MARIO_INERTIA_UPWARD
|
||||
// #define MARIO_INERTIA_LATERAL
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* Moving Coins flicker and disappear when they hit lava instead of being instantly deleted.
|
||||
*/
|
||||
#define COIN_LAVA_FLICKER
|
||||
// #define COIN_LAVA_FLICKER
|
||||
|
||||
/**
|
||||
* Allows for retries on collecting the remaining blue coins from a blue coin switch.
|
||||
@@ -56,7 +56,7 @@
|
||||
/**
|
||||
* Causes leaf particles to occasionally fall from trees which contain Hoot.
|
||||
*/
|
||||
#define HOOT_TREE_PARTICLES
|
||||
// #define HOOT_TREE_PARTICLES
|
||||
|
||||
/**************
|
||||
* -- MR I --
|
||||
|
||||
@@ -49,26 +49,6 @@
|
||||
#undef BETTER_REVERB
|
||||
#endif
|
||||
|
||||
|
||||
/*****************
|
||||
* config_graphics.h
|
||||
*/
|
||||
|
||||
#ifndef F3DEX_GBI_2
|
||||
#undef OBJECTS_REJ // OBJECTS_REJ requires f3dex2.
|
||||
#endif // !F3DEX_GBI_2
|
||||
|
||||
#ifndef F3DEX_GBI_SHARED
|
||||
#undef OBJECTS_REJ // Non F3DEX-based ucodes do NOT support ucode switching.
|
||||
#endif // !F3DEX_GBI_SHARED
|
||||
|
||||
#ifdef OBJECTS_REJ
|
||||
// Enable required ucodes.
|
||||
#define F3DEX2_REJ_GBI
|
||||
#define F3DLX2_REJ_GBI
|
||||
#endif // OBJECTS_REJ
|
||||
|
||||
|
||||
/*****************
|
||||
* config_debug.h
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "level_table.h"
|
||||
#include "config.h"
|
||||
#include "game/puppylights.h"
|
||||
|
||||
enum LevelCommands {
|
||||
/*0x00*/ LEVEL_CMD_LOAD_AND_EXECUTE,
|
||||
@@ -71,9 +70,7 @@ enum LevelCommands {
|
||||
/*0x3C*/ LEVEL_CMD_GET_OR_SET_VAR,
|
||||
/*0x3D*/ LEVEL_CMD_PUPPYVOLUME,
|
||||
/*0x3E*/ LEVEL_CMD_CHANGE_AREA_SKYBOX,
|
||||
/*0x3F*/ LEVEL_CMD_PUPPYLIGHT_ENVIRONMENT,
|
||||
/*0x40*/ LEVEL_CMD_PUPPYLIGHT_NODE,
|
||||
/*0x41*/ LEVEL_CMD_SET_ECHO,
|
||||
/*0x3F*/ LEVEL_CMD_SET_ECHO,
|
||||
};
|
||||
|
||||
enum LevelActs {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user