Merge latest changes from upstream

This commit is contained in:
Sean Maas 2022-04-12 15:12:43 -04:00
commit a3e05fc7ff
505 changed files with 14263 additions and 11268 deletions

56
CHANGES
View file

@ -1,3 +1,59 @@
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)
2.) Generate MIO0 object files using binutils `ld` instead of `as` (#1173)
3.) Bowser documentation (#1166)
4.) Fix comment syntax in 00_sound_player.0 (#1172)
5.) Rename in-game menu variables (#1163)
6.) Document double red coin sound and JP sound glitch (#1170)
7.) Document different bug in external.c (#1168)
8.) updated names/types of octagonal platform data (#1164)
9.) Label a number of unnamed variables. (#1169)
10.) Document JP PU sound glitch (#1167)
11.) Set model ids to spawn_triangle_break_particles (#1165)
12.) Fix borders in clear_frame_buffer (#1162)
13.) Fix seq header files for 64-bit (#1161)
14.) Game_init.c remaining doc (#1158)
15.) Label a couple static variables in sound_init.c (#1159)
16.) Properly define dialog values (status, flags, cutscenes) (#1153)
17.) Label all of amp's assets. (#1018)
18.) Split audio/synthesis.c into Shindou/non-Shindou files (#1144)
19.) Avoid CC_CHECK warnings when using gcc (#1157)
20.) level_select_menu.c => title_screen.c (#1152)
21.) Use C preprocessor on assembly files (#1126)
22.) Replace output_level_headers.py with sed equivalent (#1109)
23.) Fix CC_CHECK warnings related to unused symbols and UB (#1155)
24.) Define remaining floor lower limit values (#1147)
25.) use r+b mode for libultra.a patch tool (#1148)
26.) Use proper values for gPrevFrameObjectCount ifs (#1146)
27.) Some minor bowser.inc.c labelling. (#1150)
28.) fix king bob-omb texture pointers (#1145)
29.) Split audio/load.c into Shindou/non-Shindou files (#1143)
30.) Small Shindou audio cleanups (#1142)
31.) Fix endians in ALSeqData (#1141)
32.) Document S8 decoder rsp operation and some more (#1139)
33.) Fix Shindou synthesis_process_note fake match (#1140)
34.) More audio documentation, for the new rsp code and other fixes (#1138)
35.) Build fixes for macOS: cpp, clang, recomp, aiff_extract_codebook (#1135)
36.) Add ENABLE_RUMBLE to config.h (#1122)
37.) Reduce recomp memory consumption by using smaller disassembly blocks (#1128)
38.) Makefile fixes (#1123)
39.) Update README.md
40.) Update README.md
41.) Reflect current decompilation status
42.) Allow both archives and ELF objects to be patched (#1127)
43.) Remove WIP mention in README for sh version.
Refresh 13 2
- No more nonmatchings remain for all builds including Shindou.

View file

