From 09dd5e135e8792b1bf3bab674452f272653e065c Mon Sep 17 00:00:00 2001 From: Yanis002 <35189056+Yanis002@users.noreply.github.com> Date: Tue, 11 Feb 2025 17:21:23 +0100 Subject: [PATCH] fix build issues --- Makefile | 3 +-- include/debug/print.h | 5 +++-- src/debug/collision_view.c | 2 +- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 1 + src/overlays/gamestates/ovl_title/z_title.c | 1 + tools/ZAPDConfigs/hackeroot-mq/SymbolMap.txt | 2 +- tools/com-plugin/Makefile | 6 ++++-- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index ea46cfe1d..d61da33ca 100644 --- a/Makefile +++ b/Makefile @@ -465,7 +465,6 @@ SPEC_INCLUDES := $(wildcard spec/*.inc) # Baserom to use when creating BPS patches BASEROM_PATCH ?= baseroms/$(VERSION)/baserom.z64 -ifeq ($(COMPILER),gcc) SRC_DIRS := $(shell find src -type d) UNDECOMPILED_DATA_DIRS := $(shell find data -type d) @@ -798,7 +797,7 @@ endif $(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) $(UCODE_O_FILES) $(LDSCRIPT) $(BUILD_DIR)/linker_scripts/makerom.ld $(BUILD_DIR)/undefined_syms.txt \ $(SAMPLEBANK_O_FILES) $(SOUNDFONT_O_FILES) $(SEQUENCE_O_FILES) \ $(BUILD_DIR)/assets/audio/sequence_font_table.o $(BUILD_DIR)/assets/audio/audiobank_padding.o - $(call print_one_arg,Linking:,$@) + $(call print_one_arg,Linking:,$@) $(V)$(LD) $(LDFLAGS) -o $@ $(BUILD_DIR)/linker_scripts/makerom.ld: linker_scripts/makerom.ld diff --git a/include/debug/print.h b/include/debug/print.h index 6d30c3dc3..b6e67c690 100644 --- a/include/debug/print.h +++ b/include/debug/print.h @@ -3,14 +3,15 @@ #include "config.h" #include "ultra64.h" -#include "gfxprint.h" +#include "libu64/gfxprint.h" +#include "libu64/pad.h" #include "z64math.h" #include "color.h" struct GraphicsContext; typedef struct PrintUtils { - GraphicsContext* gfxCtx; + struct GraphicsContext* gfxCtx; Gfx* dl; Gfx* gfxRef; GfxPrint gfxP; diff --git a/src/debug/collision_view.c b/src/debug/collision_view.c index 43af60fc2..f48421633 100644 --- a/src/debug/collision_view.c +++ b/src/debug/collision_view.c @@ -146,7 +146,7 @@ u8 CollisionView_Draw(void* unused) { gSPDisplayList(pGfx++, sPolyGfxInit_Collision); gSPSetGeometryMode(pGfx++, G_CULL_BACK); - gSPMatrix(pGfx++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(pGfx++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); CollisionView_DrawStatic(gDebug.play, &pGfx, &dGfx, gDebug.play->colCtx.colHeader); Print_Screen(&gDebug.printer, 1, 1, COLOR_WHITE, "%3.2f%c", 100 - ((f32)(dGfx - pGfx) / MENU_BUFFER_SIZE) * 100, diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 5253b6c15..bc93f8911 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -15,6 +15,7 @@ #include "z_lib.h" #include "z64play.h" #include "z64player.h" +#include "widescreen.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_ossan/object_ossan.h" diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index 9f04a63e9..2ce0c8d08 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -44,6 +44,7 @@ void ConsoleLogo_Calc(ConsoleLogoState* this) { this->uls = this->ult & 0x7F; this->ult++; } +#endif } void ConsoleLogo_SetupView(ConsoleLogoState* this, f32 x, f32 y, f32 z) { diff --git a/tools/ZAPDConfigs/hackeroot-mq/SymbolMap.txt b/tools/ZAPDConfigs/hackeroot-mq/SymbolMap.txt index 99b4bad0a..54d92b15e 100644 --- a/tools/ZAPDConfigs/hackeroot-mq/SymbolMap.txt +++ b/tools/ZAPDConfigs/hackeroot-mq/SymbolMap.txt @@ -1,2 +1,2 @@ -8012DB20 gMtxClear +8012DB20 gIdentityMtx 80A8E610 sShadowTex diff --git a/tools/com-plugin/Makefile b/tools/com-plugin/Makefile index c15dfb6ed..bd0b8484f 100644 --- a/tools/com-plugin/Makefile +++ b/tools/com-plugin/Makefile @@ -1,3 +1,5 @@ +-include ../print_rules.mk + TARGET := common-plugin.so SOURCES := plugin.c @@ -11,9 +13,9 @@ DEP_FILES := $(TARGET:.so=.d) all: $(TARGET) clean: - $(RM) $(TARGET) $(DEP_FILES) + $(V)$(RM) $(TARGET) $(DEP_FILES) $(TARGET): $(SOURCES) - $(CC) -shared $(CFLAGS) -MMD -o $@ $(SOURCES) + $(V)$(CC) -shared $(CFLAGS) -MMD -o $@ $(SOURCES) -include $(DEP_FILES)