Merge remote-tracking branch 'upstream/nightly' into uncapped_frames.audio

This commit is contained in:
KingOfSpadesJFK 2024-04-11 19:26:46 -07:00
commit ac7d9303f4
5 changed files with 31 additions and 35 deletions

View File

@ -1,27 +1,17 @@
FROM ubuntu:18.04 as build
FROM ubuntu:22.04 as build
RUN apt-get update && \
apt-get install -y \
binutils-mips-linux-gnu \
bsdmainutils \
bsdextrautils \
build-essential \
libaudiofile-dev \
python3 \
wget \
git \
libglew-dev \
libsdl2-dev
libsdl2-dev \
python3
RUN wget \
https://github.com/n64decomp/qemu-irix/releases/download/v2.11-deb/qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb \
-O qemu.deb && \
echo 8170f37cf03a08cc2d7c1c58f10d650ea0d158f711f6916da9364f6d8c85f741 qemu.deb | sha256sum --check && \
dpkg -i qemu.deb && \
rm qemu.deb
RUN mkdir /sm64ex
WORKDIR /sm64ex
ENV PATH="/sm64ex/tools:${PATH}"
RUN mkdir /sm64
WORKDIR /sm64
ENV PATH="/sm64/tools:${PATH}"
CMD echo 'usage: docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=${VERSION:-us} -j4\n' \
'see https://github.com/n64decomp/sm64/blob/master/README.md for advanced usage'
CMD echo 'Usage: docker run --rm -v ${PWD}:/sm64ex sm64ex make BETTERCAMERA=1 EXTERNAL_DATA=1 -j4\n' \
'See https://github.com/sm64pc/sm64ex/wiki/Compiling-on-Docker for more information'

View File