@ -261,7 +261,6 @@ GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/d
$(addprefix $(BUILD_DIR)/bin/,$(addsuffix _skybox.c,$(notdir $(basename $(wildcard textures/skyboxes/*.png)))))
ifeq ($(TARGET_NDS),1)
C_FILES := $(filter-out src/game/main.c,$(C_FILES))
ULTRA_C_FILES := \
alBnkfNew.c \
guLookAtRef.c \
@ -367,12 +366,6 @@ else
COPT := $(IDO_ROOT)/copt
endif
endif
# Prefer gcc's cpp if installed on the system
ifneq (,$(call find-command,cpp-10))
CPP := cpp-10
else
CPP := cpp
endif
LD := $(CROSS)ld
AR := $(CROSS)ar
OBJDUMP := $(CROSS)objdump
@ -393,6 +386,15 @@ endif
C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
# Prefer clang as C preprocessor if installed on the system
ifneq (,$(call find-command,clang))
CPP := clang
CPPFLAGS := -E -P -x c -Wno-trigraphs $(DEF_INC_CFLAGS)
else
CPP := cpp
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
endif
ifeq ($(TARGET_NDS),1)
LIBDIRS := $(DEVKITPRO)/libnds
@ -427,9 +429,6 @@ endif
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
# C preprocessor flags
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
ifeq ($(shell getconf LONG_BIT), 32)
# Work around memory allocation bug in QEMU
export QEMU_GUEST_BASE := 1
@ -524,7 +523,7 @@ $(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl.inc.c $(SO
$(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h
ifeq ($(VERSION),sh)
$(BUILD_DIR)/src/audio/load.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_DIR)/sequences_header.inc.c $(SOUND_BIN_DIR)/ctl_header.inc.c $(SOUND_BIN_DIR)/tbl_header.inc.c
$(BUILD_DIR)/src/audio/load_sh.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_DIR)/sequences_header.inc.c $(SOUND_BIN_DIR)/ctl_header.inc.c $(SOUND_BIN_DIR)/tbl_header.inc.c
endif
$(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32
@ -617,11 +616,11 @@ $(BUILD_DIR)/levels/%/leveldata.elf: $(BUILD_DIR)/levels/%/leveldata.o $(BUILD_D
$(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $<
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf
$(call print,Extracting compressionable data from:,$<,$@)
$(call print,Extracting compressible data from:,$<,$@)
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
$(BUILD_DIR)/levels/%/leveldata.bin: $(BUILD_DIR)/levels/%/leveldata.elf
$(call print,Extracting compressionable data from:,$<,$@)
$(call print,Extracting compressible data from:,$<,$@)
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
# Compress binary file
@ -632,10 +631,9 @@ $(BUILD_DIR)/%.mio0: $(BUILD_DIR)/%.bin
# convert binary mio0 to object file
$(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0
$(call print,Converting MIO0 to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
$(V)$(LD) -r -b binary $< -o $@
endif
#==============================================================================#
# Sound File Generation #
#==============================================================================#
@ -659,7 +657,7 @@ $(BUILD_DIR)/%.table: %.aiff
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
$(call print,Encoding VADPCM:,$<,$@)
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
$(V)$(VADPCM_ENC) -c $^ $@
endif
@ -668,8 +666,8 @@ $(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
$(V)$(CC) -c $(CFLAGS) -o $@.dummy2 $< 2>$@.dummy1; true
$(V)grep -o 'msgbegin --endian .* --bitwidth .* msgend' $@.dummy1 > $@.dummy2
$(V)head -n1 <$@.dummy2 | cut -d' ' -f2-5 > $@
@$(RM) $@.dummy1
@$(RM) $@.dummy2
$(V)$(RM) $@.dummy1
$(V)$(RM) $@.dummy2
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
@ -705,7 +703,7 @@ $(SOUND_BIN_DIR)/%.m64: $(SOUND_BIN_DIR)/%.o
# Convert binary file to a comma-separated list of byte values for inclusion in C code
$(BUILD_DIR)/%.inc.c: $(BUILD_DIR)/%
$(call print,Piping:,$<,$@)
$(call print,Converting to C:,$<,$@)
$(V)hexdump -v -e '1/1 "0x%X,"' $< > $@
$(V)echo >> $@
@ -736,7 +734,7 @@ $(BUILD_DIR)/text/%/define_text.inc.c: text/define_text.inc.c text/%/courses.h t
# Level headers
$(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
$(call print,Preprocessing level headers:,$<,$@)
$(V)$(CPP) $(CPPFLAGS) -I . levels/level_headers.h.in | $(PYTHON) $(TOOLS_DIR)/output_level_headers.py > $(BUILD_DIR)/include/level_headers.h
$(V)$(CPP) $(CPPFLAGS) -I . $< | sed -E 's|(.+)|#include "\1"|' > $@
# Run asm_processor on files that have NON_MATCHING code
ifeq ($(NON_MATCHING),0)
@ -786,46 +784,36 @@ ifeq ($(COMPILER),ido)
$(BUILD_DIR)/lib/src/string.o: OPT_FLAGS := -O2
$(BUILD_DIR)/lib/src/gu%.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/al%.o: OPT_FLAGS := -O3
# For the asm-processor, since it doesn't support -O3. Probably not actually compiled with these flags.
ifeq ($(VERSION),sh)
$(BUILD_DIR)/lib/src/unk_shindou_file.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/func_sh_80304D20.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/contramread.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/osPfsIsPlug.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/osAiSetFrequency.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/contramwrite.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/osDriveRomInit.o: OPT_FLAGS := -g
endif
ifeq ($(VERSION),eu)
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
# Enable loop unrolling except for external.c (external.c might also have used
# unrolling, but it makes one loop harder to match).
# For all audio files other than external.c and port_eu.c, put string literals
# in .data. (In Shindou, the port_eu.c string literals also moved to .data.)
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -use_readwrite_const
$(BUILD_DIR)/src/audio/port_eu.o: OPT_FLAGS := -O2
$(BUILD_DIR)/src/audio/external.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
endif
ifeq ($(VERSION_JP_US),true)
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
$(BUILD_DIR)/src/audio/load.o: OPT_FLAGS := -O2 -framepointer -Wo,-loopunroll,0
endif
ifeq ($(VERSION_JP_US),true)
$(BUILD_DIR)/src/audio/load.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -framepointer
# The source-to-source optimizer copt is enabled for audio. This makes it use
# acpp, which needs -Wp,-+ to handle C++-style comments.
# All other files than external.c should really use copt, but only a few have
# been matched so far.
$(BUILD_DIR)/src/audio/effects.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -sopt,-inline=sequence_channel_process_sound,-scalaroptimize=1 -Wp,-+
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -O2 -sopt,-scalaroptimize=1 -Wp,-+
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -sopt,-scalaroptimize=1 -Wp,-+
endif
$(BUILD_DIR)/src/audio/external.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
# Add a target for build/eu/src/audio/*.copt to make it easier to see debug
$(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c
@ -839,7 +827,7 @@ endif
# Assemble assembly code
$(BUILD_DIR)/%.o: %.s
$(call print,Assembling:,$<,$@)
$(V)$(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@ $<
$(V)$(CPP) $(CPPFLAGS) $< | $(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@
# Assemble RSP assembly code
$(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
@ -863,7 +851,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
$(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES)
@$(PRINT) "$(GREEN)Linking libultra: $(BLUE)$@ $(NO_COL)\n"
$(V)$(AR) rcs -o $@ $(ULTRA_O_FILES)
$(V)$(TOOLS_DIR)/patch_libultra_math $@
$(V)$(TOOLS_DIR)/patch_elf_32bit $@
# Link libgoddard
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)

View file

@ -161,8 +161,8 @@ endef
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
@$(PRINT) "$(GREEN)Preprocessing level make rules: $(BLUE)$@ $(NO_COL)\n"
@$(CPP) $(VERSION_CFLAGS) -I . -o $@ $<
$(call print,Preprocessing level make rules:,$<,$@)
$(V)$(CPP) $(CPPFLAGS) $(VERSION_CFLAGS) -I . -o $@ $<
include $(BUILD_DIR)/level_rules.mk
endif
endif
@ -179,11 +179,11 @@ $(eval $(call level_rules,menu,generic)) # Menu (File Select)
# Ending cake textures are generated in a special way
$(BUILD_DIR)/levels/ending/cake_eu.inc.c: levels/ending/cake_eu.png
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n"
@$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending $(TEXTURE_OPTIONS)
$(call print,Splitting:,$<,$@)
$(V)$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending $(TEXTURE_OPTIONS)
$(BUILD_DIR)/levels/ending/cake.inc.c: levels/ending/cake.png
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n"
@$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending $(TEXTURE_OPTIONS)
$(call print,Splitting:,$<,$@)
$(V)$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending $(TEXTURE_OPTIONS)
# --------------------------------------
# Texture Bin Rules
@ -250,8 +250,8 @@ $(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
# --------------------------------------
$(BUILD_DIR)/bin/%_skybox.c: textures/skyboxes/%.png
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n"
@$(SKYCONV) --type sky --split $^ $(BUILD_DIR)/bin $(TEXTURE_OPTIONS)
$(call print,Splitting:,$<,$@)
$(V)$(SKYCONV) --type sky --split $^ $(BUILD_DIR)/bin $(TEXTURE_OPTIONS)
$(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000

View file

@ -1,5 +1,4 @@
// 0x08003E30
static const s16 amp_seg8_animvalue_08003E30[] = {
static const s16 dAmpAnimValue[] = {
0x0000, 0x0000, 0x0D79, 0x1AF2, 0x286B, 0x35E4, 0x435D, 0x50D6,
0x5E50, 0x6BC9, 0x7942, 0x86BE, 0x9437, 0xA1B0, 0xAF2A, 0xBCA3,
0xCA1C, 0xD795, 0xE50E, 0xF287, 0x1872, 0x0000, 0x1AF2, 0x35E4,
@ -23,8 +22,7 @@ static const s16 amp_seg8_animvalue_08003E30[] = {
0xC001, 0x3FFF,
};
// 0x08003F74
static const u16 amp_seg8_animindex_08003F74[] = {
static const u16 dAmpAnimIndex[] = {
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000,
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x00A1,
0x0001, 0x0000, 0x0013, 0x008D, 0x0001, 0x00A0,
@ -40,15 +38,14 @@ static const u16 amp_seg8_animindex_08003F74[] = {
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x004E,
};
// 0x0800401C
static const struct Animation amp_seg8_anim_0800401C = {
static const struct Animation dAmpAnimation = {
0,
0,
0,
0,
0x13,
ANIMINDEX_NUMPARTS(amp_seg8_animindex_08003F74),
amp_seg8_animvalue_08003E30,
amp_seg8_animindex_08003F74,
ANIMINDEX_NUMPARTS(dAmpAnimIndex),
dAmpAnimValue,
dAmpAnimIndex,
0,
};

View file

@ -1 +1 @@
#include "anim_0800401C.inc.c"
#include "animation.inc.c"

View file

@ -1,4 +1,3 @@
// 0x08004034
const struct Animation *const amp_seg8_anims_08004034[] = {
&amp_seg8_anim_0800401C,
const struct Animation *const dAmpAnimsList[] = {
&dAmpAnimation,
};

View file

@ -1,19 +1,18 @@
// 0x0F000028
const GeoLayout amp_geo[] = {
const GeoLayout dAmpGeo[] = {
GEO_SHADOW(SHADOW_CIRCLE_4_VERTS, 0xC8, 100),
GEO_OPEN_NODE(),
GEO_SCALE(0x00, 16384),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002C88),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpEyeDl),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
@ -21,7 +20,7 @@ const GeoLayout amp_geo[] = {
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
@ -29,7 +28,7 @@ const GeoLayout amp_geo[] = {
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
@ -37,16 +36,16 @@ const GeoLayout amp_geo[] = {
GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002D70),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpMouthDl),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_OPEN_NODE(),
GEO_BILLBOARD(),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_ALPHA, amp_seg8_dl_08002E58),
GEO_DISPLAY_LIST(LAYER_ALPHA, dAmpBodyDl),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),

View file

@ -1,27 +1,22 @@
// Amp
// 0x08000F18
ALIGNED8 static const Texture amp_seg8_texture_08000F18[] = {
ALIGNED8 static const Texture dAmpElectricityTexture[] = {
#include "actors/amp/amp_electricity.rgba16.inc.c"
};
// 0x08001318
ALIGNED8 static const Texture amp_seg8_texture_08001318[] = {
ALIGNED8 static const Texture dAmpEyesTexture[] = {
#include "actors/amp/amp_eyes.rgba16.inc.c"
};
// 0x08001B18
ALIGNED8 static const Texture amp_seg8_texture_08001B18[] = {
ALIGNED8 static const Texture dAmpBodyTexture[] = {
#include "actors/amp/amp_body.rgba16.inc.c"
};
// 0x08002318
ALIGNED8 static const Texture amp_seg8_texture_08002318[] = {
ALIGNED8 static const Texture dAmpMouthTexture[] = {
#include "actors/amp/amp_mouth.rgba16.inc.c"
};
// 0x08002B18
static const Vtx amp_seg8_vertex_08002B18[] = {
static const Vtx dAmpElectricityVertices[] = {
{{{ 224, 0, -89}, 0, { 0, 480}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 187, 149, 0}, 0, { 223, 1078}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 224, 0, 90}, 0, { 479, 478}, {0xff, 0xff, 0xff, 0xff}}},
@ -29,18 +24,16 @@ static const Vtx amp_seg8_vertex_08002B18[] = {
{{{ 224, 0, -89}, 0, { 0, 478}, {0xff, 0xff, 0xff, 0xff}}},
};
// 0x08002B68 - 0x08002BA0
const Gfx amp_seg8_dl_08002B68[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08000F18),
const Gfx dAmpElectricitySubDl[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpElectricityTexture),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002B18, 5, 0),
gsSPVertex(dAmpElectricityVertices, 5, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0),
gsSPEndDisplayList(),
};
// 0x08002BA0 - 0x08002C10
const Gfx amp_seg8_dl_08002BA0[] = {
const Gfx dAmpElectricityDl[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK),
@ -49,7 +42,7 @@ const Gfx amp_seg8_dl_08002BA0[] = {
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 4, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(amp_seg8_dl_08002B68),
gsSPDisplayList(dAmpElectricitySubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -57,26 +50,23 @@ const Gfx amp_seg8_dl_08002BA0[] = {
gsSPEndDisplayList(),
};
// 0x08002C10
static const Vtx amp_seg8_vertex_08002C10[] = {
static const Vtx dAmpEyeVertices[] = {
{{{ 68, 72, 158}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -27, -71, 164}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 68, -71, 158}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -27, 72, 164}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
};
// 0x08002C50 - 0x08002C88
const Gfx amp_seg8_dl_08002C50[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08001318),
const Gfx dAmpEyeSubDl[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpEyesTexture),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002C10, 4, 0),
gsSPVertex(dAmpEyeVertices, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(),
};
// 0x08002C88 - 0x08002CF8
const Gfx amp_seg8_dl_08002C88[] = {
const Gfx dAmpEyeDl[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
@ -85,7 +75,7 @@ const Gfx amp_seg8_dl_08002C88[] = {
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(amp_seg8_dl_08002C50),
gsSPDisplayList(dAmpEyeSubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -93,26 +83,23 @@ const Gfx amp_seg8_dl_08002C88[] = {
gsSPEndDisplayList(),
};
// 0x08002CF8
static const Vtx amp_seg8_vertex_08002CF8[] = {
static const Vtx dAmpMouthVertices[] = {
{{{ -29, 72, 164}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -124, -71, 121}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -29, -71, 164}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -124, 72, 121}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
};
// 0x08002D38 - 0x08002D70
const Gfx amp_seg8_dl_08002D38[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08002318),
const Gfx dAmpMouthSubDl[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpMouthTexture),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002CF8, 4, 0),
gsSPVertex(dAmpMouthVertices, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(),
};
// 0x08002D70 - 0x08002DE0
const Gfx amp_seg8_dl_08002D70[] = {
const Gfx dAmpMouthDl[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
@ -121,7 +108,7 @@ const Gfx amp_seg8_dl_08002D70[] = {
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(amp_seg8_dl_08002D38),
gsSPDisplayList(dAmpMouthSubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -129,26 +116,23 @@ const Gfx amp_seg8_dl_08002D70[] = {
gsSPEndDisplayList(),
};
// 0x08002DE0
static const Vtx amp_seg8_vertex_08002DE0[] = {
static const Vtx dAmpBodyVertices[] = {
{{{ -39, -39, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 40, 40, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -39, 40, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 40, -39, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
};
// 0x08002E20 - 0x08002E58
const Gfx amp_seg8_dl_08002E20[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08001B18),
const Gfx dAmpBodySubDl[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpBodyTexture),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002DE0, 4, 0),
gsSPVertex(dAmpBodyVertices, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(),
};
// 0x08002E58 - 0x08002EC8
const Gfx amp_seg8_dl_08002E58[] = {
const Gfx dAmpBodyDl[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
@ -157,7 +141,7 @@ const Gfx amp_seg8_dl_08002E58[] = {
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(amp_seg8_dl_08002E20),
gsSPDisplayList(dAmpBodySubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -165,15 +149,18 @@ const Gfx amp_seg8_dl_08002E58[] = {
gsSPEndDisplayList(),
};
// 0x08002EC8
static const Lights1 amp_seg8_lights_08002EC8 = gdSPDefLights1(
/**
* Everything beyond this point is unused, and seems to be an attempt at a 3D modelled
* amp. The model and attempt are overall slightly buggy, with misread lights and a slightly
* broken model.
*/
UNUSED static const Lights1 dAmpUnused3DLights = gdSPDefLights1(
0x33, 0x3f, 0x00,
0xcf, 0xff, 0x00, 0x28, 0x28, 0x28
);
// //! Another malformed entry: Vertex interpreted as light
// 0x08002EE0
static const Vtx amp_seg8_vertex_08002EE0[] = {
UNUSED static const Vtx dAmpUnused3DVtx01[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
@ -182,8 +169,7 @@ static const Vtx amp_seg8_vertex_08002EE0[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
};
// 0x08002F40
static const Vtx amp_seg8_vertex_08002F40[] = {
UNUSED static const Vtx dAmpUnused3DVtx02[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
@ -192,8 +178,7 @@ static const Vtx amp_seg8_vertex_08002F40[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
};
// 0x08002FA0
static const Vtx amp_seg8_vertex_08002FA0[] = {
UNUSED static const Vtx dAmpUnused3DVtx03[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
@ -202,8 +187,7 @@ static const Vtx amp_seg8_vertex_08002FA0[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
};
// 0x08003000
static const Vtx amp_seg8_vertex_08003000[] = {
UNUSED static const Vtx dAmpUnused3DVtx04[] = {
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
{{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
@ -212,8 +196,7 @@ static const Vtx amp_seg8_vertex_08003000[] = {
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}},
};
// 0x08003060
static const Vtx amp_seg8_vertex_08003060[] = {
UNUSED static const Vtx dAmpUnused3DVtx05[] = {
{{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}},
{{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -232,8 +215,7 @@ static const Vtx amp_seg8_vertex_08003060[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003160
static const Vtx amp_seg8_vertex_08003160[] = {
UNUSED static const Vtx dAmpUnused3DVtx06[] = {
{{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0xff}}},
{{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -252,8 +234,7 @@ static const Vtx amp_seg8_vertex_08003160[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003260
static const Vtx amp_seg8_vertex_08003260[] = {
UNUSED static const Vtx dAmpUnused3DVtx07[] = {
{{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0xff}}},
{{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -272,8 +253,7 @@ static const Vtx amp_seg8_vertex_08003260[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003360
static const Vtx amp_seg8_vertex_08003360[] = {
UNUSED static const Vtx dAmpUnused3DVtx08[] = {
{{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0xff}}},
{{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -292,8 +272,7 @@ static const Vtx amp_seg8_vertex_08003360[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003460
static const Vtx amp_seg8_vertex_08003460[] = {
UNUSED static const Vtx dAmpUnused3DVtx09[] = {
{{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0xff}}},
{{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -312,8 +291,7 @@ static const Vtx amp_seg8_vertex_08003460[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003560
static const Vtx amp_seg8_vertex_08003560[] = {
UNUSED static const Vtx dAmpUnused3DVtx10[] = {
{{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0xff}}},
{{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -332,8 +310,7 @@ static const Vtx amp_seg8_vertex_08003560[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003660
static const Vtx amp_seg8_vertex_08003660[] = {
UNUSED static const Vtx dAmpUnused3DVtx11[] = {
{{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0xff}}},
{{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -352,8 +329,7 @@ static const Vtx amp_seg8_vertex_08003660[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003760
static const Vtx amp_seg8_vertex_08003760[] = {
UNUSED static const Vtx dAmpUnused3DVtx12[] = {
{{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0xff}}},
{{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -372,70 +348,63 @@ static const Vtx amp_seg8_vertex_08003760[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
};
// 0x08003860
static const Vtx amp_seg8_vertex_08003860[] = {
UNUSED static const Vtx dAmpUnused3DVtx13[] = {
{{{ -37, 90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
{{{ -129, 90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
{{{ -129, -90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
{{{ -37, -90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0xff}}},
};
// 0x080038A0
static const Vtx amp_seg8_vertex_080038A0[] = {
UNUSED static const Vtx dAmpUnused3DVtx14[] = {
{{{ 112, -7, 182}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
{{{ 66, -139, 162}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
{{{ 175, -77, 98}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
};
// 0x080038D0
static const Vtx amp_seg8_vertex_080038D0[] = {
UNUSED static const Vtx dAmpUnused3DVtx15[] = {
{{{ 63, 90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
{{{ -35, 90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
{{{ -35, -90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
{{{ 63, -90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0xff}}},
};
// 0x08003910 - 0x08003940
const Gfx amp_seg8_dl_08003910[] = {
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08002EE0, 6, 0),
UNUSED const Gfx dAmpUnused3DElectricDl1[] = {
gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPVertex(dAmpUnused3DVtx01, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
};
// 0x08003940 - 0x08003970
const Gfx amp_seg8_dl_08003940[] = {
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08002F40, 6, 0),
UNUSED const Gfx dAmpUnused3DElectricDl2[] = {
gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPVertex(dAmpUnused3DVtx02, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
};
// 0x08003970 - 0x080039A0
const Gfx amp_seg8_dl_08003970[] = {
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08002FA0, 6, 0),
UNUSED const Gfx dAmpUnused3DElectricDl3[] = {
gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPVertex(dAmpUnused3DVtx03, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
};
// 0x080039A0 - 0x080039D0
const Gfx amp_seg8_dl_080039A0[] = {
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08003000, 6, 0),
UNUSED const Gfx dAmpUnused3DElectricDl4[] = {
gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPVertex(dAmpUnused3DVtx04, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
};
// 0x080039D0 - 0x08003DA8
const Gfx amp_seg8_dl_080039D0[] = {
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
gsSPVertex(amp_seg8_vertex_08003060, 16, 0),
UNUSED const Gfx dAmpUnused3DModelDl[] = {
//! Vertex interpreted as light
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(dAmpUnused3DVtx05, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -443,7 +412,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003160, 16, 0),
gsSPVertex(dAmpUnused3DVtx06, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -451,7 +420,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003260, 16, 0),
gsSPVertex(dAmpUnused3DVtx07, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -459,7 +428,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003360, 16, 0),
gsSPVertex(dAmpUnused3DVtx08, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -467,7 +436,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003460, 16, 0),
gsSPVertex(dAmpUnused3DVtx09, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -475,7 +444,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003560, 16, 0),
gsSPVertex(dAmpUnused3DVtx10, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -483,7 +452,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003660, 16, 0),
gsSPVertex(dAmpUnused3DVtx11, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -491,7 +460,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003760, 16, 0),
gsSPVertex(dAmpUnused3DVtx12, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -502,29 +471,29 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSPEndDisplayList(),
};
// 0x08003DA8 - 0x08003DD8
const Gfx amp_seg8_dl_08003DA8[] = {
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
gsSPVertex(amp_seg8_vertex_08003860, 4, 0),
UNUSED const Gfx dAmpUnused3DElectricDl5[] = {
//! Vertex interpreted as light
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(dAmpUnused3DVtx13, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(),
};
// 0x08003DD8 - 0x08003E00
const Gfx amp_seg8_dl_08003DD8[] = {
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
gsSPVertex(amp_seg8_vertex_080038A0, 3, 0),
UNUSED const Gfx dAmpUnused3DElectricDl6[] = {
//! Vertex interpreted as light
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(dAmpUnused3DVtx14, 3, 0),
gsSP1Triangle( 0, 1, 2, 0x0),
gsSPEndDisplayList(),
};
// 0x08003E00 - 0x08003E30
const Gfx amp_seg8_dl_08003E00[] = {
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
gsSPVertex(amp_seg8_vertex_080038D0, 4, 0),
UNUSED const Gfx dAmpUnused3DElectricDl7[] = {
//! Vertex interpreted as light
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(dAmpUnused3DVtx15, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(),
};

View file

@ -0,0 +1,98 @@
// 0x060576FC
const s16 dBowserFlamesOrientationValues[] = {
// posX, posY, posZ, rotY, rotX
0, 280, 80, 0x00E9, 0x1A96,
0, 278, 83, 0x00EC, 0x1C7F,
0, 273, 92, 0x00F9, 0x20BF,
0, 268, 102, 0x010F, 0x2519,
0, 263, 109, 0x011D, 0x2751,
0, 263, 110, 0x011C, 0x2714,
0, 265, 106, 0x0112, 0x2601,
0, 268, 102, 0x0109, 0x24C0,
0, 271, 96, 0x00FF, 0x2358,
0, 274, 90, 0x00F7, 0x21CB,
0, 277, 84, 0x00EE, 0x201C,
0, 280, 78, 0x00E7, 0x1E4E,
0, 284, 71, 0x00DF, 0x1C64,
0, 288, 63, 0x00D9, 0x1A61,
0, 291, 56, 0x00D3, 0x184B,
0, 295, 48, 0x00CF, 0x1622,
0, 298, 40, 0x00CA, 0x13E9,
0, 301, 32, 0x00C7, 0x11A5,
0, 304, 23, 0x00C4, 0x0F59,
0, 308, 15, 0x00C1, 0x0D08,
0, 311, 7, 0x00C0, 0x0AB5,
0, 313, 0, 0x00C0, 0x0863,
0, 315, -8, 0x00BF, 0x0615,
0, 317, -15, 0x00CE, 0x03A3,
0, 319, -22, 0x00F8, 0x00ED,
0, 320, -29, 0x0131, 0xFFFF,
0, 322, -36, 0x0172, 0xFFFF,
0, 322, -40, 0x01B5, 0xFFFF,
0, 323, -45, 0x01ED, 0xFFFF,
0, 323, -48, 0x0213, 0xFFFF,
0, 323, -51, 0x0219, 0xFFFF,
0, 323, -52, 0x01F2, 0xFFFF,
0, 323, -51, 0x018F, 0xFFFF,
0, 323, -49, 0x00E5, 0xFFFF,
0, 322, -45, 0xFFFF, 0xFFFF,
0, 320, -35, 0xFFFF, 0xFFFF,
0, 317, -23, 0xFFFF, 0xFFFF,
0, 312, -7, 0xFFFF, 0xFFFF,
0, 306, 11, 0xFFFF, 0xFFFF,
0, 299, 31, 0xFFFF, 0xFFFF,
0, 288, 51, 0xFFFF, 0xFFFF,
0, 278, 70, 0xFFFF, 0xFFFF,
0, 267, 89, 0xFFFF, 0xFFFF,
0, 256, 106, 0xFFFF, 0x023A,
0, 244, 120, 0xFFFF, 0x04AA,
0, 236, 132, 0xFFFF, 0x069F,
0, 229, 139, 0xFFFF, 0x0803,
0, 224, 144, 0xFFFF, 0x08C0,
0, 222, 147, 0xFFFF, 0x0928,
0, 221, 148, 0xFFFF, 0x099D,
0, 221, 149, 0xFFFF, 0x0A16,
0, 221, 150, 0xFFFF, 0x0A8D,
0, 221, 150, 0xFFFF, 0x0AF6,
0, 222, 150, 0xFFFF, 0x0B4A,
0, 222, 150, 0xFFFF, 0x0B84,
0, 222, 149, 0x020A, 0x0BA0,
0, 223, 149, 0x0524, 0x0B9E,
0, 225, 148, 0x07EC, 0x0B84,
0, 226, 147, 0x0A3F, 0x0B57,
0, 227, 145, 0x0BFB, 0x0B1F,
0, 228, 144, 0x0D00, 0x0AE5,
0, 230, 142, 0x0D6F, 0x0AA0,
0, 232, 140, 0x0D8B, 0x0A48,
0, 233, 138, 0x0D5D, 0x09DE,
0, 236, 136, 0x0CED, 0x096A,
0, 238, 134, 0x0C49, 0x08EA,
0, 239, 132, 0x0B76, 0x0863,
0, 241, 130, 0x0A80, 0x07D9,
0, 244, 128, 0x0970, 0x074E,
0, 246, 125, 0x084E, 0x06C7,
0, 248, 122, 0x0723, 0x0649,
0, 251, 120, 0x05F8, 0x05D7,
0, 253, 117, 0x04D6, 0x0579,
0, 254, 114, 0x03C3, 0x0532,
0, 256, 111, 0x02C9, 0x0509,
0, 259, 108, 0x01F0, 0x0504,
0, 261, 105, 0x0141, 0x0525,
0, 262, 103, 0x00C3, 0x0572,
0, 264, 100, 0x006E, 0x0619,
0, 267, 97, 0x0032, 0x0734,
0, 268, 95, 0x000C, 0x08AF,
0, 269, 93, 0xFFFF, 0x0A74,
0, 272, 90, 0xFFFF, 0x0C70,
0, 273, 88, 0xFFFF, 0x0E8E,
0, 274, 86, 0x0014, 0x10B6,
0, 275, 84, 0x0032, 0x12DA,
0, 277, 82, 0x0056, 0x14E1,
0, 277, 82, 0x007E, 0x16B9,
0, 278, 80, 0x00A4, 0x184B,
0, 278, 80, 0x00C6, 0x1983,
0, 279, 80, 0x00DF, 0x1A4D,
0, 280, 80, 0x00E9, 0x1A96,
0, 0, 0, 0x0000, 0x0000,
};

View file

@ -1,96 +0,0 @@
// 0x060576FC
const s16 bowser_seg6_unkmoveshorts_060576FC[] = {
0x0000, 0x0118, 0x0050, 0x00E9, 0x1A96,
0x0000, 0x0116, 0x0053, 0x00EC, 0x1C7F,
0x0000, 0x0111, 0x005C, 0x00F9, 0x20BF,
0x0000, 0x010C, 0x0066, 0x010F, 0x2519,
0x0000, 0x0107, 0x006D, 0x011D, 0x2751,
0x0000, 0x0107, 0x006E, 0x011C, 0x2714,
0x0000, 0x0109, 0x006A, 0x0112, 0x2601,
0x0000, 0x010C, 0x0066, 0x0109, 0x24C0,
0x0000, 0x010F, 0x0060, 0x00FF, 0x2358,
0x0000, 0x0112, 0x005A, 0x00F7, 0x21CB,
0x0000, 0x0115, 0x0054, 0x00EE, 0x201C,
0x0000, 0x0118, 0x004E, 0x00E7, 0x1E4E,
0x0000, 0x011C, 0x0047, 0x00DF, 0x1C64,
0x0000, 0x0120, 0x003F, 0x00D9, 0x1A61,
0x0000, 0x0123, 0x0038, 0x00D3, 0x184B,
0x0000, 0x0127, 0x0030, 0x00CF, 0x1622,
0x0000, 0x012A, 0x0028, 0x00CA, 0x13E9,
0x0000, 0x012D, 0x0020, 0x00C7, 0x11A5,
0x0000, 0x0130, 0x0017, 0x00C4, 0x0F59,
0x0000, 0x0134, 0x000F, 0x00C1, 0x0D08,
0x0000, 0x0137, 0x0007, 0x00C0, 0x0AB5,
0x0000, 0x0139, 0x0000, 0x00C0, 0x0863,
0x0000, 0x013B, 0xFFF8, 0x00BF, 0x0615,
0x0000, 0x013D, 0xFFF1, 0x00CE, 0x03A3,
0x0000, 0x013F, 0xFFEA, 0x00F8, 0x00ED,
0x0000, 0x0140, 0xFFE3, 0x0131, 0xFFFF,
0x0000, 0x0142, 0xFFDC, 0x0172, 0xFFFF,
0x0000, 0x0142, 0xFFD8, 0x01B5, 0xFFFF,
0x0000, 0x0143, 0xFFD3, 0x01ED, 0xFFFF,
0x0000, 0x0143, 0xFFD0, 0x0213, 0xFFFF,
0x0000, 0x0143, 0xFFCD, 0x0219, 0xFFFF,
0x0000, 0x0143, 0xFFCC, 0x01F2, 0xFFFF,
0x0000, 0x0143, 0xFFCD, 0x018F, 0xFFFF,
0x0000, 0x0143, 0xFFCF, 0x00E5, 0xFFFF,
0x0000, 0x0142, 0xFFD3, 0xFFFF, 0xFFFF,
0x0000, 0x0140, 0xFFDD, 0xFFFF, 0xFFFF,
0x0000, 0x013D, 0xFFE9, 0xFFFF, 0xFFFF,
0x0000, 0x0138, 0xFFF9, 0xFFFF, 0xFFFF,
0x0000, 0x0132, 0x000B, 0xFFFF, 0xFFFF,
0x0000, 0x012B, 0x001F, 0xFFFF, 0xFFFF,
0x0000, 0x0120, 0x0033, 0xFFFF, 0xFFFF,
0x0000, 0x0116, 0x0046, 0xFFFF, 0xFFFF,
0x0000, 0x010B, 0x0059, 0xFFFF, 0xFFFF,
0x0000, 0x0100, 0x006A, 0xFFFF, 0x023A,
0x0000, 0x00F4, 0x0078, 0xFFFF, 0x04AA,
0x0000, 0x00EC, 0x0084, 0xFFFF, 0x069F,
0x0000, 0x00E5, 0x008B, 0xFFFF, 0x0803,
0x0000, 0x00E0, 0x0090, 0xFFFF, 0x08C0,
0x0000, 0x00DE, 0x0093, 0xFFFF, 0x0928,
0x0000, 0x00DD, 0x0094, 0xFFFF, 0x099D,
0x0000, 0x00DD, 0x0095, 0xFFFF, 0x0A16,
0x0000, 0x00DD, 0x0096, 0xFFFF, 0x0A8D,
0x0000, 0x00DD, 0x0096, 0xFFFF, 0x0AF6,
0x0000, 0x00DE, 0x0096, 0xFFFF, 0x0B4A,
0x0000, 0x00DE, 0x0096, 0xFFFF, 0x0B84,
0x0000, 0x00DE, 0x0095, 0x020A, 0x0BA0,
0x0000, 0x00DF, 0x0095, 0x0524, 0x0B9E,
0x0000, 0x00E1, 0x0094, 0x07EC, 0x0B84,
0x0000, 0x00E2, 0x0093, 0x0A3F, 0x0B57,
0x0000, 0x00E3, 0x0091, 0x0BFB, 0x0B1F,
0x0000, 0x00E4, 0x0090, 0x0D00, 0x0AE5,
0x0000, 0x00E6, 0x008E, 0x0D6F, 0x0AA0,
0x0000, 0x00E8, 0x008C, 0x0D8B, 0x0A48,
0x0000, 0x00E9, 0x008A, 0x0D5D, 0x09DE,
0x0000, 0x00EC, 0x0088, 0x0CED, 0x096A,
0x0000, 0x00EE, 0x0086, 0x0C49, 0x08EA,
0x0000, 0x00EF, 0x0084, 0x0B76, 0x0863,
0x0000, 0x00F1, 0x0082, 0x0A80, 0x07D9,
0x0000, 0x00F4, 0x0080, 0x0970, 0x074E,
0x0000, 0x00F6, 0x007D, 0x084E, 0x06C7,
0x0000, 0x00F8, 0x007A, 0x0723, 0x0649,
0x0000, 0x00FB, 0x0078, 0x05F8, 0x05D7,
0x0000, 0x00FD, 0x0075, 0x04D6, 0x0579,
0x0000, 0x00FE, 0x0072, 0x03C3, 0x0532,
0x0000, 0x0100, 0x006F, 0x02C9, 0x0509,
0x0000, 0x0103, 0x006C, 0x01F0, 0x0504,
0x0000, 0x0105, 0x0069, 0x0141, 0x0525,
0x0000, 0x0106, 0x0067, 0x00C3, 0x0572,
0x0000, 0x0108, 0x0064, 0x006E, 0x0619,
0x0000, 0x010B, 0x0061, 0x0032, 0x0734,
0x0000, 0x010C, 0x005F, 0x000C, 0x08AF,
0x0000, 0x010D, 0x005D, 0xFFFF, 0x0A74,
0x0000, 0x0110, 0x005A, 0xFFFF, 0x0C70,
0x0000, 0x0111, 0x0058, 0xFFFF, 0x0E8E,
0x0000, 0x0112, 0x0056, 0x0014, 0x10B6,
0x0000, 0x0113, 0x0054, 0x0032, 0x12DA,
0x0000, 0x0115, 0x0052, 0x0056, 0x14E1,
0x0000, 0x0115, 0x0052, 0x007E, 0x16B9,
0x0000, 0x0116, 0x0050, 0x00A4, 0x184B,
0x0000, 0x0116, 0x0050, 0x00C6, 0x1983,
0x0000, 0x0117, 0x0050, 0x00DF, 0x1A4D,
0x0000, 0x0118, 0x0050, 0x00E9, 0x1A96,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
};

View file

@ -110,10 +110,10 @@ const GeoLayout bowser_geo_0000D8[] = {
const GeoLayout bowser_geo_000424[] = {
GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400),
GEO_OPEN_NODE(),
#ifdef VERSION_JP
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#else
#if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#endif
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL),
@ -200,10 +200,10 @@ const GeoLayout bowser_geo_000424[] = {
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8),
GEO_CLOSE_NODE(),
#ifdef VERSION_JP
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#else
#if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#endif
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
@ -226,10 +226,10 @@ const GeoLayout bowser_geo_000424[] = {
const GeoLayout bowser_geo_000770[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
#ifdef VERSION_JP
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#else
#if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#endif
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL),
@ -316,10 +316,10 @@ const GeoLayout bowser_geo_000770[] = {
GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8),
GEO_CLOSE_NODE(),
#ifdef VERSION_JP
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#else
#if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#endif
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
@ -341,7 +341,7 @@ const GeoLayout bowser_geo_000770[] = {
#ifndef VERSION_JP
// 0x0D000AB8
const GeoLayout bowser_shadow_geo[] = {
GEO_SHADOW(0x00, 0x9B, 400),
GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400),
GEO_RETURN(),
};
#endif
@ -351,11 +351,10 @@ const GeoLayout bowser_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_ASM(0, geo_update_layer_transparency),
#ifdef VERSION_JP
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif
#ifndef VERSION_JP
GEO_SWITCH_CASE(3, geo_switch_anim_state),
#else
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif
GEO_OPEN_NODE(),
GEO_NODE_START(),
@ -384,19 +383,16 @@ const GeoLayout bowser_geo[] = {
};
// 0x0D000B18 / 0B40
const GeoLayout bowser2_geo[] = {
const GeoLayout bowser_geo_no_shadow[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_ASM(0, geo_update_layer_transparency),
#ifdef VERSION_JP
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif
#ifndef VERSION_JP
GEO_SWITCH_CASE(3, geo_switch_anim_state),
#else
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif
GEO_OPEN_NODE(),
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_ASM(0, geo_bits_bowser_coloring),

View file

@ -1184,7 +1184,7 @@ const Gfx bowser_seg6_dl_0603B8D0[] = {
gsSPEndDisplayList(),
};
#ifndef VERSION_JP
#if BUGFIX_BOWSER_FADING_OUT
// 0x0603B948 - 0x0603B9C8
const Gfx bowser_seg6_dl_0603B948[] = {
gsDPPipeSync(),
@ -2870,7 +2870,7 @@ const Gfx bowser_seg6_dl_06040210[] = {
gsSPEndDisplayList(),
};
#ifndef VERSION_JP
#if BUGFIX_BOWSER_FADING_OUT
// 0x06040358 - 0x06040428
const Gfx bowser_seg6_dl_06040358[] = {
gsDPPipeSync(),

View file

@ -4,24 +4,12 @@
#include "types.h"
// amp
extern const GeoLayout amp_geo[];
extern const Gfx amp_seg8_dl_08002B68[];
extern const Gfx amp_seg8_dl_08002BA0[];
extern const Gfx amp_seg8_dl_08002C50[];
extern const Gfx amp_seg8_dl_08002C88[];
extern const Gfx amp_seg8_dl_08002D38[];
extern const Gfx amp_seg8_dl_08002D70[];
extern const Gfx amp_seg8_dl_08002E20[];
extern const Gfx amp_seg8_dl_08002E58[];
extern const Gfx amp_seg8_dl_08003910[];
extern const Gfx amp_seg8_dl_08003940[];
extern const Gfx amp_seg8_dl_08003970[];
extern const Gfx amp_seg8_dl_080039A0[];
extern const Gfx amp_seg8_dl_080039D0[];
extern const Gfx amp_seg8_dl_08003DA8[];
extern const Gfx amp_seg8_dl_08003DD8[];
extern const Gfx amp_seg8_dl_08003E00[];
extern const struct Animation *const amp_seg8_anims_08004034[];
extern const GeoLayout dAmpGeo[];
extern const Gfx dAmpElectricityDl[];
extern const Gfx dAmpEyeDl[];
extern const Gfx dAmpMouthDl[];
extern const Gfx dAmpBodyDl[];
extern const struct Animation *const dAmpAnimsList[];
// blue_coin_switch
extern const GeoLayout blue_coin_switch_geo[];

View file

@ -236,7 +236,7 @@ extern const Gfx mario_right_hand_cap_bottom_dl[];
extern const Gfx mario_right_hand_cap_dl[];
extern const Gfx mario_right_hand_cap_wings_half_1_dl[];
extern const Gfx mario_right_hand_cap_wings_half_2_dl[];
extern const Gfx mario_right_hand_cap_wings_intial_dl[];
extern const Gfx mario_right_hand_cap_wings_initial_dl[];
extern const Gfx mario_right_hand_cap_wings_end_dl[];
extern const Gfx mario_right_hand_cap[];
extern const Gfx mario_right_hand_cap_wings[];
@ -250,7 +250,7 @@ extern const Gfx mario_cap_unused_base_bottom_dl[];
extern const Gfx mario_cap_unused_base_dl[];
extern const Gfx mario_wings_half_1_unused_dl[];
extern const Gfx mario_wings_half_2_unused_dl[];
extern const Gfx mario_cap_wings_unused_intial_dl[];
extern const Gfx mario_cap_wings_unused_initial_dl[];
extern const Gfx mario_cap_wings_unused_end_dl[];
extern const Gfx mario_cap_unused_dl[];
extern const Gfx mario_metal_cap_unused_dl[];

View file

@ -18,7 +18,7 @@ UNUSED static const u64 binid_2 = 2;
#include "bowser/model.inc.c"
#include "bowser/anims/data.inc.c"
#include "bowser/anims/table.inc.c"
#include "bowser/flames_pos.inc.c"
#include "bowser/flames_data.inc.c"
UNUSED static const u64 binid_3 = 3;
#include "bomb/model.inc.c"

View file

@ -17,7 +17,7 @@ extern const GeoLayout bowser_geo_000424[];
extern const GeoLayout bowser_geo_000770[];
extern const GeoLayout bowser_shadow_geo[];
extern const GeoLayout bowser_geo[];
extern const GeoLayout bowser2_geo[];
extern const GeoLayout bowser_geo_no_shadow[];
extern const Gfx bowser_seg6_dl_06039110[];
extern const Gfx bowser_seg6_dl_060391C8[];
extern const Gfx bowser_seg6_dl_06039260[];
@ -90,7 +90,7 @@ extern const Gfx bowser_seg6_dl_06043548[];
extern const Gfx bowser_seg6_dl_06043648[];
extern const Gfx bowser_seg6_dl_06043698[];
extern const struct Animation *const bowser_seg6_anims_06057690[];
extern const s16 bowser_seg6_unkmoveshorts_060576FC[];
extern const s16 dBowserFlamesOrientationValues[];
// bowser_flame
extern const GeoLayout bowser_flames_geo[];

View file

@ -55,6 +55,11 @@ ALIGNED8 static const Texture king_bobomb_seg5_texture_05004878[] = {
#include "actors/king_bobomb/king_bob-omb_eyes.rgba16.inc.c"
};
// 0x05005078 - Unused
ALIGNED8 static const Texture king_bobomb_seg5_texture_05005078[] = {
#include "actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.inc.c"
};
// 0x05005878
ALIGNED8 static const Texture king_bobomb_seg5_texture_05005878[] = {
#include "actors/king_bobomb/king_bob-omb_hand.rgba16.inc.c"

View file

@ -6060,7 +6060,7 @@ const Gfx mario_right_hand_cap_wings_half_2_dl[] = {
};
// 0x0401B0E0 - 0x0401B138
const Gfx mario_right_hand_cap_wings_intial_dl[] = {
const Gfx mario_right_hand_cap_wings_initial_dl[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA),
gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
@ -6104,7 +6104,7 @@ const Gfx mario_right_hand_cap[] = {
// 0x0401B1D8 - 0x0401B230
const Gfx mario_right_hand_cap_wings[] = {
gsSPDisplayList(mario_right_hand_cap_wings_intial_dl),
gsSPDisplayList(mario_right_hand_cap_wings_initial_dl),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_wings_half_1),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
@ -6132,7 +6132,7 @@ const Gfx mario_metal_right_hand_cap_shared_dl[] = {
// 0x0401B278 - 0x0401B2D0
const Gfx mario_metal_right_hand_cap_shared_dl_wings[] = {
gsSPDisplayList(mario_right_hand_cap_wings_intial_dl),
gsSPDisplayList(mario_right_hand_cap_wings_initial_dl),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_metal_wings_half_1),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
@ -6590,7 +6590,7 @@ const Gfx mario_wings_half_2_unused_dl[] = {
};
// 0x0401C6D8 - 0x0401C730
const Gfx mario_cap_wings_unused_intial_dl[] = {
const Gfx mario_cap_wings_unused_initial_dl[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
@ -6656,7 +6656,7 @@ const Gfx mario_metal_cap_unused_dl[] = {
// 0x0401C890 - 0x0401C8E8 # Unreferenced, unused like the duplicated cap, same case
const Gfx mario_cap_wings_unused[] = {
gsSPDisplayList(mario_cap_wings_unused_intial_dl),
gsSPDisplayList(mario_cap_wings_unused_initial_dl),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_wings_half_1),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
@ -6671,7 +6671,7 @@ const Gfx mario_cap_wings_unused[] = {
// 0x0401C8E8 - 0x0401C940 # Unreferenced, unused like the duplicated cap, same case
const Gfx mario_metal_cap_wings_unused[] = {
gsSPDisplayList(mario_cap_wings_unused_intial_dl),
gsSPDisplayList(mario_cap_wings_unused_initial_dl),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_metal_wings_half_1),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),

View file

@ -1,21 +1,21 @@
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
// assembler directives
.set noat // allow manual use of $at
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
# 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
# 0xA4000000-0xA4000FFF: RSP DMEM
// 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
// 0xA4000000-0xA4000FFF: RSP DMEM
# 0xA4000000-0xA400003F: ROM header
// 0xA4000000-0xA400003F: ROM header
.section .text, "ax"
# 0xA4000040-0xA4000B6F: IPL3
// 0xA4000040-0xA4000B6F: IPL3
# IPL3 entry point jumped to from IPL2
glabel ipl3_entry # 0xA4000040
// IPL3 entry point jumped to from IPL2
glabel ipl3_entry // 0xA4000040
mtc0 $zero, $13
mtc0 $zero, $9
mtc0 $zero, $11
@ -797,7 +797,7 @@ func_A4000AD0:
nop
nop
# 0xA4000B70-0xA4000FFF: IPL3 Font
// 0xA4000B70-0xA4000FFF: IPL3 Font
glabel ipl3_font
.incbin "textures/ipl3_raw/ipl3_font_00.ia1"
.incbin "textures/ipl3_raw/ipl3_font_01.ia1"

View file

@ -1,61 +1,17 @@
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
// assembler directives
.set noat // allow manual use of $at
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"
# This file is handwritten.
// This file is handwritten.
glabel decompress
.if VERSION_SH == 1
lw $a3, 8($a0)
lw $t9, 0xc($a0)
lw $t8, 4($a0)
add $a3, $a3, $a0
add $t9, $t9, $a0
move $a2, $zero
addi $a0, $a0, 0x10
add $t8, $t8, $a1
.L802772C0:
bnel $a2, $zero, .L802772D8
slt $t1, $t0, $zero
lw $t0, ($a0)
li $a2, 32
addi $a0, $a0, 4
slt $t1, $t0, $zero
.L802772D8:
beql $t1, $zero, .L802772F8
lhu $t2, ($a3)
lb $t2, ($t9)
addi $t9, $t9, 1
addi $a1, $a1, 1
b .L80277324
sb $t2, -1($a1)
lhu $t2, ($a3)
.L802772F8:
addi $a3, $a3, 2
srl $t3, $t2, 0xc
andi $t2, $t2, 0xfff
sub $t1, $a1, $t2
addi $t3, $t3, 3
.L8027730C:
lb $t2, -1($t1)
addi $t3, $t3, -1
addi $t1, $t1, 1
addi $a1, $a1, 1
bnez $t3, .L8027730C
sb $t2, -1($a1)
.L80277324:
sll $t0, $t0, 1
bne $a1, $t8, .L802772C0
addi $a2, $a2, -1
jr $ra
nop
.elseif VERSION_EU == 1
#if defined(VERSION_EU) || defined(VERSION_SH)
lw $a3, 8($a0)
lw $t9, 0xc($a0)
lw $t8, 4($a0)
@ -99,7 +55,7 @@ glabel decompress
addi $a2, $a2, -1
jr $ra
nop
.else
#else
lw $t8, 4($a0)
lw $a3, 8($a0)
lw $t9, 0xc($a0)
@ -146,4 +102,4 @@ glabel decompress
nop
jr $ra
nop
.endif
#endif

View file

@ -1,29 +1,29 @@
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
// assembler directives
.set noat // allow manual use of $at
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"
glabel entry_point
lui $t0, %hi(_mainSegmentNoloadStart) # $t0, 0x8034
lui $t1, %lo(_mainSegmentNoloadSizeHi) # lui $t1, 2
addiu $t0, %lo(_mainSegmentNoloadStart) # addiu $t0, $t0, -0x6df0
ori $t1, %lo(_mainSegmentNoloadSizeLo) # ori $t1, $t1, 0xcee0
lui $t0, %hi(_mainSegmentNoloadStart) // $t0, 0x8034
lui $t1, %lo(_mainSegmentNoloadSizeHi) // lui $t1, 2
addiu $t0, %lo(_mainSegmentNoloadStart) // addiu $t0, $t0, -0x6df0
ori $t1, %lo(_mainSegmentNoloadSizeLo) // ori $t1, $t1, 0xcee0
.L80246010:
addi $t1, $t1, -8
sw $zero, ($t0)
sw $zero, 4($t0)
bnez $t1, .L80246010
addi $t0, $t0, 8
lui $t2, %hi(main_func) # $t2, 0x8024
lui $sp, %hi(gIdleThreadStack) # $sp, 0x8020
addiu $t2, %lo(main_func) # addiu $t2, $t2, 0x6dc4
lui $t2, %hi(main_func) // $t2, 0x8024
lui $sp, %hi(gIdleThreadStack) // $sp, 0x8020
addiu $t2, %lo(main_func) // addiu $t2, $t2, 0x6dc4
jr $t2
addiu $sp, %lo(gIdleThreadStack) # addiu $sp, $sp, 0xa00
addiu $sp, %lo(gIdleThreadStack) // addiu $sp, $sp, 0xa00
nop
nop
nop

View file

@ -8,38 +8,39 @@
.word entry_point /* Entrypoint */
/* Revision */
.if VERSION_SH == 1
#ifdef VERSION_SH
.word 0x00001448
.elseif VERSION_EU == 1
#elif defined(VERSION_EU)
.word 0x00001446
.else /* NTSC-U and NTSC-J 1.0 */
#else /* NTSC-U and NTSC-J 1.0 */
.word 0x00001444
.endif
#endif
.word 0x4EAA3D0E /* Checksum 1 */
.word 0x74757C24 /* Checksum 2 */
.word 0x00000000 /* Unknown */
.word 0x00000000 /* Unknown */
.if VERSION_SH == 1
#ifdef VERSION_SH
.ascii "SUPERMARIO64 " /* Internal ROM name */
.else
#else
.ascii "SUPER MARIO 64 " /* Internal ROM name */
.endif
#endif
.word 0x00000000 /* Unknown */
.word 0x0000004E /* Cartridge */
.ascii "SM" /* Cartridge ID */
/* Region */
.if VERSION_US == 1
.ascii "E" /* NTSC-U (North America) */
.elseif (VERSION_JP == 1 || VERSION_SH == 1)
.ascii "J" /* NTSC-J (Japan) */
.else
#ifdef VERSION_EU
.ascii "P" /* PAL (Europe) */
.endif
#elif defined(VERSION_US)
.ascii "E" /* NTSC-U (North America) */
#else
.ascii "J" /* NTSC-J (Japan) */
#endif
.if VERSION_SH == 1
#ifdef VERSION_SH
.byte 0x03 /* Version (Shindou) */
.else
#else
.byte 0x00 /* Version */
.endif
#endif

View file

@ -266,8 +266,9 @@
"actors/king_bobomb/king_bob-omb_arm.rgba16.png": [32,32,2048,{"jp":[1257760,8312],"us":[1264928,8312],"eu":[1136896,8312],"sh":[1113408,8312]}],
"actors/king_bobomb/king_bob-omb_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,10360],"us":[1264928,10360],"eu":[1136896,10360],"sh":[1113408,10360]}],
"actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png": [32,16,1024,{"jp":[1257760,24696],"us":[1264928,24696],"eu":[1136896,24696],"sh":[1113408,24696]}],
"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,64,4096,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}],
"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64],"sh":[1071104,64]}],
"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,32,2048,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}],
"actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.png": [32,32,2048,{"jp":[1257760,20600],"us":[1264928,20600],"eu":[1136896,20600],"sh":[1113408,20600]}],
"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1257760,22648],"us":[1264928,22648],"eu":[1136896,22648],"sh":[1113408,22648]}],
"actors/king_bobomb/king_bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,33912],"us":[1264928,33912],"eu":[1136896,33912],"sh":[1113408,33912]}],
"actors/king_bobomb/king_bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,38008],"us":[1264928,38008],"eu":[1136896,38008],"sh":[1113408,38008]}],
"actors/klepto/klepto_beak.rgba16.png": [32,64,4096,{"jp":[1327760,4104],"us":[1334928,4104],"eu":[1206896,4104],"sh":[1183408,4104]}],

View file

@ -2097,13 +2097,13 @@ const Gfx dl_hud_img_begin[] = {
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetAlphaCompare(G_AC_THRESHOLD),
gsDPSetBlendColor(255, 255, 255, 255),
#if defined(VERSION_EU) || defined(VERSION_SH)
#if defined(VERSION_JP) || defined(VERSION_US)
gsDPSetRenderMode(G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2),
#else
gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
#endif
#ifdef VERSION_EU
gsDPSetTextureFilter(G_TF_POINT),
#elif defined(VERSION_JP) || defined(VERSION_US)
gsDPSetRenderMode(G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2),
#endif
gsSPEndDisplayList(),
};
@ -2498,7 +2498,7 @@ const Texture texture_waterbox_lava[] = {
};
// Unreferenced light group
static const Lights1 segment2_lights_unused = gdSPDefLights1(
UNUSED static const Lights1 segment2_lights_unused = gdSPDefLights1(
0x40, 0x40, 0x40,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

View file

@ -874,7 +874,7 @@ const BehaviorScript bhvMrIBlueCoin[] = {
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
BILLBOARD(),
SET_INT(oIntangibleTimer, 0),
SET_FLOAT(oMrIUnk110, 20),
SET_FLOAT(oCoinUnk110, 20),
SET_INT(oAnimState, -1),
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0),
CALL_NATIVE(bhv_coin_init),
@ -1965,6 +1965,7 @@ const BehaviorScript bhvBowser[] = {
SPAWN_CHILD(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserBodyAnchor),
SPAWN_CHILD(/*Model*/ MODEL_BOWSER_BOMB_CHILD_OBJ, /*Behavior*/ bhvBowserFlameSpawn),
SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserTailAnchor),
// Beta leftover that spawn 50 coins when Bowser is defeated
SET_INT(oNumLootCoins, 50),
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0),
SET_HOME(),
@ -3023,7 +3024,7 @@ const BehaviorScript bhvHiddenStaircaseStep[] = {
END_LOOP(),
};
const BehaviorScript bhvBooBossSpawnedBridge[] = {
const BehaviorScript bhvBooStaircase[] = {
BEGIN(OBJ_LIST_SURFACE),
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
LOAD_COLLISION_DATA(bbh_seg7_collision_staircase_step),
@ -3031,7 +3032,7 @@ const BehaviorScript bhvBooBossSpawnedBridge[] = {
SET_FLOAT(oCollisionDistance, 1000),
SET_HOME(),
BEGIN_LOOP(),
CALL_NATIVE(bhv_boo_boss_spawned_bridge_loop),
CALL_NATIVE(bhv_boo_staircase),
CALL_NATIVE(load_object_collision_model),
END_LOOP(),
};
@ -3141,7 +3142,7 @@ const BehaviorScript bhvUnusedFakeStar[] = {
};
// What is this?
static const BehaviorScript unused_1[] = {
UNUSED static const BehaviorScript unused_1[] = {
BREAK(),
BREAK(),
BREAK(),
@ -3851,7 +3852,7 @@ const BehaviorScript bhvSignOnWall[] = {
const BehaviorScript bhvHomingAmp[] = {
BEGIN(OBJ_LIST_GENACTOR),
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_ANIMATIONS(oAnimations, amp_seg8_anims_08004034),
LOAD_ANIMATIONS(oAnimations, dAmpAnimsList),
ANIMATE(0),
SET_FLOAT(oGraphYOffset, 40),
SET_INT(oIntangibleTimer, 0),
@ -3864,7 +3865,7 @@ const BehaviorScript bhvHomingAmp[] = {
const BehaviorScript bhvCirclingAmp[] = {
BEGIN(OBJ_LIST_GENACTOR),
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_ANIMATIONS(oAnimations, amp_seg8_anims_08004034),
LOAD_ANIMATIONS(oAnimations, dAmpAnimsList),
ANIMATE(0),
SET_FLOAT(oGraphYOffset, 40),
SET_INT(oIntangibleTimer, 0),

View file

@ -1,13 +1,13 @@
diff --git a/asm/crash.s b/asm/crash.s
new file mode 100644
index 00000000..0b2a5574
index 00000000..033bf952
--- /dev/null
+++ b/asm/crash.s
@@ -0,0 +1,153 @@
+# SM64 Crash Handler
+# See Readme below.
+// SM64 Crash Handler
+// See Readme below.
+
+.include "macros.inc"
+#include "macros.inc"
+
+/* ---------------------------------------------------------------
+ * IMPORTANT README:
@ -58,7 +58,7 @@ index 00000000..0b2a5574
+ sw $a3, %lo(nAssertStopProgram)($at)
+ beqz $a3, .end_2
+ nop
+ syscall # trigger crash screen
+ syscall // trigger crash screen
+.end_2:
+ jr $ra
+ nop
@ -75,15 +75,15 @@ index 00000000..0b2a5574
+ jr $ra
+ mfc0 $v0, COP0_BADVADDR
+
+# If the error code field of cop0's cause register is non-zero,
+# draw crash details to the screen and hang
+#
+# If there wasn't an error, continue to the original handler
+// If the error code field of cop0's cause register is non-zero,
+// draw crash details to the screen and hang
+
+// If there wasn't an error, continue to the original handler
+
+glabel __crash_handler_entry
+ mfc0 $k1, COP0_CAUSE
+ andi $k1, $k1, (0x1F << 2)
+ beqzl $k1, .end2 # exit if ExCode is 0
+ beqzl $k1, .end2 // exit if ExCode is 0
+ lui $k0, %hi(__osException)
+ la $k0, exceptionRegContext
+ sd $zero, 0x018 ($k0)
@ -116,7 +116,7 @@ index 00000000..0b2a5574
+ sd $sp, 0x0F0 ($k0)
+ sd $fp, 0x0F8 ($k0)
+ sd $ra, 0x100 ($k0)
+ # cop unusable exception fired twice on startup so we'll ignore it for now
+ // cop unusable exception fired twice on startup so we'll ignore it for now
+ li $t0, (0x0B << 2)
+ beq $k1, $t0, .end
+ nop
@ -155,14 +155,14 @@ index 00000000..0b2a5574
+ lui $k0, %hi(__osException)
+ .end2:
+ addiu $k0, $k0, %lo(__osException)
+ jr $k0 # run the original handler
+ jr $k0 // run the original handler
+ nop
diff --git a/lib/asm/__osExceptionPreamble.s b/lib/asm/__osExceptionPreamble.s
index e14928ce..4d12129e 100644
index c3b97993..c552a485 100644
--- a/lib/asm/__osExceptionPreamble.s
+++ b/lib/asm/__osExceptionPreamble.s
@@ -18,8 +18,8 @@
.endif
@@ -11,8 +11,8 @@
#endif
glabel __osExceptionPreamble
- lui $k0, %hi(__osException)
@ -173,10 +173,10 @@ index e14928ce..4d12129e 100644
nop
diff --git a/sm64.ld b/sm64.ld
index f80f5b4d..569344bc 100755
index 7d9b5b4a..c7bb81b9 100755
--- a/sm64.ld
+++ b/sm64.ld
@@ -116,6 +116,7 @@ SECTIONS
@@ -117,6 +117,7 @@ SECTIONS
BUILD_DIR/src/game/rendering_graph_node.o(.text);
BUILD_DIR/src/game/profiler.o(.text);
BUILD_DIR/asm/decompress.o(.text);

View file

@ -2,10 +2,10 @@ diff --git a/src/game/area.c b/src/game/area.c
index af9d0156..c68a7f6e 100644
--- a/src/game/area.c
+++ b/src/game/area.c
@@ -21,6 +21,7 @@
#include "engine/geo_layout.h"
@@ -22,6 +22,7 @@
#include "save_file.h"
#include "level_table.h"
#include "dialog_ids.h"
+#include "debug_box.h"
struct SpawnInfo gPlayerSpawnInfos[1];

View file

@ -1,10 +1,10 @@
diff --git a/src/game/game_init.c b/src/game/game_init.c
index b6334688..62ed106c 100644
index b961ca52..531231cf 100644
--- a/src/game/game_init.c
+++ b/src/game/game_init.c
@@ -59,6 +59,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence
u16 gDemoInputListID = 0;
struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check
@@ -82,6 +82,47 @@ struct DemoInput gRecordedDemoInput = { 0 };
// Display
// ----------------------------------------------------------------------------------------------------
+// SDK states that 1 cycle takes about 21.33 nanoseconds
+#define SECONDS_PER_CYCLE 0.00000002133f
@ -48,9 +48,9 @@ index b6334688..62ed106c 100644
+}
+
/**
* Initializes the Reality Display Processor (RDP).
* This function initializes settings such as texture filtering mode,
@@ -633,5 +674,7 @@ void thread5_game_loop(UNUSED void *arg) {
* Sets the initial RDP (Reality Display Processor) rendering settings.
*/
@@ -694,5 +735,7 @@ void thread5_game_loop(UNUSED void *arg) {
// amount of free space remaining.
print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead);
}

View file

@ -13,16 +13,16 @@ index 00000000..e60550ab
+extern enum ConsoleType get_console_type(void);
diff --git a/lib/asm/skGetId.s b/lib/asm/skGetId.s
new file mode 100644
index 00000000..8fb4c449
index 00000000..58e7d4f9
--- /dev/null
+++ b/lib/asm/skGetId.s
@@ -0,0 +1,18 @@
+# Code by stuckpixel
+// Code by stuckpixel
+
+.set noreorder
+.set gp=64
+
+.include "macros.inc"
+#include "macros.inc"
+
+glabel skGetId
+ li $v0, 0
@ -36,10 +36,10 @@ index 00000000..8fb4c449
+ nop
+ nop
diff --git a/lib/src/__osViSwapContext.c b/lib/src/__osViSwapContext.c
index b9d364b1..fa149b5d 100644
index 990cb11f..22756e91 100644
--- a/lib/src/__osViSwapContext.c
+++ b/lib/src/__osViSwapContext.c
@@ -52,7 +52,9 @@ void __osViSwapContext() {
@@ -54,7 +54,9 @@ void __osViSwapContext() {
HW_REG(VI_INTR_REG, u32) = s0->fldRegs[field].vIntr;
HW_REG(VI_X_SCALE_REG, u32) = s1->unk20;
HW_REG(VI_Y_SCALE_REG, u32) = s1->unk2c;
@ -269,7 +269,7 @@ index 1a86477b..a94f8721 100644
return sp34;
}
diff --git a/lib/src/osInitialize.c b/lib/src/osInitialize.c
index ea247636..4adb45cb 100644
index ba73024b..6deaf407 100644
--- a/lib/src/osInitialize.c
+++ b/lib/src/osInitialize.c
@@ -1,6 +1,7 @@
@ -280,7 +280,7 @@ index ea247636..4adb45cb 100644
#define PIF_ADDR_START (void *) 0x1FC007FC
@@ -54,6 +55,7 @@ void osInitialize(void) {
@@ -51,6 +52,7 @@ void osInitialize(void) {
UNUSED u32 eu_sp30;
#endif
UNUSED u32 sp2c;
@ -289,24 +289,24 @@ index ea247636..4adb45cb 100644
__osSetSR(__osGetSR() | 0x20000000);
__osSetFpcCsr(0x01000800);
diff --git a/sm64.ld b/sm64.ld
index f80f5b4d..e53d4e40 100755
index 7d9b5b4a..be853a3b 100755
--- a/sm64.ld
+++ b/sm64.ld
@@ -300,6 +300,8 @@ SECTIONS
#ifdef VERSION_SH
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text)
@@ -306,6 +306,8 @@ SECTIONS
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
#endif
+ BUILD_DIR/libultra.a:consoleType.o(.text)
+ BUILD_DIR/libultra.a:skGetId.o(.text)
BUILD_DIR/lib/rsp.o(.text);
#else
BUILD_DIR/src/game*.o(.text);
@@ -410,6 +412,8 @@ SECTIONS
BUILD_DIR/libultra.a:__osGetCause.o(.text);
BUILD_DIR/libultra.a:__osAtomicDec.o(.text);
BUILD_DIR/libultra.a:guLookAtRef.o(.text); /* Fast3DEX2 only */
+ BUILD_DIR/libultra.a:consoleType.o(.text);
+ BUILD_DIR/libultra.a:skGetId.o(.text);
@@ -428,6 +430,8 @@ SECTIONS
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
#endif
+ BUILD_DIR/libultra.a:consoleType.o(.text)
+ BUILD_DIR/libultra.a:skGetId.o(.text)
BUILD_DIR/lib/rsp.o(.text);
#endif

View file

@ -1,8 +1,8 @@
diff --git a/Makefile b/Makefile
index f81fd27b..318140f2 100644
index f50b7622..124c7ec6 100644
--- a/Makefile
+++ b/Makefile
@@ -419,6 +419,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
@@ -478,6 +478,7 @@ $(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
@ -11,12 +11,12 @@ index f81fd27b..318140f2 100644
#==============================================================================#
diff --git a/include/segments.h b/include/segments.h
index a8c1bf97..84c3d7a4 100644
index a97d6ee8..186c968e 100644
--- a/include/segments.h
+++ b/include/segments.h
@@ -1,6 +1,9 @@
#ifndef SEGMENTS_H
#define SEGMENTS_H
@@ -3,6 +3,9 @@
#include "config.h"
+/* Use expansion pack RAM */
+#define USE_EXT_RAM 1
@ -58,7 +58,7 @@ index 17c773ed..677a5ae9 100644
+ JUMP(/*target*/ level_script_entry_error_screen),
+};
diff --git a/levels/intro/geo.c b/levels/intro/geo.c
index 7a297fe7..71b16442 100644
index 30a87806..6bf7b79a 100644
--- a/levels/intro/geo.c
+++ b/levels/intro/geo.c
@@ -15,6 +15,24 @@
@ -100,7 +100,7 @@ index 99277e86..04797cd7 100644
+
#endif
diff --git a/levels/intro/script.c b/levels/intro/script.c
index a130cc04..926c0d09 100644
index 04b8fc4c..ca9058c4 100644
--- a/levels/intro/script.c
+++ b/levels/intro/script.c
@@ -18,6 +18,21 @@
@ -138,7 +138,7 @@ index d41a91c8..7d047236 100644
struct LevelCommand *level_script_execute(struct LevelCommand *cmd);
diff --git a/src/game/main.c b/src/game/main.c
index 9615f25a..e2d7b3d4 100644
index 1a9d9e7e..f4f7a9e5 100644
--- a/src/game/main.c
+++ b/src/game/main.c
@@ -11,6 +11,7 @@
@ -149,7 +149,7 @@ index 9615f25a..e2d7b3d4 100644
// Message IDs
#define MESG_SP_COMPLETE 100
@@ -127,6 +128,10 @@ void alloc_pool(void) {
@@ -131,6 +132,10 @@ void alloc_pool(void) {
void *start = (void *) SEG_POOL_START;
void *end = (void *) SEG_POOL_END;
@ -160,7 +160,7 @@ index 9615f25a..e2d7b3d4 100644
main_pool_init(start, end);
gEffectsMemoryPool = mem_pool_init(0x4000, MEMORY_POOL_LEFT);
}
@@ -332,7 +337,10 @@ void thread3_main(UNUSED void *arg) {
@@ -336,7 +341,10 @@ void thread3_main(UNUSED void *arg) {
create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20);
osStartThread(&gSoundThread);
@ -174,7 +174,7 @@ index 9615f25a..e2d7b3d4 100644
while (TRUE) {
diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c
new file mode 100644
index 00000000..81efaf91
index 00000000..f432927c
--- /dev/null
+++ b/src/game/mem_error_screen.c
@@ -0,0 +1,104 @@
@ -274,15 +274,14 @@ index 00000000..81efaf91
+
+ addr = segmented_to_virtual(level_script_entry_error_screen);
+
+ rendering_init();
+ render_init();
+
+ while (1) {
+ config_gfx_pool();
+ select_gfx_pool();
+ addr = level_script_execute(addr);
+ display_and_vsync();
+ }
+}
\ No newline at end of file
diff --git a/src/game/mem_error_screen.h b/src/game/mem_error_screen.h
new file mode 100644
index 00000000..9fbff34c

View file

@ -1,5 +1,5 @@
diff --git a/src/game/game_init.c b/src/game/game_init.c
index b6334688..9363074b 100644
index b961ca52..adfde049 100644
--- a/src/game/game_init.c
+++ b/src/game/game_init.c
@@ -11,6 +11,7 @@
@ -10,9 +10,9 @@ index b6334688..9363074b 100644
#include "profiler.h"
#include "save_file.h"
#include "seq_ids.h"
@@ -335,6 +336,45 @@ void display_and_vsync(void) {
gGlobalTimer++;
}
@@ -386,6 +387,45 @@ void display_and_vsync(void) {
// Controls
// ----------------------------------------------------------------------------------------------------
+/*
+ * This enhancement allows you to record gameplay demos for the mario head screen.
@ -24,7 +24,7 @@ index b6334688..9363074b 100644
+ *
+*/
+
+#include "../src/game/mario.h"
+#include "mario.h"
+
+#define DEMOREC_STATUS_NOT_RECORDING 0
+#define DEMOREC_STATUS_PREPARING 1
@ -53,15 +53,15 @@ index b6334688..9363074b 100644
+struct DemoInput* gRecordedInputsPtr = (struct DemoInput*)gRecordedInputs;
+struct DemoInput gRecordedDemoInputCopy;
+
// this function records distinct inputs over a 255-frame interval to RAM locations and was likely
// used to record the demo sequences seen in the final game. This function is unused.
static void record_demo(void) {
@@ -368,6 +408,118 @@ static void record_demo(void) {
/**
* This function records distinct inputs over a 255-frame interval to RAM locations and was likely
* used to record the demo sequences seen in the final game. This function is unused.
@@ -420,6 +460,118 @@ UNUSED static void record_demo(void) {
gRecordedDemoInput.timer++;
}
+void record_new_demo_input(void) {
+ if(gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) {
+ if (gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) {
+ gRecordedInputs[gNumOfRecordedInputs].timer = gRecordedDemoInputCopy.timer;
+ gRecordedInputs[gNumOfRecordedInputs + 1].timer = 0;
+ gRecordedInputs[gNumOfRecordedInputs].rawStickX = gRecordedDemoInputCopy.rawStickX;
@ -86,13 +86,13 @@ index b6334688..9363074b 100644
+void recording(void) {
+
+ // Force-stop when someone makes too many inputs.
+ if(gNumOfRecordedInputs + 1 > DEMOREC_MAX_INPUTS) {
+ if (gNumOfRecordedInputs + 1 > DEMOREC_MAX_INPUTS) {
+ gRecordingStatus = DEMOREC_STATUS_STOPPING;
+ return;
+ }
+
+ copy_gRecordedDemoInput();
+ record_demo(); // Defined in game.c
+ record_demo();
+ record_new_demo_input();
+}
+
@ -112,10 +112,10 @@ index b6334688..9363074b 100644
+ case DEMOREC_STATUS_NOT_RECORDING:
+ break;
+ case DEMOREC_STATUS_PREPARING:
+ if(gMarioObject != NULL && gCurrLevelNum >= 5) { // If the game is in an active level
+ if (gMarioObject != NULL && gCurrLevelNum != LEVEL_NONE) { // If the game is in an active level
+ gRecordingStatus = DEMOREC_STATUS_RECORDING;
+
+ // A bit of a hack, but it works.
+ // First 4 values in demo inputs are used to define level ID
+ gNumOfRecordedInputs = 1;
+ gRecordedInputs[0].timer = gCurrLevelNum;
+ gRecordedInputs[0].rawStickX = 0;
@ -127,7 +127,7 @@ index b6334688..9363074b 100644
+ recording();
+ break;
+ case DEMOREC_STATUS_DONE:
+ if(gDoneDelay > DEMOREC_DONE_DELAY)
+ if (gDoneDelay > DEMOREC_DONE_DELAY)
+ gRecordingStatus = DEMOREC_STATUS_NOT_RECORDING;
+ else
+ gDoneDelay++;
@ -159,8 +159,8 @@ index b6334688..9363074b 100644
+ // so the debug level select is used for that.
+ gDebugLevelSelect = TRUE;
+
+ if(gPlayer1Controller->buttonPressed & L_TRIG) {
+ if(gRecordingStatus == DEMOREC_STATUS_NOT_RECORDING) {
+ if (gPlayer1Controller->buttonPressed & L_TRIG) {
+ if (gRecordingStatus == DEMOREC_STATUS_NOT_RECORDING) {
+ gRecordingStatus = DEMOREC_STATUS_PREPARING;
+ } else if (gRecordingStatus == DEMOREC_STATUS_RECORDING) {
+ gRecordingStatus = DEMOREC_STATUS_STOPPING;
@ -172,12 +172,12 @@ index b6334688..9363074b 100644
+ print_status();
+}
+
// take the updated controller struct and calculate
// the new x, y, and distance floats.
void adjust_analog_stick(struct Controller *controller) {
@@ -623,6 +775,7 @@ void thread5_game_loop(UNUSED void *arg) {
/**
* Take the updated controller struct and calculate the new x, y, and distance floats.
*/
@@ -684,6 +836,7 @@ void thread5_game_loop(UNUSED void *arg) {
audio_game_loop_tick();
config_gfx_pool();
select_gfx_pool();
read_controller_inputs();
+ recordingDemo();
addr = level_script_execute(addr);

View file

@ -20,6 +20,8 @@ def read_local_asset_list(f):
def asset_needs_update(asset, version):
if version <= 6 and asset in ["actors/king_bobomb/king_bob-omb_eyes.rgba16.png", "actors/king_bobomb/king_bob-omb_hand.rgba16.png"]:
return True
if version <= 5 and asset == "textures/spooky/bbh_textures.00800.rgba16.png":
return True
if version <= 4 and asset in ["textures/mountain/ttm_textures.01800.rgba16.png", "textures/mountain/ttm_textures.05800.rgba16.png"]:
@ -59,7 +61,7 @@ def clean_assets(local_asset_file):
def main():
# In case we ever need to change formats of generated files, we keep a
# revision ID in the local asset file.
new_version = 6
new_version = 7
try:
local_asset_file = open(".assets-local.txt")

View file

@ -56,13 +56,14 @@
#define A_ADDMIXER 4
#define A_RESAMPLE_ZOH 6
#define A_INTERL 17
#define A_DMEMMOVE2 16
#define A_DOWNSAMPLE_HALF 17
#define A_ENVSETUP1 18
#define A_ENVMIXER 19
#define A_LOADBUFF 20
#define A_SAVEBUFF 21
#define A_ENVSETUP2 22
#define A_UNK_23 23
#define A_S8DEC 23
#define A_HILOGAIN 24
#define A_UNK_25 25
#define A_DUPLICATE 26
@ -306,6 +307,8 @@ typedef short ENVMIX_STATE[40];
* address is later used as parameter, the 8 high bits will be an index
* to the segment table and the lower 24 bits are added to the base address
* stored in the segment table for this entry. The result is the physical address.
* With the newer rsp audio code, this segment table is not used. The address is
* used directly instead.
*
* Transfers to/from DRAM are executed using DMA and hence follow these restrictions:
* All DRAM addresses should be aligned by 8 bytes, or they will be
@ -349,14 +352,6 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = (uintptr_t)(s); \
}
#define aADPCM_23(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_UNK_23, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Not used in SM64.
*/
@ -570,15 +565,6 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
#define aInterl(pkt, f, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(i, 0, 16)); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
/*
* Sets internal volume parameters.
* See aEnvMixer for more info.
@ -663,12 +649,50 @@ typedef short ENVMIX_STATE[40];
#undef aEnvMixer
#undef aInterleave
// New or modified operations in the new audio microcode below
/**
* Decompresses S8 data.
* Possible flags: A_INIT and A_LOOP.
*
* First set up internal data in DMEM:
* aSetLoop(cmd++, physicalAddressOfLoopState) (if A_LOOP is set)
*
* Then before this command, call:
* aSetBuffer(cmd++, 0, in, out, count)
*
* Note: count will be rounded up to the nearest multiple of 32 bytes.
*
* S8 decompression works by expanding s8 bytes into s16 numbers,
* by performing a left shift of 8 steps.
*
* Before the algorithm starts, the previous 16 samples are loaded according to flag:
* A_INIT: all zeros
* A_LOOP: the address set by aSetLoop
* no flags: the DRAM address in the s parameter
* These 16 samples are immediately copied to the destination address.
*
* The result of "count" bytes will be written after these 16 initial samples.
* The last 16 samples written to the destination will also be written to
* the state address in DRAM.
*/
#define aS8Dec(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Mix two tracks by simple clamped addition.
*
* s: DMEM source track 1
* d: DMEM source track 2 and destination
* c: number of bytes to write (rounded down to 16 byte alignment)
* c: number of bytes to write
*
* Note: count is first rounded down to the nearest multiple of 16 bytes
* and then rounded up to the nearest multiple of 64 bytes.
*/
#define aAddMixer(pkt, s, d, c) \
{ \
@ -726,6 +750,28 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \
}
/*
* Copies memory in DMEM, second version.
*
* Copies t * c bytes from address i to address o.
*
* Note: count is first rounded up to the nearest multiple of 32 bytes,
* before the multiplication by t.
*
* Note: This acts as memcpy where 32 bytes are moved at a time, therefore
* if input and output overlap, output address should be less than input address.
*
* Not used in SM64.
*/
#define aDMEMMove2(pkt, t, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_DMEMMOVE2, 24, 8) | \
_SHIFTL(t, 16, 8) | _SHIFTL(i, 0, 16); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
/*
* Fast resample.
*
@ -734,14 +780,37 @@ typedef short ENVMIX_STATE[40];
*
* This works like the other resample command but just takes the "nearest" sample,
* instead of a function of the four nearest samples.
*
* Initially the current position is calculated as (in << 16) + startFract.
* For every sample to create, the value is simply taken from the sample
* at address ((position >> 17) << 1). Then the current position is incremented
* by (pitch << 2).
*
* Note: count represents the number of output bytes to create, and is
* rounded up to the nearest multiple of 8 bytes.
*/
#define aResampleZoh(pkt, pitch, start_fract) \
#define aResampleZoh(pkt, pitch, startFract) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
_SHIFTL(pitch, 0, 16)); \
_a->words.w1 = _SHIFTL(start_fract, 0, 16); \
_a->words.w1 = _SHIFTL(startFract, 0, 16); \
}
/*
* Fast downsampling by taking every other sample, discarding others.
*
* Note: nSamples refers to the number of output samples to create, and
* is first rounded up to the nearest multiple of 8.
*/
#define aDownsampleHalf(pkt, nSamples, i, o) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_DOWNSAMPLE_HALF, 24, 8) | \
_SHIFTL(nSamples, 0, 16)); \
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
}
/*
@ -764,39 +833,87 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
}
#define aEnvSetup1(pkt, a, b, c, d) \
/*
* See aEnvMixer for more info.
*/
#define aEnvSetup1(pkt, initialVolReverb, rampReverb, rampLeft, rampRight) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \
_SHIFTL(initialVolReverb, 16, 8) | \
_SHIFTL(rampReverb, 0, 16)); \
_a->words.w1 = _SHIFTL(rampLeft, 16, 16) | \
_SHIFTL(rampRight, 0, 16); \
}
#define aEnvSetup2(pkt, volLeft, volRight) \
/*
* See aEnvMixer for more info.
*/
#define aEnvSetup2(pkt, initialVolLeft, initialVolRight) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \
_SHIFTL(volRight, 0, 16); \
_a->words.w1 = _SHIFTL(initialVolLeft, 16, 16) | \
_SHIFTL(initialVolRight, 0, 16); \
}
#define aEnvMixer(pkt, inBuf, nSamples, bit1, bit2, bit3, dryLeft, dryRight, wetLeft, wetRight) \
/*
* Mixes an envelope with mono sound into 4 channels.
*
* To allow for many parameters, a sequence of aEnvSetup1, aEnvSetup2,
* aEnvMixer shall always be called.
*
* The function works in blocks of 8 samples.
* However, nSamples is rounded up to the nearest multiple of 16 samples.
*
* For each sample in a block:
* 1. sampleLeft = in * volLeft * (negLeft ? -1 : 1)
* 2. sampleRight = in * volRight * (negRight ? -1 : 1)
* 3. dryLeft += sampleLeft
* 4. dryRight += sampleRight
* 5. if swapReverb: swap sampleLeft and sampleRight
* 6. wetLeft += sampleLeft * volReverb
* 7. wetRight += sampleRight * volReverb
*
* After each block, all vol variables are added by their corresponding
* ramp value.
*
* Each volume variable is treated as a UQ0.16 number. Make sure
* the ramp additions don't overflow, or wrapping will occur.
* The initialVolReverb parameter is only 8 bits, but will be left
* shifted 8 bits by the rsp.
*/
#define aEnvMixer(pkt, inBuf, nSamples, swapReverb, negLeft, negRight, \
dryLeft, dryRight, wetLeft, wetRight) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \
_SHIFTL((inBuf) >> 4, 16, 8) | \
_SHIFTL(nSamples, 8, 8)) | \
_SHIFTL(bit1, 2, 1) | _SHIFTL(bit2, 1, 1) | \
_SHIFTL(bit3, 0, 1); \
_SHIFTL(swapReverb, 2, 1) | _SHIFTL(negLeft, 1, 1) |\
_SHIFTL(negRight, 0, 1); \
_a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \
_SHIFTL((dryRight) >> 4, 16, 8) | \
_SHIFTL((wetLeft) >> 4, 8, 8) | \
_SHIFTL((wetRight) >> 4, 0, 8); \
}
/*
* Interleaves two mono channels into stereo.
*
* The count refers to the size of each input. Hence 2 * count bytes
* will be written out.
*
* A left sample will be placed before the right sample.
* All addresses (output, left, right) are DMEM addresses.
*
* Note: count will be rounded up to the nearest multiple of 8 bytes.
* The previous version of this function rounded up to the nearest
* multiple of 16 bytes.
*/
#define aInterleave(pkt, o, l, r, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
@ -806,7 +923,26 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
}
// countOrBuf meaning depends on flag
/*
* Linear filter function.
*
* Calculates out[i] = sum all elements in the vector in[i..i-7] * filter[0..7],
* where "*" represents dot multiplication. The input/output contains s16
* samples and filter contains Q1.15 signed fixed point numbers.
* Every result sample is rounded and clamped.
*
* First initiate by calling with the flag f set to 2, countOrBuf contains
* the length in bytes that shall be processed in the next call. The addr
* parameter shall contain the DRAM address to the filter table (16 bytes).
* The count will be rounded up to the nearest multiple of 16 bytes.
*
* The aFilter function shall then be called in direct succession, with flag
* set to either 0 or 1. The countOrBuf parameter shall contain the DMEM
* address for the input/output. The addr parameter shall contain the DRAM
* address for the state, containing the last previous 8 input samples.
* The state is always written to upon exit, but is only read at entry if
* the flag is 0 (otherwise all-zero samples are used instead).
*/
#define aFilter(pkt, f, countOrBuf, addr) \
{ \
Acmd *_a = (Acmd *)pkt; \
@ -816,22 +952,41 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = (uintptr_t)(addr); \
}
#define aHilogain(pkt, id, buflen, i) \
/*
* Modifies the volume of samples using a simple UQ4.4 gain multiplier.
*
* Performs the following:
*
* 1. Count c is rounded up to 32 byte alignment
* 2. g is a u8 that contains a UQ4.4 number
* 3. Modify each sample s, so that s = clamp_s16(s * g >> 4)
*/
#define aHiLoGain(pkt, g, buflen, i) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \
_SHIFTL((id), 16, 8) | _SHIFTL((buflen), 0, 16); \
_SHIFTL((g), 16, 8) | _SHIFTL((buflen), 0, 16); \
_a->words.w1 = _SHIFTL((i), 16, 16); \
}
#define aUnknown25(pkt, f, g, i, o) \
/*
* Performs the following:
*
* 1. Count c is rounded up to 64 byte alignment
* 2. f is added to i
* 3. i and o are from now treated as s16 pointers
* 4. 32 s16 samples are loaded from i to tbl
* 5. for (u32 idx = 0; idx * sizeof(s16) < c; idx++)
* o[idx] = clamp_s16((s32)o[idx] * (s32)tbl[idx % 32]);
*/
#define aUnknown25(pkt, f, c, o, i) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \
_SHIFTL((f), 16, 8) | _SHIFTL((g), 0, 16)); \
_a->words.w1 = _SHIFTL((i), 16, 16) | _SHIFTL((o), 0, 16); \
_SHIFTL((f), 16, 8) | _SHIFTL((c), 0, 16)); \
_a->words.w1 = _SHIFTL((o), 16, 16) | _SHIFTL((i), 0, 16); \
}
#endif

View file

@ -8,7 +8,8 @@ typedef struct
u8 *offset;
s32 len;
#ifdef VERSION_SH
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203
s8 medium;
s8 magic; // tbl: 0x04, otherwise: 0x03
// for ctl (else zeros):
union {
@ -38,7 +39,9 @@ typedef struct
#ifdef VERSION_SH
s16 unk2;
u8 *data;
#if !IS_64_BIT
s32 pad[2];
#endif
#endif
ALSeqData seqArray[1];
} ALSeqFile;

View file

@ -261,7 +261,7 @@ extern const BehaviorScript bhvBoo[];
extern const BehaviorScript bhvMerryGoRoundBoo[];
extern const BehaviorScript bhvGhostHuntBoo[];
extern const BehaviorScript bhvHiddenStaircaseStep[];
extern const BehaviorScript bhvBooBossSpawnedBridge[];
extern const BehaviorScript bhvBooStaircase[];
extern const BehaviorScript bhvBbhTiltingTrapPlatform[];
extern const BehaviorScript bhvHauntedBookshelf[];
extern const BehaviorScript bhvMeshElevator[];

View file

@ -8,7 +8,7 @@
*/
// Bug Fixes
// --| US Version Nintendo Bug Fixes
// --| Post-JP Version Nintendo Bug Fixes
/// Fixes bug where obtaining over 999 coins sets the number of lives to 999 (or -25)
#define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug where the Boss music won't fade out after defeating King Bob-omb
@ -22,6 +22,17 @@
#define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US || VERSION_SH)
/// Fixes bug where it shows a star when you grab a key in bowser battle stages
#define BUGFIX_STAR_BOWSER_KEY (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug that enables Mario in time stop even if is not ready to speak
#define BUGFIX_DIALOG_TIME_STOP (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug that causes Mario to still collide with Bowser in BitS after his defeat
#define BUGFIX_BOWSER_COLLIDE_BITS_DEAD (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug where Bowser wouldn't reset his speed when fallen off (and adds missing checks)
#define BUGFIX_BOWSER_FALLEN_OFF_STAGE (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug where Bowser would look weird while fading out
#define BUGFIX_BOWSER_FADING_OUT (0 || VERSION_US || VERSION_EU || VERSION_SH)
// Support Rumble Pak
#define ENABLE_RUMBLE (0 || VERSION_SH)
// Screen Size Defines
#define SCREEN_WIDTH 320

View file

@ -12,8 +12,7 @@
#define DEFINE_BONUS_COURSE(courseenum, _1) courseenum,
enum CourseNum
{
enum CourseNum {
#include "levels/course_defines.h"
COURSE_END, // To mark end + 1 for marking max and count.
// TODO: clean this up. This is still bad. Which
@ -27,6 +26,7 @@ enum CourseNum
#undef DEFINE_COURSES_END
#undef DEFINE_BONUS_COURSE
#define COURSE_IS_MAIN_COURSE(cmd) (cmd >= COURSE_MIN && cmd <= COURSE_STAGES_MAX)
#define COURSE_IS_MAIN_COURSE(cmd) ((cmd) >= COURSE_MIN && (cmd) <= COURSE_STAGES_MAX)
#define COURSE_NUM_TO_INDEX(cmd) ((cmd) - 1)
#endif // COURSE_TABLE_H

View file

@ -2,6 +2,7 @@
#define DIALOG_IDS_H
enum DialogId {
DIALOG_NONE = -1,
DIALOG_000,
DIALOG_001,
DIALOG_002,

View file

@ -7,8 +7,7 @@
#define STUB_LEVEL(_0, levelenum, _2, _3, _4, _5, _6, _7, _8) levelenum,
#define DEFINE_LEVEL(_0, levelenum, _2, _3, _4, _5, _6, _7, _8, _9, _10) levelenum,
enum LevelNum
{
enum LevelNum {
LEVEL_NONE,
#include "levels/level_defines.h"
LEVEL_COUNT,

View file

@ -5,8 +5,7 @@
#include "behavior_data.h"
#include "model_ids.h"
struct MacroPreset
{
struct MacroPreset {
/*0x00*/ const BehaviorScript *behavior;
/*0x04*/ s16 model;
/*0x06*/ s16 param;

View file

@ -1,4 +1,4 @@
# Assembly Macros
// Assembly Macros
.set K0BASE, 0x80000000
.set K1BASE, 0xA0000000

View file

@ -3,8 +3,7 @@
/* Mario Animation IDs */
enum MarioAnimID
{
enum MarioAnimID {
/* 0x00 */ MARIO_ANIM_SLOW_LEDGE_GRAB,
/* 0x01 */ MARIO_ANIM_FALL_OVER_BACKWARDS,
/* 0x02 */ MARIO_ANIM_BACKWARD_AIR_KB,
@ -196,7 +195,7 @@ enum MarioAnimID
/* 0xBC */ MARIO_ANIM_TURNING_PART1,
/* 0xBD */ MARIO_ANIM_TURNING_PART2,
/* 0xBE */ MARIO_ANIM_SLIDEFLIP_LAND,
/* 0XBF */ MARIO_ANIM_SLIDEFLIP,
/* 0xBF */ MARIO_ANIM_SLIDEFLIP,
/* 0xC0 */ MARIO_ANIM_TRIPLE_JUMP_LAND,
/* 0xC1 */ MARIO_ANIM_TRIPLE_JUMP,
/* 0xC2 */ MARIO_ANIM_FIRST_PERSON,

View file

@ -3,8 +3,7 @@
/* Mario Geo-Switch-Case IDs */
enum MarioEyesGSCId
{
enum MarioEyesGSCId {
/*0x00*/ MARIO_EYES_BLINK,
/*0x01*/ MARIO_EYES_OPEN,
/*0x02*/ MARIO_EYES_HALF_CLOSED,
@ -16,8 +15,7 @@ enum MarioEyesGSCId
/*0x08*/ MARIO_EYES_DEAD
};
enum MarioHandGSCId
{
enum MarioHandGSCId {
/*0x00*/ MARIO_HAND_FISTS,
/*0x01*/ MARIO_HAND_OPEN,
/*0x02*/ MARIO_HAND_PEACE_SIGN,
@ -26,16 +24,14 @@ enum MarioHandGSCId
/*0x05*/ MARIO_HAND_RIGHT_OPEN
};
enum MarioCapGSCId
{
enum MarioCapGSCId {
/*0x00*/ MARIO_HAS_DEFAULT_CAP_ON,
/*0x01*/ MARIO_HAS_DEFAULT_CAP_OFF,
/*0x02*/ MARIO_HAS_WING_CAP_ON,
/*0x03*/ MARIO_HAS_WING_CAP_OFF // unused
};
enum MarioGrabPosGSCId
{
enum MarioGrabPosGSCId {
/*0x00*/ GRAB_POS_NULL,
/*0x01*/ GRAB_POS_LIGHT_OBJ,
/*0x02*/ GRAB_POS_HEAVY_OBJ,

View file

@ -385,7 +385,7 @@
// group 9
#define MODEL_BOO 0x54 // boo_geo
#define MODEL_BETA_BOO_KEY 0x55 // small_key_geo
#define MODEL_BETA_BOO_KEY 0x55 // small_key_geo
#define MODEL_HAUNTED_CHAIR 0x56 // haunted_chair_geo
#define MODEL_MAD_PIANO 0x57 // mad_piano_geo
#define MODEL_BOOKEND_PART 0x58 // bookend_part_geo
@ -410,12 +410,12 @@
// second set of actor bins, (0x64-0x73)
// group 12
#define MODEL_BOWSER 0x64 // bowser_geo - 2nd geo loaded is bowser_geo_000424, starts with shadow command
#define MODEL_BOWSER 0x64 // bowser_geo
#define MODEL_BOWSER_BOMB_CHILD_OBJ 0x65 // bowser_bomb_geo - Spawns as a chill object in bowser's behavior command, causing an explosion if it touches a bomb
#define MODEL_BOWSER_SMOKE 0x66 // bowser_impact_smoke_geo
#define MODEL_BOWSER_FLAMES 0x67 // bowser_flames_geo
#define MODEL_BOWSER_WAVE 0x68 // invisible_bowser_accessory_geo
#define MODEL_BOWSER2 0x69 // bowser2_geo - 2nd geo loaded is bowser_geo_000770, starts with node command, only difference
#define MODEL_BOWSER_NO_SHADOW 0x69 // bowser_geo_no_shadow
// group 13
#define MODEL_BUB 0x64 // cheep_cheep_geo
@ -531,7 +531,7 @@
#define MODEL_KOOPA_WITHOUT_SHELL 0xBF // koopa_without_shell_geo
#define MODEL_GOOMBA 0xC0 // goomba_geo
#define MODEL_SEAWEED 0xC1 // seaweed_geo
#define MODEL_AMP 0xC2 // amp_geo
#define MODEL_AMP 0xC2 // dAmpGeo
#define MODEL_BOBOMB_BUDDY 0xC3 // bobomb_buddy_geo
// find me
// find me
@ -562,7 +562,7 @@
#define MODEL_PEACH 0xDE // peach_geo
#define MODEL_CHUCKYA 0xDF // chuckya_geo
#define MODEL_WHITE_PUFF 0xE0 // white_puff_geo
#define MODEL_TRAJECTORY_MARKER_BALL 0xE1 // bowling_ball_track_geo - duplicate used in SSL Pyramid small sized and as a track ball
#define MODEL_TRAJECTORY_MARKER_BALL 0xE1 // bowling_ball_track_geo - duplicate used in SSL Pyramid small sized and as a track ball
// Menu Models (overwrites Level Geometry IDs)
#define MODEL_MAIN_MENU_MARIO_SAVE_BUTTON MODEL_LEVEL_GEOMETRY_03 // main_menu_geo_0001D0

File diff suppressed because it is too large Load diff

View file

@ -65,8 +65,8 @@
#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B)
#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C)
#define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C)
#define /*0x0BC*/ oUnkBC OBJECT_FIELD_F32(0x0D)
#define /*0x0C0*/ oUnkC0 OBJECT_FIELD_F32(0x0E)
#define /*0x0BC*/ oLeftVel OBJECT_FIELD_F32(0x0D)
#define /*0x0C0*/ oUpVel OBJECT_FIELD_F32(0x0E)
#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F
#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0)
#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1)
@ -186,8 +186,8 @@
#define /*0x0FC*/ oHomingAmpAvgY OBJECT_FIELD_F32(0x1D)
/* Arrow Lift */
#define /*0x0F4*/ oArrowLiftDisplacement OBJECT_FIELD_F32(0x1B)
#define /*0x100*/ oArrowLiftUnk100 OBJECT_FIELD_S32(0x1E)
#define /*0x0F4*/ oArrowLiftDisplacement OBJECT_FIELD_F32(0x1B)
#define /*0x100*/ oArrowLiftUnk100 OBJECT_FIELD_S32(0x1E)
/* Back-and-Forth Platform */
#define /*0x0F4*/ oBackAndForthPlatformDirection OBJECT_FIELD_F32(0x1B)
@ -274,24 +274,24 @@
#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D)
/* Bowser */
#define /*0x088*/ oBowserUnk88 OBJECT_FIELD_S32(0x00)
#define /*0x0F4*/ oBowserUnkF4 OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oBowserUnkF8 OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D)
#define /*0x106*/ oBowserUnk106 OBJECT_FIELD_S16(0x1F, 1)
#define /*0x108*/ oBowserUnk108 OBJECT_FIELD_S16(0x20, 0)
#define /*0x088*/ oBowserCamAct OBJECT_FIELD_S32(0x00)
#define /*0x0F4*/ oBowserStatus OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oBowserTimer OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oBowserDistToCenter OBJECT_FIELD_F32(0x1D)
#define /*0x106*/ oBowserBitsJustJump OBJECT_FIELD_S16(0x1F, 1)
#define /*0x108*/ oBowserRandSplitFloor OBJECT_FIELD_S16(0x20, 0)
#define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1)
#define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0)
#define /*0x10E*/ oBowserUnk10E OBJECT_FIELD_S16(0x21, 1)
#define /*0x110*/ oBowserUnk110 OBJECT_FIELD_S16(0x22, 0)
#define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1)
#define /*0x1AC*/ oBowserUnk1AC OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oBowserUnk1AE OBJECT_FIELD_S16(0x49, 1)
#define /*0x10E*/ oBowserGrabbedStatus OBJECT_FIELD_S16(0x21, 1)
#define /*0x110*/ oBowserIsReacting OBJECT_FIELD_S16(0x22, 0)
#define /*0x112*/ oBowserAngleToCenter OBJECT_FIELD_S16(0x22, 1)
#define /*0x1AC*/ oBowserTargetOpacity OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oBowserEyesTimer OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oBowserUnk1B2 OBJECT_FIELD_S16(0x4A, 1)
#define /*0x1B2*/ oBowserRainbowLight OBJECT_FIELD_S16(0x4A, 1)
/* Bowser Shockwave */
#define /*0x0F4*/ oBowserShockWaveUnkF4 OBJECT_FIELD_F32(0x1B)
#define /*0x0F4*/ oBowserShockWaveScale OBJECT_FIELD_F32(0x1B)
/* Black Smoke Bowser */
#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B)
@ -319,9 +319,9 @@
#define /*0x108*/ oBubbaUnk108 OBJECT_FIELD_F32(0x20)
#define /*0x10C*/ oBubbaUnk10C OBJECT_FIELD_F32(0x21)
#define /*0x1AC*/ oBubbaUnk1AC OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oBubbaUnk1AE OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oBubbaUnk1AE OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oBubbaUnk1B0 OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oBubbaUnk1B2 OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oBubbaUnk1B2 OBJECT_FIELD_S16(0x4A, 1)
/* Bullet Bill */
#define /*0x0F8*/ oBulletBillInitialMoveYaw OBJECT_FIELD_S32(0x1C)
@ -406,7 +406,7 @@
#endif
/* Collision Particle */
#define /*0x0F4*/ oCollisionParticleUnkF4 OBJECT_FIELD_F32(0x1B)
#define /*0x0F4*/ oCollisionParticleUnkF4 OBJECT_FIELD_F32(0x1B)
/* Controllable Platform */
#define /*0x0F8*/ oControllablePlatformUnkF8 OBJECT_FIELD_S32(0x1C)
@ -442,9 +442,9 @@
#define /*0x104*/ oDorrieYawVel OBJECT_FIELD_S32(0x1F)
#define /*0x10C*/ oDorrieLiftingMario OBJECT_FIELD_S32(0x21)
#define /*0x1AC*/ oDorrieGroundPounded OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oDorrieAngleToHome OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oDorrieAngleToHome OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oDorrieNeckAngle OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oDorrieHeadRaiseSpeed OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oDorrieHeadRaiseSpeed OBJECT_FIELD_S16(0x4A, 1)
/* Elevator */
#define /*0x0F4*/ oElevatorUnkF4 OBJECT_FIELD_F32(0x1B)
@ -497,7 +497,7 @@
/* Flame */
#define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B)
#define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oFlameUnkFC OBJECT_FIELD_F32(0x1D)
#define /*0x0FC*/ oFlameUnusedRand OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E)
/* Blue Flame */
@ -523,7 +523,7 @@
#define /*0x0F4*/ oFloatingPlatformUnkF4 OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oFloatingPlatformUnkF8 OBJECT_FIELD_F32(0x1C)
#define /*0x0FC*/ oFloatingPlatformUnkFC OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oFloatingPlatformUnk100 OBJECT_FIELD_S32(0x1E)
#define /*0x100*/ oFloatingPlatformUnk100 OBJECT_FIELD_S32(0x1E)
/* Floor Switch Press Animation */
#define /*0x0F4*/ oFloorSwitchPressAnimationUnkF4 OBJECT_FIELD_S32(0x1B)
@ -604,9 +604,9 @@
#define /*0x10C*/ oKleptoStartPosZ OBJECT_FIELD_F32(0x21)
#define /*0x110*/ oKleptoTimeUntilTargetChange OBJECT_FIELD_S32(0x22)
#define /*0x1AC*/ oKleptoTargetNumber OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oKleptoUnk1AE OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oKleptoUnk1AE OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oKleptoUnk1B0 OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oKleptoYawToTarget OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oKleptoYawToTarget OBJECT_FIELD_S16(0x4A, 1)
/* Koopa */
#define /*0x0F4*/ oKoopaAgility OBJECT_FIELD_F32(0x1B)
@ -626,12 +626,12 @@
#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D)
#define /*0x100*/ oKoopaRaceEndpointUnk100 OBJECT_FIELD_S32(0x1E)
#define /*0x100*/ oKoopaRaceEndpointDialog OBJECT_FIELD_S32(0x1E)
#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F)
/* Koopa Shell Flame */
#define /*0x0F4*/ oKoopaShellFlameUnkF4 OBJECT_FIELD_F32(0x1B)
#define /*0x0F8*/ oKoopaShellFlameUnkF8 OBJECT_FIELD_F32(0x1C)
#define /*0x0F8*/ oKoopaShellFlameScale OBJECT_FIELD_F32(0x1C)
/* Camera Lakitu */
#define /*0x0F4*/ oCameraLakituBlinkTimer OBJECT_FIELD_S32(0x1B)
@ -642,7 +642,7 @@
#define /*0x104*/ oCameraLakituUnk104 OBJECT_FIELD_S32(0x1F)
#endif
#define /*0x1AC*/ oCameraLakituPitchVel OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oCameraLakituYawVel OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oCameraLakituYawVel OBJECT_FIELD_S16(0x49, 1)
/* Evil Lakitu */
#define /*0x0F4*/ oEnemyLakituNumSpinies OBJECT_FIELD_S32(0x1B)
@ -651,14 +651,14 @@
#define /*0x100*/ oEnemyLakituFaceForwardCountdown OBJECT_FIELD_S32(0x1E)
/* Intro Cutscene Lakitu */
#define /*0x0F8*/ oIntroLakituSplineSegmentProgress OBJECT_FIELD_F32(0x1C)
#define /*0x0FC*/ oIntroLakituSplineSegment OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oIntroLakituUnk100 OBJECT_FIELD_F32(0x1E)
#define /*0x104*/ oIntroLakituUnk104 OBJECT_FIELD_F32(0x1F)
#define /*0x108*/ oIntroLakituUnk108 OBJECT_FIELD_F32(0x20)
#define /*0x10C*/ oIntroLakituUnk10C OBJECT_FIELD_F32(0x21)
#define /*0x110*/ oIntroLakituUnk110 OBJECT_FIELD_F32(0x22)
#define /*0x1AC*/ oIntroLakituCloud OBJECT_FIELD_OBJ(0x49)
#define /*0x0F8*/ oIntroLakituSplineSegmentProgress OBJECT_FIELD_F32(0x1C)
#define /*0x0FC*/ oIntroLakituSplineSegment OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oIntroLakituUnk100 OBJECT_FIELD_F32(0x1E)
#define /*0x104*/ oIntroLakituUnk104 OBJECT_FIELD_F32(0x1F)
#define /*0x108*/ oIntroLakituUnk108 OBJECT_FIELD_F32(0x20)
#define /*0x10C*/ oIntroLakituUnk10C OBJECT_FIELD_F32(0x21)
#define /*0x110*/ oIntroLakituUnk110 OBJECT_FIELD_F32(0x22)
#define /*0x1AC*/ oIntroLakituCloud OBJECT_FIELD_OBJ(0x49)
/* Main Menu Button */
#define /*0x0F4*/ oMenuButtonState OBJECT_FIELD_S32(0x1B)
@ -715,7 +715,7 @@
#define /*0x100*/ oMrIUnk100 OBJECT_FIELD_S32(0x1E)
#define /*0x104*/ oMrIUnk104 OBJECT_FIELD_S32(0x1F)
#define /*0x108*/ oMrIUnk108 OBJECT_FIELD_S32(0x20)
#define /*0x10C*/ oMrISize OBJECT_FIELD_F32(0x21)
#define /*0x10C*/ oMrIScale OBJECT_FIELD_F32(0x21)
#define /*0x110*/ oMrIUnk110 OBJECT_FIELD_S32(0x22)
/* Object Respawner */
@ -737,9 +737,9 @@
// 0x1D-0x21 reserved for pathing
#define /*0x110*/ oRacingPenguinWeightedNewTargetSpeed OBJECT_FIELD_F32(0x22)
#define /*0x1AC*/ oRacingPenguinFinalTextbox OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oRacingPenguinMarioWon OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oRacingPenguinMarioWon OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oRacingPenguinReachedBottom OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oRacingPenguinMarioCheated OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oRacingPenguinMarioCheated OBJECT_FIELD_S16(0x4A, 1)
/* Small Penguin */
#define /*0x088*/ oSmallPenguinUnk88 OBJECT_FIELD_S32(0x00)
@ -760,7 +760,7 @@
/* Fire Piranha Plant */
#define /*0x0F4*/ oFirePiranhaPlantNeutralScale OBJECT_FIELD_F32(0x1B)
#define /*0x0F8*/ oFirePiranhaPlantScale OBJECT_FIELD_F32(0x1C) //Shared with above obj? Coincidence?
#define /*0x0F8*/ oFirePiranhaPlantScale OBJECT_FIELD_F32(0x1C) // Shared with above obj? Coincidence?
#define /*0x0FC*/ oFirePiranhaPlantActive OBJECT_FIELD_S32(0x1D)
#define /*0x100*/ oFirePiranhaPlantDeathSpinTimer OBJECT_FIELD_S32(0x1E)
#define /*0x104*/ oFirePiranhaPlantDeathSpinVel OBJECT_FIELD_F32(0x1F)
@ -770,10 +770,14 @@
#define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C)
#define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D)
/* Platform */
#define /*0x0F4*/ oPlatformTimer OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oPlatformUnkF8 OBJECT_FIELD_OBJ(0x1C)
#define /*0x0FC*/ oPlatformUnkFC OBJECT_FIELD_S32(0x1D)
/* Falling Rising Bitfs Platform */
#define /*0x0F4*/ oBitfsPlatformTimer OBJECT_FIELD_S32(0x1B)
/* Falling Bowser Bits Platform */
#define /*0x0F8*/ oBitsPlatformBowser OBJECT_FIELD_OBJ(0x1C)
#define /*0x0FC*/ oBitsPlatformTimer OBJECT_FIELD_S32(0x1D)
/* WF Platform */
#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21)
#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22)
@ -788,9 +792,9 @@
#define /*0x10C*/ oPlatformOnTrackYaw OBJECT_FIELD_S32(0x21)
#define /*0x110*/ oPlatformOnTrackOffsetY OBJECT_FIELD_F32(0x22)
#define /*0x1AC*/ oPlatformOnTrackIsNotSkiLift OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oPlatformOnTrackIsNotHMC OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oPlatformOnTrackIsNotHMC OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oPlatformOnTrackType OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oPlatformOnTrackWasStoodOn OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oPlatformOnTrackWasStoodOn OBJECT_FIELD_S16(0x4A, 1)
/* Platform Spawner */
#define /*0x0F4*/ oPlatformSpawnerUnkF4 OBJECT_FIELD_S32(0x1B)
@ -853,11 +857,11 @@
#define /*0x108*/ oSinkWhenSteppedOnUnk108 OBJECT_FIELD_F32(0x20)
/* Skeeter */
#define /*0x0F4*/ oSkeeterTargetAngle OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oSkeeterUnkF8 OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oSkeeterUnkFC OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oSkeeterWaitTime OBJECT_FIELD_S32(0x1E)
#define /*0x1AC*/ oSkeeterUnk1AC OBJECT_FIELD_S16(0x49, 0)
#define /*0x0F4*/ oSkeeterTargetAngle OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oSkeeterTurningAwayFromWall OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oSkeeterUnkFC OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oSkeeterWaitTime OBJECT_FIELD_S32(0x1E)
#define /*0x1AC*/ oSkeeterUnk1AC OBJECT_FIELD_S16(0x49, 0)
/* Jrb Sliding Box */
#define /*0x0F4*/ oJrbSlidingBoxUnkF4 OBJECT_FIELD_OBJ(0x1B)
@ -871,13 +875,13 @@
#define /*0x0F4*/ oSmokeTimer OBJECT_FIELD_S32(0x1B)
/* Snowman's Bottom */
#define /*0x0F4*/ oSnowmansBottomUnkF4 OBJECT_FIELD_F32(0x1B)
#define /*0x0F4*/ oSnowmansBottomScale OBJECT_FIELD_F32(0x1B)
#define /*0x0F8*/ oSnowmansBottomUnkF8 OBJECT_FIELD_S32(0x1C)
#define /*0x1AC*/ oSnowmansBottomUnk1AC OBJECT_FIELD_S32(0x49)
// 0x1D-0x21 reserved for pathing
/* Snowman's Head */
#define /*0x0F4*/ oSnowmansHeadUnkF4 OBJECT_FIELD_S32(0x1B)
#define /*0x0F4*/ oSnowmansHeadDialogActive OBJECT_FIELD_S32(0x1B)
/* Snowman Wind Blowing */
#define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B)
@ -890,9 +894,9 @@
#define /*0x108*/ oSnufitBodyBaseScale OBJECT_FIELD_S32(0x20)
#define /*0x10C*/ oSnufitBullets OBJECT_FIELD_S32(0x21)
#define /*0x1AC*/ oSnufitXOffset OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oSnufitYOffset OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oSnufitYOffset OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oSnufitZOffset OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oSnufitBodyScale OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oSnufitBodyScale OBJECT_FIELD_S16(0x4A, 1)
/* Spindel */
#define /*0x0F4*/ oSpindelUnkF4 OBJECT_FIELD_S32(0x1B)
@ -1061,7 +1065,7 @@
#define /*0x110*/ oUnagiUnk110 OBJECT_FIELD_F32(0x22)
#define /*0x1AC*/ oUnagiUnk1AC OBJECT_FIELD_F32(0x49)
#define /*0x1B0*/ oUnagiUnk1B0 OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oUnagiUnk1B2 OBJECT_FIELD_S16(0x4A, + 1)
#define /*0x1B2*/ oUnagiUnk1B2 OBJECT_FIELD_S16(0x4A, 1)
/* Water Bomb */
#define /*0x0F8*/ oWaterBombVerticalStretch OBJECT_FIELD_F32(0x1C)
@ -1140,7 +1144,7 @@
#define /*0x10C*/ oWigglerTargetYaw OBJECT_FIELD_S32(0x21)
#define /*0x110*/ oWigglerWalkAwayFromWallTimer OBJECT_FIELD_S32(0x22)
#define /*0x1AC*/ oWigglerUnused OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oWigglerTextStatus OBJECT_FIELD_S16(0x49, + 1)
#define /*0x1AE*/ oWigglerTextStatus OBJECT_FIELD_S16(0x49, 1)
/* Lll Wood Piece */
#define /*0x0F4*/ oLllWoodPieceOscillationTimer OBJECT_FIELD_S32(0x1B)

View file

@ -1,6 +1,8 @@
#ifndef SEGMENTS_H
#define SEGMENTS_H
#include "config.h"
/*
* Memory addresses for segments. Ideally, this header file would not be
* needed, and the addresses would be defined in sm64.ld and linker-inserted
@ -20,10 +22,10 @@
#define SEG_BUFFERS 0x801C1000
#ifdef VERSION_EU
#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?
#elif defined(VERSION_SH)
#if defined(VERSION_SH) || ENABLE_RUMBLE
#define SEG_MAIN 0x80249000
#elif defined(VERSION_EU)
#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?
#else
#define SEG_MAIN 0x80246000
#endif

View file

@ -6,6 +6,8 @@
#define SEQ_BASE_ID 0x7f
#define SEQ_VARIATION 0x80
#define SEQ_MENU_GAME_OVER (SEQ_MENU_TITLE_SCREEN | SEQ_VARIATION)
enum SeqId {
SEQ_SOUND_PLAYER, // 0x00
SEQ_EVENT_CUTSCENE_COLLECT_STAR, // 0x01

View file

@ -1,7 +1,7 @@
# Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
# To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros >seq_macros.inc
// Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
// To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc
# seq commands
// seq commands
.macro seq_testchdisabled a
.byte 0x0 + \a
@ -155,7 +155,7 @@
.byte 0xff
.endm
.ifdef VERSION_SH
#ifdef VERSION_SH
.macro seq_unreservenotes
.byte 0xf0
@ -166,9 +166,9 @@
.byte \a
.endm
.else
#else
.ifdef VERSION_EU
#ifdef VERSION_EU
.macro seq_unreservenotes
.byte 0xf0
@ -179,7 +179,7 @@
.byte \a
.endm
.else
#else
.macro seq_unreservenotes
.byte 0xf1
@ -190,11 +190,11 @@
.byte \a
.endm
.endif
#endif
.endif
#endif
# chan commands
// chan commands
.macro chan_startchannel a, b
.byte 0x10 + \a
@ -462,7 +462,7 @@
var_long \a
.endm
.ifdef VERSION_SH
#ifdef VERSION_SH
.macro chan_setnotepriority a
.byte 0xe9
@ -495,7 +495,7 @@
.byte 0x90 + \a
.endm
.else
#else
.macro chan_testlayerfinished a
.byte 0x0 + \a
@ -514,7 +514,7 @@
.byte 0xa0 + \a
.endm
.ifdef VERSION_EU
#ifdef VERSION_EU
.macro chan_setnotepriority a
.byte 0xe9
@ -530,7 +530,7 @@
.byte \a
.endm
.else
#else
.macro chan_setnotepriority a
.byte 0x60 + \a
@ -545,11 +545,11 @@
.byte \a
.endm
.endif
#endif
.endif
#endif
# layer commands
// layer commands
.macro layer_note0 a, b, c, d
.byte 0x0 + \a
@ -659,7 +659,7 @@
.byte \c
.endm
# envelope commands
// envelope commands
.macro envelope_disable a
.byte 0x0, 0x0
@ -686,7 +686,7 @@
.byte \b >> 8, \b & 0xff
.endm
# other commands
// other commands
.macro var_long x
.byte (0x80 | (\x & 0x7f00) >> 8), (\x & 0xff)

View file

@ -59,7 +59,7 @@
#define INPUT_A_DOWN 0x0080
#define INPUT_IN_POISON_GAS 0x0100
#define INPUT_IN_WATER 0x0200
#define INPUT_UNKNOWN_10 0x0400
#define INPUT_STOMPED 0x0400
#define INPUT_INTERACT_OBJ_GRABBABLE 0x0800
#define INPUT_UNKNOWN_12 0x1000
#define INPUT_B_PRESSED 0x2000

View file

@ -291,18 +291,23 @@
#define SOUND_GENERAL_PLATFORM /* 0x302D8080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2D, 0x80, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION /* 0x302E2080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2E, 0x20, SOUND_DISCRETE)
#define SOUND_GENERAL_BOWSER_BOMB_EXPLOSION /* 0x312F0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2F, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
#if defined(VERSION_JP)
#define SOUND_GENERAL_COIN_SPURT /* 0x30300080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_COIN_SPURT_2 /* 0x38300080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_COIN_SPURT_EU /* 0x38302080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x20, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
#elif defined(VERSION_US)
#define SOUND_GENERAL_COIN_SPURT /* 0x38300080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
#else
#define SOUND_GENERAL_COIN_SPURT /* 0x38302080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x20, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
#endif
#define SOUND_GENERAL_EXPLOSION6 /* 0x30310000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x31, 0x00, 0) // unverified, unused
#define SOUND_GENERAL_UNK32 /* 0x30320000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x32, 0x00, 0) // unverified, unused
#define SOUND_GENERAL_BOAT_TILT1 /* 0x30344080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x34, 0x40, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_BOAT_TILT2 /* 0x30354080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x35, 0x40, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_COIN_DROP /* 0x30364080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x36, 0x40, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_UNKNOWN3_LOWPRIO /* 0x30370080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_UNKNOWN3 /* 0x30378080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_UNKNOWN3_2 /* 0x38378080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
#ifdef VERSION_JP
#define SOUND_GENERAL_UNKNOWN3 /* 0x30370080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x00, SOUND_DISCRETE) // unverified
#else
#define SOUND_GENERAL_UNKNOWN3 /* 0x38378080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
#endif
#define SOUND_GENERAL_PENDULUM_SWING /* 0x30380080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x38, 0x00, SOUND_DISCRETE)
#define SOUND_GENERAL_CHAIN_CHOMP1 /* 0x30390080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x39, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_CHAIN_CHOMP2 /* 0x303A0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3A, 0x00, SOUND_DISCRETE) // unverified
@ -319,8 +324,11 @@
#define SOUND_GENERAL_QUIET_POUND2 /* 0x30430080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x43, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_BIG_POUND /* 0x30440080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x44, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_UNK45 /* 0x30450080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x45, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_UNK46_LOWPRIO /* 0x30460080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x00, SOUND_DISCRETE) // unverified
#ifdef VERSION_JP
#define SOUND_GENERAL_UNK46 /* 0x30460080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x00, SOUND_DISCRETE) // unverified
#else
#define SOUND_GENERAL_UNK46 /* 0x30468080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x80, SOUND_DISCRETE) // unverified
#endif
#define SOUND_GENERAL_CANNON_UP /* 0x30478080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x47, 0x80, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_GRINDEL_ROLL /* 0x30480080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x48, 0x00, SOUND_DISCRETE) // unverified
#define SOUND_GENERAL_EXPLOSION7 /* 0x30490000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x49, 0x00, 0) // unverified, unused
@ -386,7 +394,7 @@
#define SOUND_ENV_UNK12 /* 0x40120000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) // unverified, unused
#define SOUND_ENV_SLIDING /* 0x40130000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) // unverified
#define SOUND_ENV_STAR /* 0x40140010 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) // unverified
#define SOUND_ENV_UNKNOWN4 /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
#define SOUND_ENV_MOVING_BIG_PLATFORM /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
#define SOUND_ENV_WATER_DRAIN /* 0x41160000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
#define SOUND_ENV_METAL_BOX_PUSH /* 0x40178000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) // unverified
#define SOUND_ENV_SINK_QUICKSAND /* 0x40188000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) // unverified
@ -412,7 +420,7 @@
#define SOUND_OBJ_MRI_DEATH /* 0x50140080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x14, 0x00, SOUND_DISCRETE)
#define SOUND_OBJ_POUNDING1 /* 0x50155080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x50, SOUND_DISCRETE) // unverified
#define SOUND_OBJ_POUNDING1_HIGHPRIO /* 0x50158080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x80, SOUND_DISCRETE) // unverified
#define SOUND_OBJ_WHOMP_LOWPRIO /* 0x50166080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x60, SOUND_DISCRETE)
#define SOUND_OBJ_WHOMP /* 0x50166080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x60, SOUND_DISCRETE)
#define SOUND_OBJ_KING_BOBOMB /* 0x50168080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x80, SOUND_DISCRETE)
#define SOUND_OBJ_BULLY_METAL /* 0x50178080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x17, 0x80, SOUND_DISCRETE) // unverified
#define SOUND_OBJ_BULLY_EXPLODE /* 0x5018A080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_DISCRETE) // unverified
@ -516,8 +524,11 @@
/* Menu Sound Effects */
#define SOUND_MENU_CHANGE_SELECT /* 0x7000F880 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x00, 0xF8, SOUND_DISCRETE)
#define SOUND_MENU_REVERSE_PAUSE /* 0x70010000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x01, 0x00, 0) // unverified, unused
#ifdef VERSION_JP
#define SOUND_MENU_PAUSE /* 0x7002F080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xF0, SOUND_DISCRETE)
#define SOUND_MENU_PAUSE_HIGHPRIO /* 0x7002FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xFF, SOUND_DISCRETE)
#else
#define SOUND_MENU_PAUSE /* 0x7002FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xFF, SOUND_DISCRETE)
#endif
#define SOUND_MENU_PAUSE_2 /* 0x7003FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x03, 0xFF, SOUND_DISCRETE)
#define SOUND_MENU_MESSAGE_APPEAR /* 0x70040080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x04, 0x00, SOUND_DISCRETE)
#define SOUND_MENU_MESSAGE_DISAPPEAR /* 0x70050080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x05, 0x00, SOUND_DISCRETE)

View file

@ -12,8 +12,7 @@
#define SPTYPE_UNKNOWN 3 // object is 14-bytes long, has 3 extra shorts that get converted to floats.
#define SPTYPE_DEF_PARAM_AND_YROT 4 // object is 10-bytes long, has y-rotation and uses the default param
struct SpecialPreset
{
struct SpecialPreset {
/*00*/ u8 preset_id;
/*01*/ u8 type; // Determines whether object is 8, 10, 12 or 14 bytes long.
/*02*/ u8 defParam; // Default parameter, only used when type is SPTYPE_DEF_PARAM_AND_YROT
@ -23,8 +22,7 @@ struct SpecialPreset
// Some Models ID's are missing their names because they are probably unused
static struct SpecialPreset SpecialObjectPresets[] =
{
static struct SpecialPreset SpecialObjectPresets[] = {
{0x00, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_NONE, NULL},
{0x01, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_YELLOW_COIN, bhvYellowCoin},
{0x02, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_YELLOW_COIN, bhvYellowCoin},

View file

@ -43,13 +43,13 @@
#define SURFACE_HARD_VERY_SLIPPERY 0x0036 // Hard and very slippery (Always has fall damage)
#define SURFACE_HARD_NOT_SLIPPERY 0x0037 // Hard and Non-slippery (Always has fall damage)
#define SURFACE_VERTICAL_WIND 0x0038 // Death at bottom with vertical wind
#define SURFACE_BOSS_FIGHT_CAMERA 0x0065 // Wide camera for BOB and WF bosses
#define SURFACE_BOSS_FIGHT_CAMERA 0x0065 // Wide camera for BoB and WF bosses
#define SURFACE_CAMERA_FREE_ROAM 0x0066 // Free roam camera for THI and TTC
#define SURFACE_THI3_WALLKICK 0x0068 // Surface where there's a wall kick section in THI 3rd area, has no action defined
#define SURFACE_CAMERA_8_DIR 0x0069 // Surface that enables far camera for platforms, used in THI
#define SURFACE_CAMERA_MIDDLE 0x006E // Surface camera that returns to the middle, used on the 4 pillars of SSL
#define SURFACE_CAMERA_ROTATE_RIGHT 0x006F // Surface camera that rotates to the right (Bowser 1 & THI)
#define SURFACE_CAMERA_ROTATE_LEFT 0x0070 // Surface camera that rotates to the left (BOB & TTM)
#define SURFACE_CAMERA_ROTATE_LEFT 0x0070 // Surface camera that rotates to the left (BoB & TTM)
#define SURFACE_CAMERA_BOUNDARY 0x0072 // Intangible Area, only used to restrict camera movement
#define SURFACE_NOISE_VERY_SLIPPERY_73 0x0073 // Very slippery floor with noise, unused
#define SURFACE_NOISE_VERY_SLIPPERY_74 0x0074 // Very slippery floor with noise, unused
@ -60,9 +60,9 @@
#define SURFACE_NO_CAM_COL_SLIPPERY 0x0079 // Surface with no cam collision flag, slippery with noise (CCM, PSS and TTM slides)
#define SURFACE_SWITCH 0x007A // Surface with no cam collision flag, non-slippery with noise, used by switches and Dorrie
#define SURFACE_VANISH_CAP_WALLS 0x007B // Vanish cap walls, pass through them with Vanish Cap
#define SURFACE_PAINTING_WOBBLE_A6 0x00A6 // Painting wobble (BOB Left)
#define SURFACE_PAINTING_WOBBLE_A7 0x00A7 // Painting wobble (BOB Middle)
#define SURFACE_PAINTING_WOBBLE_A8 0x00A8 // Painting wobble (BOB Right)
#define SURFACE_PAINTING_WOBBLE_A6 0x00A6 // Painting wobble (BoB Left)
#define SURFACE_PAINTING_WOBBLE_A7 0x00A7 // Painting wobble (BoB Middle)
#define SURFACE_PAINTING_WOBBLE_A8 0x00A8 // Painting wobble (BoB Right)
#define SURFACE_PAINTING_WOBBLE_A9 0x00A9 // Painting wobble (CCM Left)
#define SURFACE_PAINTING_WOBBLE_AA 0x00AA // Painting wobble (CCM Middle)
#define SURFACE_PAINTING_WOBBLE_AB 0x00AB // Painting wobble (CCM Right)
@ -105,9 +105,9 @@
#define SURFACE_PAINTING_WOBBLE_D0 0x00D0 // Painting wobble (HMC & COTMC - Left), makes the painting wobble if touched
#define SURFACE_PAINTING_WOBBLE_D1 0x00D1 // Painting wobble (Unused, HMC & COTMC - Middle)
#define SURFACE_PAINTING_WOBBLE_D2 0x00D2 // Painting wobble (Unused, HMC & COTMC - Right)
#define SURFACE_PAINTING_WARP_D3 0x00D3 // Painting warp (BOB Left)
#define SURFACE_PAINTING_WARP_D4 0x00D4 // Painting warp (BOB Middle)
#define SURFACE_PAINTING_WARP_D5 0x00D5 // Painting warp (BOB Right)
#define SURFACE_PAINTING_WARP_D3 0x00D3 // Painting warp (BoB Left)
#define SURFACE_PAINTING_WARP_D4 0x00D4 // Painting warp (BoB Middle)
#define SURFACE_PAINTING_WARP_D5 0x00D5 // Painting warp (BoB Right)
#define SURFACE_PAINTING_WARP_D6 0x00D6 // Painting warp (CCM Left)
#define SURFACE_PAINTING_WARP_D7 0x00D7 // Painting warp (CCM Middle)
#define SURFACE_PAINTING_WARP_D8 0x00D8 // Painting warp (CCM Right)

View file

@ -6,6 +6,7 @@
#include <ultra64.h>
#include "macros.h"
#include "config.h"
// Certain functions are marked as having return values, but do not
@ -19,8 +20,7 @@
#endif
struct Controller
{
struct Controller {
/*0x00*/ s16 rawStickX; //
/*0x02*/ s16 rawStickY; //
/*0x04*/ float stickX; // [-64, 64] positive is right
@ -30,8 +30,8 @@ struct Controller
/*0x12*/ u16 buttonPressed;
/*0x14*/ OSContStatus *statusData;
/*0x18*/ OSContPad *controllerData;
#ifdef VERSION_SH
/*0x1C*/ int port;
#if ENABLE_RUMBLE
/*0x1C*/ s32 port;
#endif
};
@ -62,16 +62,14 @@ enum SpTaskState {
SPTASK_STATE_FINISHED_DP
};
struct SPTask
{
struct SPTask {
/*0x00*/ OSTask task;
/*0x40*/ OSMesgQueue *msgqueue;
/*0x44*/ OSMesg msg;
/*0x48*/ enum SpTaskState state;
}; // size = 0x4C, align = 0x8
struct VblankHandler
{
struct VblankHandler {
OSMesgQueue *queue;
OSMesg msg;
};
@ -99,8 +97,7 @@ struct Animation {
#define ANIMINDEX_NUMPARTS(animindex) (sizeof(animindex) / sizeof(u16) / 6 - 1)
struct GraphNode
{
struct GraphNode {
/*0x00*/ s16 type; // structure type
/*0x02*/ s16 flags; // hi = drawing layer, lo = rendering modes
/*0x04*/ struct GraphNode *prev;
@ -109,8 +106,7 @@ struct GraphNode
/*0x10*/ struct GraphNode *children;
};
struct AnimInfo
{
struct AnimInfo {
/*0x00 0x38*/ s16 animID;
/*0x02 0x3A*/ s16 animYTrans;
/*0x04 0x3C*/ struct Animation *curAnim;
@ -120,8 +116,7 @@ struct AnimInfo
/*0x10 0x48*/ s32 animAccel;
};
struct GraphNodeObject
{
struct GraphNodeObject {
/*0x00*/ struct GraphNode node;
/*0x14*/ struct GraphNode *sharedChild;
/*0x18*/ s8 areaIndex;
@ -135,8 +130,7 @@ struct GraphNodeObject
/*0x54*/ Vec3f cameraToObject;
};
struct ObjectNode
{
struct ObjectNode {
struct GraphNodeObject gfx;
struct ObjectNode *next;
struct ObjectNode *prev;
@ -145,8 +139,7 @@ struct ObjectNode
// NOTE: Since ObjectNode is the first member of Object, it is difficult to determine
// whether some of these pointers point to ObjectNode or Object.
struct Object
{
struct Object {
/*0x000*/ struct ObjectNode header;
/*0x068*/ struct Object *parentObj;
/*0x06C*/ struct Object *prevObj;
@ -155,8 +148,7 @@ struct Object
/*0x076*/ s16 numCollidedObjs;
/*0x078*/ struct Object *collidedObjs[4];
/*0x088*/
union
{
union {
// Object fields. See object_fields.h.
u32 asU32[0x50];
s32 asS32[0x50];
@ -206,8 +198,7 @@ struct Object
/*0x25C*/ void *respawnInfo;
};
struct ObjectHitbox
{
struct ObjectHitbox {
/*0x00*/ u32 interactType;
/*0x04*/ u8 downOffset;
/*0x05*/ s8 damageOrCoinValue;
@ -219,14 +210,12 @@ struct ObjectHitbox
/*0x0E*/ s16 hurtboxHeight;
};
struct Waypoint
{
struct Waypoint {
s16 flags;
Vec3s pos;
};
struct Surface
{
struct Surface {
/*0x00*/ s16 type;
/*0x02*/ s16 force;
/*0x04*/ s8 flags;
@ -245,8 +234,7 @@ struct Surface
/*0x2C*/ struct Object *object;
};
struct MarioBodyState
{
struct MarioBodyState {
/*0x00*/ u32 action;
/*0x04*/ s8 capState; /// see MarioCapGSCId
/*0x05*/ s8 eyeState;
@ -258,32 +246,10 @@ struct MarioBodyState
/*0x0C*/ Vec3s torsoAngle;
/*0x12*/ Vec3s headAngle;
/*0x18*/ Vec3f heldObjLastPosition; /// also known as HOLP
u8 padding[4];
u8 filler[4];
};
struct OffsetSizePair
{
u32 offset;
u32 size;
};
struct MarioAnimDmaRelatedThing
{
u32 count;
u8 *srcAddr;
struct OffsetSizePair anim[1]; // dynamic size
};
struct MarioAnimation
{
struct MarioAnimDmaRelatedThing *animDmaTable;
u8 *currentAnimAddr;
struct Animation *targetAnim;
u8 padding[4];
};
struct MarioState
{
struct MarioState {
/*0x00*/ u16 unk00;
/*0x02*/ u16 input;
/*0x04*/ u32 flags;
@ -327,7 +293,7 @@ struct MarioState
/*0x94*/ struct PlayerCameraState *statusForCamera;
/*0x98*/ struct MarioBodyState *marioBodyState;
/*0x9C*/ struct Controller *controller;
/*0xA0*/ struct MarioAnimation *animation;
/*0xA0*/ struct DmaHandlerList *animList;
/*0xA4*/ u32 collidedObjInteractTypes;
/*0xA8*/ s16 numCoins;
/*0xAA*/ s16 numStars;

View file

@ -3742,7 +3742,7 @@ const Collision bbh_seg7_collision_level[] = {
COL_TRI(12, 14, 15),
COL_TRI_STOP(),
COL_SPECIAL_INIT(26),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 1434, -204, 4710, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 1434, -204, 4710, /*yaw*/ 128), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_haunted_door, /*pos*/ 0, -2457, 2099, /*yaw*/ 128),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_haunted_door, /*pos*/ -1996, -2457, 205, /*yaw*/ 192),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_haunted_door, /*pos*/ 1587, -2457, 205, /*yaw*/ 64),

View file

@ -1324,7 +1324,7 @@ const Collision bitdw_seg7_collision_level[] = {
COL_TRI(485, 486, 489),
COL_TRI_STOP(),
COL_SPECIAL_INIT(23),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7443, -3153, 3886, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7443, -3153, 3886, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -6368, -3972, 3883, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ -3245, -3358, 3893, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_05, /*pos*/ -2405, -1228, 1740, /*yaw*/ 0),

View file

@ -2053,7 +2053,7 @@ const Collision bitfs_seg7_collision_level[] = {
COL_TRI(801, 802, 509),
COL_TRI_STOP(),
COL_SPECIAL_INIT(24),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7577, -2764, 0, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7577, -2764, 0, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -5938, -3071, 0, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ -5488, -1535, 41, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ 4342, 1741, 41, /*yaw*/ 0),

View file

@ -2400,7 +2400,7 @@ const Collision bits_seg7_collision_level[] = {
COL_TRI(135, 216, 214),
COL_TRI_STOP(),
COL_SPECIAL_INIT(22),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7039, -4812, 4, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7039, -4812, 4, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -4505, -5119, 0, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ -2291, -2073, -762, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_05, /*pos*/ 3891, -3276, -705, /*yaw*/ 0),

View file

@ -77,7 +77,7 @@ const Collision bowser_1_seg7_collision_level[] = {
COL_TRI(25, 27, 28),
COL_TRI_STOP(),
COL_SPECIAL_INIT(22),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 1843, 0, /*yaw*/ 1423), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 1843, 0, /*yaw*/ 1423), // unused, probably an early way to set initial position
SPECIAL_OBJECT(/*preset*/ special_mine, /*pos*/ 2949, 589, 0),
SPECIAL_OBJECT(/*preset*/ special_mine, /*pos*/ 0, 589, -2949),
SPECIAL_OBJECT(/*preset*/ special_mine, /*pos*/ 0, 589, 2949),

View file

@ -19,7 +19,7 @@ const Collision bowser_2_seg7_collision_lava[] = {
COL_TRI(0, 5, 7),
COL_TRI_STOP(),
COL_SPECIAL_INIT(2),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 1229, 0, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 1229, 0, /*yaw*/ 128), // unused, probably an early way to set initial position
SPECIAL_OBJECT(/*preset*/ special_bowser, /*pos*/ -8, 1229, -1418),
COL_END(),
};

View file

@ -68,7 +68,7 @@ const Collision bowser_3_seg7_collision_level[] = {
COL_TRI(0, 2, 3),
COL_TRI_STOP(),
COL_SPECIAL_INIT(7),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 307, 0, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 307, 0, /*yaw*/ 128), // unused, probably an early way to set initial position
SPECIAL_OBJECT(/*preset*/ special_bowser, /*pos*/ 13, 307, -1024),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -3362, -204, 1121, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 0, -204, 3584, /*yaw*/ 0),

View file

@ -847,7 +847,7 @@ const Collision castle_courtyard_seg7_collision[] = {
COL_TRI(136, 45, 133),
COL_TRI_STOP(),
COL_SPECIAL_INIT(19),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 15, 0, 202, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 15, 0, 202, /*yaw*/ 128), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 0, 2048, 2662, /*yaw*/ 0),
SPECIAL_OBJECT(/*preset*/ special_spiky_tree, /*pos*/ 2272, -214, -1432),
SPECIAL_OBJECT(/*preset*/ special_spiky_tree, /*pos*/ 818, 10, 203),

View file

@ -3741,7 +3741,7 @@ const Collision inside_castle_seg7_area_1_collision[] = {
COL_TRI(77, 79, 80),
COL_TRI_STOP(),
COL_SPECIAL_INIT(11),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -1023, 0, 1152, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -1023, 0, 1152, /*yaw*/ 128), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_wooden_door, /*pos*/ -271, 0, -824, /*yaw*/ 32),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_wooden_door, /*pos*/ -1775, 0, -824, /*yaw*/ 224),
SPECIAL_OBJECT_WITH_YAW_AND_PARAM(/*preset*/ special_castle_door_warp, /*pos*/ -1100, 0, 2202, /*yaw*/ 0, /*behParam2*/ 0),

View file

@ -1747,7 +1747,7 @@ const Collision ccm_seg7_area_1_collision[] = {
COL_TRI(336, 609, 616),
COL_TRI_STOP(),
COL_SPECIAL_INIT(21),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -1512, 2560, -2305, /*yaw*/ 100), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -1512, 2560, -2305, /*yaw*/ 100), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -409, 2765, -1637, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ 2355, -4095, 4096, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_05, /*pos*/ -4210, -1446, 1874, /*yaw*/ 0),

View file

@ -1873,7 +1873,7 @@ const Collision ccm_seg7_area_2_collision[] = {
COL_TRI(19, 23, 24),
COL_TRI_STOP(),
COL_SPECIAL_INIT(2),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -5836, 7465, -6143, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -5836, 7465, -6143, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW_AND_PARAM(/*preset*/ special_wooden_door_warp, /*pos*/ -7628, -5836, -6988, /*yaw*/ 64, /*behParam2*/ 20),
COL_END(),
};

View file

@ -990,7 +990,7 @@ const Collision cotmc_seg7_collision_level[] = {
COL_TRI(208, 206, 207),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -4185, 20, -47, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -4185, 20, -47, /*yaw*/ 64), // unused, probably an early way to set initial position
COL_WATER_BOX_INIT(1),
COL_WATER_BOX(0, -1535, -7679, 1536, 3389, 0),
COL_END(),

View file

@ -3599,7 +3599,7 @@ const Collision hmc_seg7_collision_level[] = {
COL_TRI(55, 58, 56),
COL_TRI_STOP(),
COL_SPECIAL_INIT(13),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7601, 2253, 7630, /*yaw*/ 96), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7601, 2253, 7630, /*yaw*/ 96), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_wooden_door, /*pos*/ 922, -4689, 2330, /*yaw*/ 192),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_wooden_door, /*pos*/ -3586, 1536, 647, /*yaw*/ 19),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_wooden_door, /*pos*/ 5911, -204, 870, /*yaw*/ 0),

View file

@ -8,7 +8,7 @@
#include "game/area.h"
#include "game/level_update.h"
#include "menu/level_select_menu.h"
#include "menu/title_screen.h"
#include "levels/scripts.h"
#include "levels/menu/header.h"
@ -33,7 +33,7 @@ const LevelScript level_intro_splash_screen[] = {
// Start animation
LOAD_AREA(/*area*/ 1),
CALL(/*arg*/ 0, /*func*/ lvl_intro_update),
CALL(/*arg*/ LVL_INTRO_PLAY_ITS_A_ME_MARIO, /*func*/ lvl_intro_update),
SLEEP(/*frames*/ 75),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 16),
@ -59,10 +59,10 @@ const LevelScript level_intro_mario_head_regular[] = {
SLEEP(/*frames*/ 2),
BLACKOUT(/*active*/ FALSE),
LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0002),
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 20),
CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update),
CALL_LOOP(/*arg*/ LVL_INTRO_REGULAR, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
JUMP(script_intro_L4),
@ -84,10 +84,10 @@ const LevelScript level_intro_mario_head_dizzy[] = {
SLEEP(/*frames*/ 2),
BLACKOUT(/*active*/ FALSE),
LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0082),
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_GAME_OVER),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 20),
CALL_LOOP(/*arg*/ 2, /*func*/ lvl_intro_update),
CALL_LOOP(/*arg*/ LVL_INTRO_GAME_OVER, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
JUMP(script_intro_L4),
@ -106,10 +106,10 @@ const LevelScript level_intro_entry_4[] = {
FREE_LEVEL_POOL(),
LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0002),
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
SLEEP(/*frames*/ 16),
CALL_LOOP(/*arg*/ 3, /*func*/ lvl_intro_update),
CALL_LOOP(/*arg*/ LVL_INTRO_LEVEL_SELECT, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_intro_L5),
JUMP(script_intro_L3),
};

View file

@ -872,7 +872,7 @@ const Collision jrb_seg7_area_1_collision[] = {
COL_TRI(7, 5, 0),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -6750, 1126, 1482, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -6750, 1126, 1482, /*yaw*/ 64), // unused, probably an early way to set initial position
COL_WATER_BOX_INIT(3),
COL_WATER_BOX(0, -6304, -669, 7992, 7814, 1024),
COL_WATER_BOX(1, 4433, -4253, 5969, -669, -3016),

View file

@ -35,8 +35,8 @@ const struct MovtexQuadCollection jrb_movtex_water[] = {
{-1, NULL},
};
// 0x0700D2E4, appears if you enter the course the first time, then it disappears when you grab the first star
static Movtex jrb_movtex_intial_mist_data[] = {
// 0x0700D2E4, appears if you enter the course the first time, then it disappears when you collect the "Plunder in the Sunken Ship" star
static Movtex jrb_movtex_initial_mist_data[] = {
MOV_TEX_INIT_LOAD( 1),
MOV_TEX_ROT_SPEED( 20),
MOV_TEX_ROT_SCALE( 10),
@ -51,7 +51,7 @@ static Movtex jrb_movtex_intial_mist_data[] = {
};
// 0x0700D304
const struct MovtexQuadCollection jrb_movtex_intial_mist[] = {
{51, jrb_movtex_intial_mist_data},
const struct MovtexQuadCollection jrb_movtex_initial_mist[] = {
{51, jrb_movtex_initial_mist_data},
{-1, NULL},
};

View file

@ -584,7 +584,7 @@ const Collision jrb_seg7_area_2_collision[] = {
COL_TRI(29, 79, 80),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 866, 798, -1248, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 866, 798, -1248, /*yaw*/ 128), // unused, probably an early way to set initial position
COL_WATER_BOX_INIT(1),
COL_WATER_BOX(0, -4095, -4095, 4096, 4096, 2765),
COL_END(),

View file

@ -1,5 +1,5 @@
// 0x0701137C
static Movtex jrb_movtex_sinked_boat_water_data[] = {
static Movtex jrb_movtex_sunken_ship_water_data[] = {
MOV_TEX_INIT_LOAD( 1),
MOV_TEX_ROT_SPEED( 20),
MOV_TEX_ROT_SCALE( 6),
@ -14,7 +14,7 @@ static Movtex jrb_movtex_sinked_boat_water_data[] = {
};
// 0x0701139C
const struct MovtexQuadCollection jrb_movtex_sinked_boat_water[] = {
{0, jrb_movtex_sinked_boat_water_data},
const struct MovtexQuadCollection jrb_movtex_sunken_ship_water[] = {
{0, jrb_movtex_sunken_ship_water_data},
{-1, NULL},
};

View file

@ -52,13 +52,13 @@ extern const Collision jrb_seg7_collision_0700D1DC[];
extern const Trajectory jrb_seg7_trajectory_unagi_1[];
extern const Trajectory jrb_seg7_trajectory_unagi_2[];
extern const struct MovtexQuadCollection jrb_movtex_water[];
extern const struct MovtexQuadCollection jrb_movtex_intial_mist[];
extern const struct MovtexQuadCollection jrb_movtex_initial_mist[];
extern const Gfx jrb_seg7_dl_0700EF00[];
extern const Gfx jrb_seg7_dl_0700FE48[];
extern const Gfx jrb_seg7_dl_07010548[];
extern const Collision jrb_seg7_area_2_collision[];
extern const MacroObject jrb_seg7_area_2_macro_objs[];
extern const struct MovtexQuadCollection jrb_movtex_sinked_boat_water[];
extern const struct MovtexQuadCollection jrb_movtex_sunken_ship_water[];
// script
extern const LevelScript level_jrb_entry[];

View file

@ -1376,7 +1376,7 @@ const Collision lll_seg7_area_1_collision[] = {
COL_TRI(10, 52, 3),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -3839, 154, 6272, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -3839, 154, 6272, /*yaw*/ 64), // unused, probably an early way to set initial position
COL_END(),
#else
COL_INIT(),
@ -2730,7 +2730,7 @@ const Collision lll_seg7_area_1_collision[] = {
COL_TRI(3, 52, 71),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -3839, 154, 6272, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -3839, 154, 6272, /*yaw*/ 64), // unused, probably an early way to set initial position
COL_END(),
#endif
};

View file

@ -1549,7 +1549,7 @@ const Collision lll_seg7_area_2_collision[] = {
COL_TRI(324, 451, 450),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -955, 103, -1029, /*yaw*/ 84), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -955, 103, -1029, /*yaw*/ 84), // unused, probably an early way to set initial position
COL_WATER_BOX_INIT(1),
COL_WATER_BOX(10, -3071, -3071, 3072, 3072, 20),
COL_END(),

View file

@ -43,7 +43,7 @@ const LevelScript level_main_menu_entry_1[] = {
FREE_LEVEL_POOL(),
LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0021),
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_FILE_SELECT),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),

View file

@ -2694,7 +2694,7 @@ const Collision rr_seg7_collision_level[] = {
COL_TRI_SPECIAL(31, 46, 45, 0x140),
COL_TRI_STOP(),
COL_SPECIAL_INIT(23),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 2599, -1833, 2071, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 2599, -1833, 2071, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 1902, -1833, 1063, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ 3803, -1833, 2036, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_05, /*pos*/ -4888, -2550, 5847, /*yaw*/ 0),
@ -5419,7 +5419,7 @@ const Collision rr_seg7_collision_level[] = {
COL_TRI_SPECIAL(35, 46, 47, 0x100),
COL_TRI_STOP(),
COL_SPECIAL_INIT(23),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 2599, -1833, 2071, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 2599, -1833, 2071, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 1902, -1833, 1063, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ 3803, -1833, 2036, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_05, /*pos*/ -4888, -2550, 5847, /*yaw*/ 0),

View file

@ -105,7 +105,7 @@ const Collision sa_seg7_collision[] = {
COL_TRI(30, 47, 12),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, -1535, 0, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, -1535, 0, /*yaw*/ 64), // unused, probably an early way to set initial position
COL_WATER_BOX_INIT(1),
COL_WATER_BOX(0, -3173, -3173, 3174, 3174, 102),
COL_END(),

View file

@ -171,7 +171,7 @@ static const LevelScript script_exec_ ## folder [] = { \
const LevelScript script_func_global_1[] = {
LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN_SWITCH, blue_coin_switch_geo),
LOAD_MODEL_FROM_GEO(MODEL_AMP, amp_geo),
LOAD_MODEL_FROM_GEO(MODEL_AMP, dAmpGeo),
LOAD_MODEL_FROM_GEO(MODEL_PURPLE_SWITCH, purple_switch_geo),
LOAD_MODEL_FROM_GEO(MODEL_CHECKERBOARD_PLATFORM, checkerboard_platform_geo),
LOAD_MODEL_FROM_GEO(MODEL_BREAKABLE_BOX, breakable_box_geo),
@ -297,7 +297,7 @@ const LevelScript script_func_global_13[] = {
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_SMOKE, bowser_impact_smoke_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_FLAMES, bowser_flames_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_WAVE, invisible_bowser_accessory_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER2, bowser2_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_NO_SHADOW, bowser_geo_no_shadow),
RETURN(),
};

View file

@ -1423,7 +1423,7 @@ const Collision sl_seg7_area_1_collision[] = {
COL_TRI(510, 327, 321),
COL_TRI_STOP(),
COL_SPECIAL_INIT(10),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 5541, 1024, 443, /*yaw*/ 192), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 5541, 1024, 443, /*yaw*/ 192), // unused, probably an early way to set initial position
SPECIAL_OBJECT(/*preset*/ special_snow_tree, /*pos*/ 5395, 1054, -5443),
SPECIAL_OBJECT(/*preset*/ special_snow_tree, /*pos*/ 0, 4864, 0),
SPECIAL_OBJECT(/*preset*/ special_snow_tree, /*pos*/ 5666, 1024, -3341),

View file

@ -407,7 +407,7 @@ const Collision sl_seg7_area_2_collision[] = {
COL_TRI(146, 187, 145),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 0, 2867, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 0, 2867, /*yaw*/ 128), // unused, probably an early way to set initial position
COL_END(),
};

View file

@ -1554,7 +1554,7 @@ const Collision ssl_seg7_area_1_collision[] = {
COL_TRI(482, 483, 484),
COL_TRI_STOP(),
COL_SPECIAL_INIT(7),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 653, 38, 6566, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 653, 38, 6566, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 5760, 0, 5751, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -3583, 0, 2935, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -511, 0, 2935, /*yaw*/ 0),

View file

@ -2655,7 +2655,7 @@ const Collision ssl_seg7_area_2_collision[] = {
COL_TRI(359, 420, 419),
COL_TRI_STOP(),
COL_SPECIAL_INIT(4),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 0, 6451, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 0, 0, 6451, /*yaw*/ 128), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ 1741, -101, 1843, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ 0, -101, 528, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_04, /*pos*/ -1740, -101, 1843, /*yaw*/ 0),

View file

@ -1256,7 +1256,7 @@ const Collision thi_seg7_area_1_collision[] = {
COL_TRI(412, 320, 319),
COL_TRI_STOP(),
COL_SPECIAL_INIT(2),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7372, -2969, 7373, /*yaw*/ 106), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -7372, -2969, 7373, /*yaw*/ 106), // unused, probably an early way to set initial position
SPECIAL_OBJECT(/*preset*/ special_bubble_tree, /*pos*/ 4813, -511, 2254),
COL_WATER_BOX_INIT(3),
COL_WATER_BOX(0, -8191, -8191, -5119, 6246, -3071),

View file

@ -970,7 +970,7 @@ const Collision thi_seg7_area_2_collision[] = {
COL_TRI(244, 25, 148),
COL_TRI_STOP(),
COL_SPECIAL_INIT(3),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -2211, -890, 2212, /*yaw*/ 106), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -2211, -890, 2212, /*yaw*/ 106), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -40, -767, -4494, /*yaw*/ 0),
SPECIAL_OBJECT(/*preset*/ special_bubble_tree, /*pos*/ 1444, -153, 676),
COL_WATER_BOX_INIT(3),

View file

@ -587,7 +587,7 @@ const Collision totwc_seg7_collision[] = {
COL_TRI(81, 97, 67),
COL_TRI_STOP(),
COL_SPECIAL_INIT(23),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -4095, 2935, 0, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -4095, 2935, 0, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 4608, -357, -511, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -4095, 666, 512, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -5631, -1893, 6144, /*yaw*/ 0),

View file

@ -1890,6 +1890,6 @@ const Collision ttc_seg7_collision_level[] = {
COL_TRI(526, 625, 624),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 1046, -4822, -266, /*yaw*/ 192), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 1046, -4822, -266, /*yaw*/ 192), // unused, probably an early way to set initial position
COL_END(),
};

View file

@ -2293,7 +2293,7 @@ const Collision ttm_seg7_area_1_collision[] = {
COL_TRI(516, 430, 819),
COL_TRI_STOP(),
COL_SPECIAL_INIT(29),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 102, -4332, 5734, /*yaw*/ 32), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 102, -4332, 5734, /*yaw*/ 32), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ -3276, -4423, -3685, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 7293, -5056, 1429, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_03, /*pos*/ 4938, -5568, 5115, /*yaw*/ 0),

View file

@ -844,6 +844,6 @@ const Collision vcutm_seg7_collision[] = {
COL_TRI(40, 27, 30),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -6143, 5734, -6143, /*yaw*/ 0), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -6143, 5734, -6143, /*yaw*/ 0), // unused, probably an early way to set initial position
COL_END(),
};

View file

@ -1345,7 +1345,7 @@ const Collision wdw_seg7_area_1_collision[] = {
COL_TRI(85, 159, 157),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 3395, 1280, 384, /*yaw*/ 128), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 3395, 1280, 384, /*yaw*/ 128), // unused, probably an early way to set initial position
COL_WATER_BOX_INIT(1),
COL_WATER_BOX(0, -3839, -3839, 4608, 4608, 31),
COL_END(),

View file

@ -1075,7 +1075,7 @@ const Collision wf_seg7_collision_070102D8[] = {
COL_TRI(4, 7, 5),
COL_TRI_STOP(),
COL_SPECIAL_INIT(6),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 2560, 256, 5120, /*yaw*/ 64), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ 2560, 256, 5120, /*yaw*/ 64), // unused, probably an early way to set initial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_0E, /*pos*/ 3584, 154, 4864, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_0F, /*pos*/ 4608, 256, 1792, /*yaw*/ 0),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_level_geo_11, /*pos*/ -2499, 1792, -261, /*yaw*/ 0),

View file

@ -2055,6 +2055,6 @@ const Collision wmotr_seg7_collision[] = {
COL_TRI(288, 286, 289),
COL_TRI_STOP(),
COL_SPECIAL_INIT(1),
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -67, 1669, -16, /*yaw*/ 192), // unused, probably an early way to set intial position
SPECIAL_OBJECT_WITH_YAW(/*preset*/ special_null_start, /*pos*/ -67, 1669, -16, /*yaw*/ 192), // unused, probably an early way to set initial position
COL_END(),
};

View file

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"

View file

@ -1,21 +1,14 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set noat // allow manual use of $at
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
.ifdef VERSION_EU
.set VERSION_EU_SH, 1
.endif
.ifdef VERSION_SH
.set VERSION_EU_SH, 1
.endif
#include "macros.inc"
.section .text, "ax"
.ifdef AVOID_UB
#ifdef AVOID_UB
.set D_80334890, D_80334890_fix
.endif
#endif
glabel __osExceptionPreamble
lui $k0, %hi(__osException)
@ -37,7 +30,7 @@ glabel __osException
sd $t2, 0x68($k0)
sw $zero, 0x18($k0)
mfc0 $t0, $13
.ifndef VERSION_EU_SH
#if !defined(VERSION_EU) && !defined(VERSION_SH)
andi $t1, $t0, 0x7c
li $t2, 0
bne $t1, $t2, .L80326750
@ -62,11 +55,11 @@ glabel __osException
lui $at, %hi(D_80334934)
sw $zero, %lo(D_80334934)($at)
lui $at, %hi(D_80334938)
.endif
#endif
move $t0, $k0
.ifndef VERSION_EU_SH
#if !defined(VERSION_EU) && !defined(VERSION_SH)
sw $zero, %lo(D_80334938)($at)
.endif
#endif
lui $k0, %hi(D_80334890 + 0x10)
lw $k0, %lo(D_80334890 + 0x10)($k0)
ld $t1, 0x20($t0)
@ -79,17 +72,17 @@ glabel __osException
sd $t1, 0x60($k0)
ld $t1, 0x68($t0)
sd $t1, 0x68($k0)
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
lw $k1, 0x118($k0)
.else
#else
.L80326794:
.endif
#endif
mflo $t0
sd $t0, 0x108($k0)
mfhi $t0
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
andi $t1, $k1, 0xff00
.endif
#endif
sd $v0, 0x28($k0)
sd $v1, 0x30($k0)
sd $a0, 0x38($k0)
@ -115,31 +108,31 @@ glabel __osException
sd $sp, 0xf0($k0)
sd $fp, 0xf8($k0)
sd $ra, 0x100($k0)
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
beqz $t1, .L802F3A18
sd $t0, 0x110($k0)
lui $t0, %hi(__OSGlobalIntMask)
addiu $t0, %lo(__OSGlobalIntMask)
lw $t0, ($t0)
li $at, -1
.ifdef VERSION_EU
#ifdef VERSION_EU
xor $t0, $t0, $at
.else
#else
xor $t2, $t0, $at
.endif
#endif
lui $at, (0xFFFF00FF >> 16)
.ifdef VERSION_EU
#ifdef VERSION_EU
andi $t0, $t0, 0xFF00
.else
#else
andi $t2, $t2, 0xFF00
.endif
#endif
ori $at, (0xFFFF00FF & 0xFFFF)
.ifdef VERSION_EU
#ifdef VERSION_EU
or $t1, $t1, $t0
and $k1, $k1, $at
or $k1, $k1, $t1
sw $k1, 0x118($k0)
.else
#else
or $t4, $t1, $t2
and $t3, $k1, $at
andi $t0, $t0, 0xFF00
@ -148,7 +141,7 @@ glabel __osException
and $k1, $k1, $at
sw $t3, 0x118($k0)
or $k1, $k1, $t1
.endif
#endif
.L802F3A18:
lui $t1, %hi(MI_INTR_MASK_REG)
@ -167,9 +160,9 @@ glabel __osException
or $t1, $t1, $t0
.L802F3A50:
sw $t1, 0x128($k0)
.else
#else
sd $t0, 0x110($k0)
.endif
#endif
mfc0 $t0, $14
sw $t0, 0x11c($k0)
lw $t0, 0x18($k0)
@ -197,14 +190,14 @@ glabel __osException
.L80326868:
mfc0 $t0, $13
sw $t0, 0x120($k0)
.ifndef VERSION_EU_SH
#if !defined(VERSION_EU) && !defined(VERSION_SH)
lui $t1, %hi(MI_INTR_MASK_REG)
lw $t1, %lo(MI_INTR_MASK_REG)($t1)
sw $t1, 0x128($k0)
.endif
#endif
li $t1, 2
sh $t1, 0x10($k0)
.ifndef VERSION_EU_SH
#if !defined(VERSION_EU) && !defined(VERSION_SH)
lui $t1, %hi(D_80334934)
lw $t1, %lo(D_80334934)($t1)
beqz $t1, .L803268B4
@ -239,7 +232,7 @@ glabel __osException
b .L80326E08
sw $t1, %lo(D_80334A44)($at)
.L80326900:
.endif
#endif
andi $t1, $t0, 0x7c
li $t2, 36
beq $t1, $t2, .L80326B84
@ -267,7 +260,7 @@ glabel __osException
lw $t2, %lo(jtbl_80338630)($at)
jr $t2
nop
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
glabel L802F3B28
li $at, -8193
b .L8032692C
@ -276,7 +269,7 @@ glabel L802F3B34
li $at, -16385
b .L8032692C
and $s0, $s0, $at
.endif
#endif
glabel L80326964
mfc0 $t1, $11
mtc0 $t1, $11
@ -287,62 +280,62 @@ glabel L80326964
b .L8032692C
and $s0, $s0, $at
glabel L80326984
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
li $at, -2049
and $s0, $s0, $at
.endif
#endif
li $t2, 4
lui $at, %hi(D_80334920)
addu $at, $at, $t2
lw $t2, %lo(D_80334920)($at)
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
lui $sp, %hi(leoDiskStack)
addiu $sp, %lo(leoDiskStack)
li $a0, 16
beqz $t2, .L803269A4
addiu $sp, $sp, 0xff0
.else
#else
beqz $t2, .L803269A4
nop
.endif
#endif
jalr $t2
nop
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
beqz $v0, .L803269A4
.ifdef VERSION_SH
#ifdef VERSION_SH
li $a0, 0x10
.else
#else
nop
.endif
#endif
b .L80326B9C
nop
.endif
#endif
.L803269A4:
jal send_mesg
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
nop
b .L8032692C
nop
.else
#else
li $a0, 16
li $at, -2049
b .L8032692C
and $s0, $s0, $at
.endif
#endif
glabel L803269B8
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
lui $t0, %hi(__OSGlobalIntMask)
addiu $t0, %lo(__OSGlobalIntMask)
lw $t0, ($t0)
.endif
#endif
lui $s1, %hi(MI_INTR_REG)
lw $s1, %lo(MI_INTR_REG)($s1)
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
srl $t0, $t0, 0x10
and $s1, $s1, $t0
.else
#else
andi $s1, $s1, 0x3f
.endif
#endif
andi $t1, $s1, 1
beqz $t1, .L80326A18
nop
@ -609,7 +602,7 @@ glabel __osEnqueueAndYield
sw $k1, 0x12c($a1)
.L80326D70:
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
lw $k1, 0x118($a1)
andi $t1, $k1, 0xff00
beqz $t1, .L802F3FBC
@ -627,10 +620,10 @@ glabel __osEnqueueAndYield
or $k1, $k1, $t1
sw $k1, 0x118($a1)
.L802F3FBC:
.endif
#endif
lui $k1, %hi(MI_INTR_MASK_REG)
lw $k1, %lo(MI_INTR_MASK_REG)($k1)
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
beqz $k1, .L802F3FF4
nop
lui $k0, %hi(__OSGlobalIntMask)
@ -644,7 +637,7 @@ glabel __osEnqueueAndYield
and $k0, $k0, $t0
or $k1, $k1, $k0
.L802F3FF4:
.endif
#endif
beqz $a0, .L80326D88
sw $k1, 0x128($a1)
jal __osEnqueueThread
@ -653,7 +646,7 @@ glabel __osEnqueueAndYield
j __osDispatchThread
nop
#enqueue and pop look like compiled functions? but there's no easy way to extract them
// enqueue and pop look like compiled functions? but there's no easy way to extract them
glabel __osEnqueueThread
lw $t8, ($a0)
lw $t7, 4($a1)
@ -691,7 +684,7 @@ glabel __osDispatchThread
li $t0, 4
sh $t0, 0x10($v0)
move $k0, $v0
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
lui $t0, %hi(__OSGlobalIntMask)
lw $k1, 0x118($k0)
addiu $t0, %lo(__OSGlobalIntMask)
@ -704,7 +697,7 @@ glabel __osDispatchThread
and $k1, $k1, $at
or $k1, $k1, $t1
mtc0 $k1, $12
.endif
#endif
.L80326E08:
ld $k1, 0x108($k0)
ld $at, 0x20($k0)
@ -741,10 +734,10 @@ glabel __osDispatchThread
ld $ra, 0x100($k0)
lw $k1, 0x11c($k0)
mtc0 $k1, $14
.ifndef VERSION_EU_SH
#if !defined(VERSION_EU) && !defined(VERSION_SH)
lw $k1, 0x118($k0)
mtc0 $k1, $12
.endif
#endif
lw $k1, 0x18($k0)
beqz $k1, .L80326EF0
nop
@ -768,13 +761,13 @@ glabel __osDispatchThread
ldc1 $f30, 0x1a8($k0)
.L80326EF0:
lw $k1, 0x128($k0)
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
lui $k0, %hi(__OSGlobalIntMask)
addiu $k0, %lo(__OSGlobalIntMask)
lw $k0, ($k0)
srl $k0, $k0, 0x10
and $k1, $k1, $k0
.endif
#endif
sll $k1, $k1, 1
lui $k0, %hi(D_803386D0)
addiu $k0, %lo(D_803386D0)
@ -820,13 +813,13 @@ glabel jtbl_80338630
.word L803269B8
.word L80326984
.word L80326AE8
.ifdef VERSION_EU_SH
#if defined(VERSION_EU) || defined(VERSION_SH)
.word L802F3B28
.word L802F3B34
.else
#else
.word L80326BE8
.word L80326BE8
.endif
#endif
.word L80326964
.word 0
.word 0

View file

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"

View file

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"

View file

@ -1,8 +1,8 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set noat // allow manual use of $at
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"
@ -44,8 +44,8 @@ glabel __osProbeTLB
andi $t5, $v0, 2
beqz $t5, .L8032A0D8
nop
lui $at, (0x3FFFFFC0 >> 16) # lui $at, 0x3fff
ori $at, (0x3FFFFFC0 & 0xFFFF) # ori $at, $at, 0xffc0
lui $at, (0x3FFFFFC0 >> 16) // lui $at, 0x3fff
ori $at, (0x3FFFFFC0 & 0xFFFF) // ori $at, $at, 0xffc0
and $v0, $v0, $at
sll $v0, $v0, 6
and $t5, $a0, $t3

View file

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"

View file

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches
.set noreorder // don't insert nops after branches
.set gp=64
.include "macros.inc"
#include "macros.inc"
.section .text, "ax"

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