From 37bc904b2a0d61f814f512cb7ddecc9c777d8d5a Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Fri, 15 Mar 2024 17:46:45 -0400 Subject: [PATCH] Moved rt64 submodule to new folder to reflect change in repo name --- .gitmodules | 4 ++-- CMakeLists.txt | 30 +++++++++++++++--------------- lib/RT64-HLE | 1 - lib/rt64 | 1 + patches/Makefile | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) delete mode 160000 lib/RT64-HLE create mode 160000 lib/rt64 diff --git a/.gitmodules b/.gitmodules index 2471b85..645c6da 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,8 +4,8 @@ [submodule "lib/nativefiledialog-extended"] path = lib/nativefiledialog-extended url = https://github.com/btzy/nativefiledialog-extended -[submodule "lib/RT64-HLE"] - path = lib/RT64-HLE +[submodule "lib/rt64"] + path = lib/rt64 url = https://github.com/rt64/rt64 [submodule "lib/freetype-windows-binaries"] path = lib/freetype-windows-binaries diff --git a/CMakeLists.txt b/CMakeLists.txt index a1a60b2..43ea6c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/lib/") -add_subdirectory(${CMAKE_SOURCE_DIR}/lib/RT64-HLE ${CMAKE_BINARY_DIR}/rt64) +add_subdirectory(${CMAKE_SOURCE_DIR}/lib/rt64 ${CMAKE_BINARY_DIR}/rt64) # set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}") set(BUILD_SHARED_LIBS OFF) @@ -72,7 +72,7 @@ target_sources(PatchesLib PRIVATE set_source_files_properties(${CMAKE_SOURCE_DIR}/RecompiledPatches/patches.c PROPERTIES COMPILE_FLAGS -fno-strict-aliasing) # Build patches elf -add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/patches/patches.elf +add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/patches/patches.bin COMMAND make WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/patches BYPRODUCTS ${CMAKE_SOURCE_DIR}/patches/patches.bin} @@ -81,7 +81,7 @@ add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/patches/patches.elf # Generate patches_bin.c from patches.bin add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/RecompiledPatches/patches_bin.c COMMAND file_to_c ${CMAKE_SOURCE_DIR}/patches/patches.bin mm_patches_bin ${CMAKE_SOURCE_DIR}/RecompiledPatches/patches_bin.c ${CMAKE_SOURCE_DIR}/RecompiledPatches/patches_bin.h - DEPENDS ${CMAKE_SOURCE_DIR}/patches/patches.elf ${CMAKE_SOURCE_DIR}/patches/patches.bin + DEPENDS ${CMAKE_SOURCE_DIR}/patches/patches.bin ) # Recompile patches elf into patches.c @@ -92,7 +92,7 @@ add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/src/recomp/patch_loading.cpp COMMAND RecompPort patches.toml && ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/src/recomp/patch_loading.cpp WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - DEPENDS ${CMAKE_SOURCE_DIR}/patches/patches.elf + DEPENDS ${CMAKE_SOURCE_DIR}/patches/patches.bin ) # Main executable @@ -166,12 +166,12 @@ target_include_directories(Zelda64Recompiled PRIVATE ${CMAKE_SOURCE_DIR}/lib/GamepadMotionHelpers ${CMAKE_SOURCE_DIR}/lib/RmlUi/Include ${CMAKE_SOURCE_DIR}/lib/RmlUi/Backends - ${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/contrib - ${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/contrib/hlslpp/include - ${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/contrib/dxc/inc - ${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src - ${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/rhi - ${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/render + ${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib + ${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib/hlslpp/include + ${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib/dxc/inc + ${CMAKE_SOURCE_DIR}/lib/rt64/src + ${CMAKE_SOURCE_DIR}/lib/rt64/src/rhi + ${CMAKE_SOURCE_DIR}/lib/rt64/src/render ${CMAKE_SOURCE_DIR}/lib/freetype-windows-binaries/include ${CMAKE_SOURCE_DIR}/lib/lib/nativefiledialog-extended/src/include ${CMAKE_BINARY_DIR}/shaders @@ -203,8 +203,8 @@ if (WIN32) add_custom_command(TARGET Zelda64Recompiled POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${sdl2_SOURCE_DIR}/lib/x64/SDL2.dll" - "${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/contrib/dxc/bin/x64/dxil.dll" - "${CMAKE_SOURCE_DIR}/lib/RT64-HLE/src/contrib/dxc/bin/x64/dxcompiler.dll" + "${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxil.dll" + "${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxcompiler.dll" $) endif() @@ -219,7 +219,7 @@ target_link_libraries(Zelda64Recompiled PRIVATE lunasvg ) -# TODO fix the RT64 CMake script so that this doesn't need to be duplicated here +# TODO fix the rt64 CMake script so that this doesn't need to be duplicated here # For DXC set (DXC_COMMON_OPTS "-I${PROJECT_SOURCE_DIR}/src") set (DXC_DXIL_OPTS "-Wno-ignored-attributes") @@ -231,10 +231,10 @@ set (DXC_GS_OPTS "${DXC_COMMON_OPTS}" "-E" "GSMain" "-T gs_6_0") set (DXC_RT_OPTS "${DXC_COMMON_OPTS}" "-D" "RT_SHADER" "-T" "lib_6_3" "-fspv-target-env=vulkan1.1spirv1.4" "-fspv-extension=SPV_KHR_ray_tracing" "-fspv-extension=SPV_EXT_descriptor_indexing") if (${WIN32}) - set (DXC "${PROJECT_SOURCE_DIR}/lib/RT64-HLE/src/contrib/dxc/bin/x64/dxc.exe") + set (DXC "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc.exe") add_compile_definitions(NOMINMAX) else() - set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/RT64-HLE/src/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxc") + set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxc") endif() build_vertex_shader(Zelda64Recompiled "shaders/InterfaceVS.hlsl" "shaders/InterfaceVS.hlsl") diff --git a/lib/RT64-HLE b/lib/RT64-HLE deleted file mode 160000 index 61487f8..0000000 --- a/lib/RT64-HLE +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 61487f857335a796cf85dc204686da7a2254c027 diff --git a/lib/rt64 b/lib/rt64 new file mode 160000 index 0000000..a14ada8 --- /dev/null +++ b/lib/rt64 @@ -0,0 +1 @@ +Subproject commit a14ada8fd7c8a9c93c896ee594fbaca583c02d17 diff --git a/patches/Makefile b/patches/Makefile index d771e47..4ebc2fe 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 -ffast-math -fno-unsafe-math-optimizations -mno-check-zero-division -G0 -Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-missing-braces -Wno-unsupported-floating-point-opt -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 +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/include LDFLAGS := -nostdlib -T patches.ld -T syms.ld --just-symbols=../mm.us.rev1.elf --allow-multiple-definition BINFLAGS := -O binary