@ -738,11 +738,11 @@ res: $(BASEPACK_PATH)
$(BASEPACK_LST): $(EXE)
@mkdir -p $(BUILD_DIR)/$(BASEDIR)
@touch $(BASEPACK_LST)
@echo "$(BUILD_DIR)/sound/bank_sets sound/bank_sets" >> $(BASEPACK_LST)
@echo "$(BUILD_DIR)/sound/bank_sets sound/bank_sets" > $(BASEPACK_LST)
@echo "$(BUILD_DIR)/sound/sequences.bin sound/sequences.bin" >> $(BASEPACK_LST)
@echo "$(BUILD_DIR)/sound/sound_data.ctl sound/sound_data.ctl" >> $(BASEPACK_LST)
@echo "$(BUILD_DIR)/sound/sound_data.tbl sound/sound_data.tbl" >> $(BASEPACK_LST)
@$(foreach f, $(wildcard $(SKYTILE_DIR)/*), echo $(f) gfx/$(f:$(BUILD_DIR)/%=%) >> $(BASEPACK_LST);)
@cd $(BUILD_DIR) ; find textures/skybox_tiles -name \*.png -exec echo "$(BUILD_DIR)/{} gfx/{}" >> basepack.lst \;
@find actors -name \*.png -exec echo "{} gfx/{}" >> $(BASEPACK_LST) \;
@find levels -name \*.png -exec echo "{} gfx/{}" >> $(BASEPACK_LST) \;
@find textures -name \*.png -exec echo "{} gfx/{}" >> $(BASEPACK_LST) \;
@ -769,9 +769,13 @@ test: $(ROM)
load: $(ROM)
$(LOADER) $(LOADER_FLAGS) $<
ifneq ($(RPC_LIBS),)
$(BUILD_DIR)/$(RPC_LIBS):
@$(CP) -f $(RPC_LIBS) $(BUILD_DIR)
endif
libultra: $(BUILD_DIR)/libultra.a
$(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES)
@ -905,18 +909,18 @@ $(ENDIAN_BITWIDTH): tools/determine-endian-bitwidth.c
@rm $@.dummy1
@rm $@.dummy2
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py $(BUILD_DIR)/sound/samples sound/sound_banks $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))
$(SOUND_BIN_DIR)/sound_data.tbl: $(SOUND_BIN_DIR)/sound_data.ctl
@true
ifeq ($(VERSION),sh)
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json sound/sequences/ sound/sequences/jp/ $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json sound/sequences sound/sequences/jp $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/bank_sets sound/sound_banks sound/sequences.json $(SOUND_SEQUENCE_FILES) $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))
else
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json sound/sequences/ sound/sequences/$(VERSION)/ $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json sound/sequences sound/sequences/$(VERSION) $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/bank_sets sound/sound_banks sound/sequences.json $(SOUND_SEQUENCE_FILES) $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))
endif
$(SOUND_BIN_DIR)/bank_sets: $(SOUND_BIN_DIR)/sequences.bin
@ -1026,7 +1030,7 @@ $(BUILD_DIR)/%.o: %.s
$(EXE): $(O_FILES) $(MIO0_FILES:.mio0=.o) $(SOUND_OBJ_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(BUILD_DIR)/$(RPC_LIBS)
$(EXE): $(O_FILES) $(MIO0_FILES:.mio0=.o) $(SOUND_OBJ_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES)
$(LD) -L $(BUILD_DIR) -o $@ $(O_FILES) $(SOUND_OBJ_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(LDFLAGS)
.PHONY: all clean distclean default diff test load libultra res

View File

@ -123,9 +123,10 @@ static void controller_sdl_init(void) {
#ifdef BETTERCAMERA
if (newcam_mouse == 1)
SDL_WM_GrabInput(SDL_GRAB_ON);
SDL_GetRelativeMouseState(&mouse_x, &mouse_y);
#endif
SDL_GetRelativeMouseState(&mouse_x, &mouse_y);
controller_sdl_bind();
init_ok = true;
@ -152,7 +153,8 @@ static void controller_sdl_read(OSContPad *pad) {
SDL_WM_GrabInput(SDL_GRAB_ON);
else
SDL_WM_GrabInput(SDL_GRAB_OFF);
#endif
u32 mouse = SDL_GetRelativeMouseState(&mouse_x, &mouse_y);
for (u32 i = 0; i < num_mouse_binds; ++i)
@ -162,7 +164,6 @@ static void controller_sdl_read(OSContPad *pad) {
// remember buttons that changed from 0 to 1
last_mouse = (mouse_buttons ^ mouse) & mouse;
mouse_buttons = mouse;
#endif
if (!sdl_joy) return;

View File

@ -112,9 +112,10 @@ static void controller_sdl_init(void) {
#ifdef BETTERCAMERA
if (newcam_mouse == 1)
SDL_SetRelativeMouseMode(SDL_TRUE);
SDL_GetRelativeMouseState(&mouse_x, &mouse_y);
#endif
SDL_GetRelativeMouseState(&mouse_x, &mouse_y);
controller_sdl_bind();
init_ok = true;
@ -156,7 +157,8 @@ static void controller_sdl_read(OSContPad *pad) {
SDL_SetRelativeMouseMode(SDL_TRUE);
else
SDL_SetRelativeMouseMode(SDL_FALSE);
#endif
u32 mouse = SDL_GetRelativeMouseState(&mouse_x, &mouse_y);
for (u32 i = 0; i < num_mouse_binds; ++i)
@ -166,7 +168,6 @@ static void controller_sdl_read(OSContPad *pad) {
// remember buttons that changed from 0 to 1
last_mouse = (mouse_buttons ^ mouse) & mouse;
mouse_buttons = mouse;
#endif
SDL_GameControllerUpdate();

View File

@ -146,10 +146,10 @@ static inline GLenum texenv_set_texture_color(struct ShaderProgram *prg) {
switch (prg->shader_id) {
case 0x0000038D: // mario's eyes
case 0x01045A00: // peach letter
case 0x01200A00: // intro copyright fade in
mode = GL_DECAL;
break;
case 0x01045A00: // peach letter, explosions
case 0x00000551: // goddard
mode = GL_BLEND;
break;