Compare commits

...

3 commits

Author SHA1 Message Date
Hyper
27f10bda10
Merge 82fc288b3c into 3c1badf183 2025-08-04 16:07:37 +02:00
squidbus
3c1badf183
Enable D3D12 Agility SDK in plume submodule. (#1646)
Some checks failed
validate-internal / build (push) Has been cancelled
2025-08-04 15:39:26 +03:00
Hyper
82fc288b3c Fix Werehog rotating into walls when leaving them at HFR 2025-04-27 03:26:17 +01:00
6 changed files with 34 additions and 23 deletions

View file

@ -23,10 +23,6 @@ if (APPLE)
enable_language(OBJC OBJCXX)
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(SDL_VULKAN_ENABLED ON CACHE BOOL "")
endif()
if (CMAKE_OSX_ARCHITECTURES)
set(UNLEASHED_RECOMP_ARCHITECTURE ${CMAKE_OSX_ARCHITECTURES})
elseif(CMAKE_SYSTEM_PROCESSOR)

View file

@ -352,23 +352,13 @@ if (UNLEASHED_RECOMP_FLATPAK)
)
endif()
if (UNLEASHED_RECOMP_D3D12)
find_package(directx-headers CONFIG REQUIRED)
find_package(directx12-agility CONFIG REQUIRED)
target_compile_definitions(UnleashedRecomp PRIVATE
UNLEASHED_RECOMP_D3D12
D3D12MA_USING_DIRECTX_HEADERS
D3D12MA_OPTIONS16_SUPPORTED
)
endif()
if (SDL_VULKAN_ENABLED)
target_compile_definitions(UnleashedRecomp PRIVATE SDL_VULKAN_ENABLED)
endif()
find_package(CURL REQUIRED)
if (UNLEASHED_RECOMP_D3D12)
find_package(directx-headers CONFIG REQUIRED)
find_package(directx12-agility CONFIG REQUIRED)
target_compile_definitions(UnleashedRecomp PRIVATE UNLEASHED_RECOMP_D3D12)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
add_custom_command(TARGET UnleashedRecomp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> $<TARGET_FILE_DIR:UnleashedRecomp>/D3D12
@ -379,9 +369,6 @@ if (UNLEASHED_RECOMP_D3D12)
)
target_link_libraries(UnleashedRecomp PRIVATE
Microsoft::DirectX-Headers
Microsoft::DirectX-Guids
Microsoft::DirectX12-Agility
Microsoft::DirectXShaderCompiler
Microsoft::DXIL
dxgi
@ -395,7 +382,7 @@ if (WIN32)
ntdll
Shcore
Synchronization
winmm
winmm
windowsapp
)
endif()

View file

@ -195,3 +195,11 @@ bool SparkleLocusMidAsmHook()
// This has the side effect of the locus particle eventually snapping to the rest position during pause, but it's better than vertices exploding.
return App::s_deltaTime < (1.0 / 60.0);
}
void CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook(PPCRegister& f1)
{
// The code in the Werehog's "wall" state for leaving walls adds a constant
// value of 0.05 to his transform every frame. This makes the value respect
// delta time whilst maintaining the original behaviour at 30 FPS.
f1.f64 = f1.f64 * (std::min(App::s_deltaTime, 1.0 / 15.0) / (1.0 / 30.0));
}

View file

@ -1141,3 +1141,15 @@ registers = ["r3"]
name = "EndingTextPositionMidAsmHook"
address = 0x82580168
registers = ["r31", "f13"]
# Wall Leave - Left
[[midasm_hook]]
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
address = 0x824067BC
registers = ["f1"]
# Wall Leave - Right
[[midasm_hook]]
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
address = 0x82406774
registers = ["f1"]

View file

@ -15,6 +15,14 @@ set(SDL2MIXER_OPUS OFF)
set(SDL2MIXER_VORBIS "VORBISFILE")
set(SDL2MIXER_WAVPACK OFF)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(SDL_VULKAN_ENABLED ON CACHE BOOL "")
endif()
if (WIN32)
set(D3D12_AGILITY_SDK_ENABLED ON CACHE BOOL "")
endif()
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/msdf-atlas-gen")
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/nativefiledialog-extended")
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/o1heap")

2
thirdparty/plume vendored

@ -1 +1 @@
Subproject commit fffeb35f836d8c945697ec82b735e77db401e2de
Subproject commit 11926860e878e68626ea99ec88562ce2b8badc4f