From 32cb89ed76a466131b916e718f1144f06df4ae6b Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Mon, 18 Dec 2023 19:26:47 -0500 Subject: [PATCH] Added MM decomp as submodule and added workaround file to avoid needing to build it --- .gitmodules | 3 +++ lib/mm-decomp | 1 + patches/Makefile | 2 +- patches/code/sub_s/sub_s.h | 10 ++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 160000 lib/mm-decomp create mode 100644 patches/code/sub_s/sub_s.h diff --git a/.gitmodules b/.gitmodules index 649f911..a02944f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "lib/freetype-windows-binaries"] path = lib/freetype-windows-binaries url = https://github.com/ubawurinna/freetype-windows-binaries +[submodule "lib/mm-decomp"] + path = lib/mm-decomp + url = https://github.com/zeldaret/mm diff --git a/lib/mm-decomp b/lib/mm-decomp new file mode 160000 index 0000000..5607eec --- /dev/null +++ b/lib/mm-decomp @@ -0,0 +1 @@ +Subproject commit 5607eec18bae68e4cd38ef6d1fa69d7f1d84bfc8 diff --git a/patches/Makefile b/patches/Makefile index b4b538f..d2daa78 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -5,7 +5,7 @@ LD := ld.lld OBJCOPY := llvm-objcopy CFLAGS := -target mips -mips2 -mabi=32 -O2 -mno-abicalls -mno-odd-spreg -fomit-frame-pointer -mno-check-zero-division -G0 -Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-missing-braces -CPPFLAGS := -nostdinc -D_LANGUAGE_C -DMIPS -I ../../mm/include -I ../../mm/src -I ../../mm/build -I ../../mm/assets -I../lib/RT64-HLE/include +CPPFLAGS := -nostdinc -D_LANGUAGE_C -DMIPS -I. -I ../lib/mm-decomp/include -I ../lib/mm-decomp/src -I ../lib/mm-decomp/assets -I../lib/RT64-HLE/include LDFLAGS := -nostdlib -T patches.ld -T syms.ld --just-symbols=../mm.us.rev1.elf --allow-multiple-definition BINFLAGS := -O binary diff --git a/patches/code/sub_s/sub_s.h b/patches/code/sub_s/sub_s.h new file mode 100644 index 0000000..a52d6d9 --- /dev/null +++ b/patches/code/sub_s/sub_s.h @@ -0,0 +1,10 @@ +// Required to include MM decomp headers without having built the repo + +#ifndef SUB_S_H +#define SUB_S_H 1 + +extern Vtx codeVtx_120260[]; +extern Gfx gShadowMaterialDL[]; +extern Gfx gShadowModelDL[]; + +#endif