Files
RototRobot e3657d0fe5 1.1.0: OpenXR with OpenVR fallback, settings panel, god mode, body physics
- OpenXR by default (openxr_loader.dll, Khronos 1.1.63), falling back to
  OpenVR / SteamVR; [vr] vr_runtime = auto|openxr|openvr. OpenXR grip poses
  converted to the OpenVR grip so the hands sit the same under both.
- Settings panel in the headset (both sticks held, or the Touch menu
  button), worked with a main-hand pointer; TR7-Menu-Hook's options built
  in when it is installed.
- God mode pick-up, carry and throw; third-person chest and rear physics;
  body push.
- Smooth view transitions; picture brightness and contrast; 4:3 movies;
  version and runtime on the main menu.
- Palm sliders: third "side" slider, per-preset scale/zoom/side, notches
  at the defaults, index-fingertip grab from Lara's drawn finger.
- Per-model caching of the body measurements (stutter with some player
  model mods).
- Docs, release notes and notices for 1.1.0.
2026-10-28 05:10:54 +00:00

129 lines
5.3 KiB
Batchfile

@echo off
setlocal
rem Builds the Tomb Raider: Legend VR d3d9 proxy.
rem
rem The game is 32-bit, so this must be a 32-bit DLL. Static CRT (/MT) keeps it
rem to a single file with no redistributable to install.
set "ROOT=%~dp0"
set "OUT=%ROOT%build"
set "BIN=%ROOT%dist"
if not exist "%OUT%" mkdir "%OUT%"
if not exist "%BIN%" mkdir "%BIN%"
call "%ROOT%msvc.bat"
if errorlevel 1 exit /b 1
set SRC=
set SRC=%SRC% "%ROOT%src\proxy\dllmain.cpp"
set SRC=%SRC% "%ROOT%src\proxy\backend.cpp"
set SRC=%SRC% "%ROOT%src\proxy\proxy_d3d9.cpp"
set SRC=%SRC% "%ROOT%src\proxy\proxy_device.cpp"
set SRC=%SRC% "%ROOT%src\proxy\imgui_overlay.cpp"
set SRC=%SRC% "%ROOT%src\proxy\proxy_swapchain.cpp"
set SRC=%SRC% "%ROOT%src\proxy\window.cpp"
set SRC=%SRC% "%ROOT%src\proxy\gpu_profile.cpp"
set SRC=%SRC% "%ROOT%src\proxy\overlay.cpp"
set SRC=%SRC% "%ROOT%src\common\log.cpp"
set SRC=%SRC% "%ROOT%src\common\config.cpp"
set SRC=%SRC% "%ROOT%src\vr\vr_math.cpp"
set SRC=%SRC% "%ROOT%src\vr\vr_session.cpp"
set SRC=%SRC% "%ROOT%src\vr\xr_runtime.cpp"
set SRC=%SRC% "%ROOT%src\vr\ovr_runtime.cpp"
set SRC=%SRC% "%ROOT%src\vr\vr_runtime.cpp"
set SRC=%SRC% "%ROOT%src\vr\menu_watermark.cpp"
set SRC=%SRC% "%ROOT%src\vr\tr7_menu_hook.cpp"
set SRC=%SRC% "%ROOT%src\vr\vr_submit.cpp"
set SRC=%SRC% "%ROOT%src\vr\tune.cpp"
set SRC=%SRC% "%ROOT%src\vr\hook.cpp"
set SRC=%SRC% "%ROOT%src\vr\cull.cpp"
set SRC=%SRC% "%ROOT%src\vr\camera_head.cpp"
set SRC=%SRC% "%ROOT%src\vr\stereo.cpp"
set SRC=%SRC% "%ROOT%src\vr\ui_space.cpp"
set SRC=%SRC% "%ROOT%src\vr\vr_input.cpp"
set SRC=%SRC% "%ROOT%src\vr\vr_gesture.cpp"
set SRC=%SRC% "%ROOT%src\vr\water_stereo.cpp"
set SRC=%SRC% "%ROOT%src\vr\reflection_stereo.cpp"
set SRC=%SRC% "%ROOT%src\vr\input_labels.cpp"
set SRC=%SRC% "%ROOT%src\vr\lang.cpp"
set SRC=%SRC% "%ROOT%src\vr\hud_capture.cpp"
set SRC=%SRC% "%ROOT%src\vr\perf_cpu.cpp"
set SRC=%SRC% "%ROOT%src\vr\physics\body_push.cpp"
set SRC=%SRC% "%ROOT%src\vr\physics\body_volumes.cpp"
set SRC=%SRC% "%ROOT%src\vr\godmode\god_carry.cpp"
set SRC=%SRC% "%ROOT%src\vr\godmode\god_pluck.cpp"
set SRC=%SRC% "%ROOT%src\vr\physics\soft_body.cpp"
set SRC=%SRC% "%ROOT%src\vr\physics\rear_jiggle.cpp"
set SRC=%SRC% "%ROOT%src\vr\physics\rear_shape.cpp"
set SRC=%SRC% "%ROOT%src\vr\godmode\board_leash.cpp"
set SRC=%SRC% "%ROOT%src\vr\menu_panel.cpp"
set SRC=%SRC% "%ROOT%src\vr\finger_input.cpp"
rem OpenXR (the default backend): headers and the import library of
rem openxr_loader.dll (third_party\openxr, built from the Khronos 1.1.63
rem source). The DLL is delay-loaded, so without it the game still starts and
rem vr_runtime.cpp falls back to OpenVR.
set "OPENXR=%ROOT%third_party\openxr\include"
rem OpenVR headers (the fallback backend, ovr_runtime.cpp); openvr_api.dll is
rem loaded at run time, beside the game.
set "OPENVR=%ROOT%third_party\openvr\headers"
rem Dear ImGui (third_party\imgui): the in-game settings overlay.
set "IMGUI=%ROOT%third_party\imgui"
for %%F in (imgui imgui_draw imgui_tables imgui_widgets imgui_impl_dx9 imgui_impl_win32) do call set SRC=%%SRC%% "%IMGUI%\%%F.cpp"
set "OPENXRLIB=%ROOT%third_party\openxr\lib\win32\openxr_loader.lib"
rem The VR interop header lives in our DXVK fork and pulls in Vulkan. The
rem headers the fork vendors are used unless a Vulkan SDK is installed.
set "DXVKVR=%ROOT%dxvk-trlvr\src\d3d9"
set "VKINC=%ROOT%dxvk-trlvr\include\vulkan\include"
for /d %%D in ("C:\VulkanSDK\*") do set "VKINC=%%D\Include"
set CFLAGS=/nologo /c /EHsc /MT /O2 /W4 /std:c++17 /DWIN32 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /DIMGUI_IMPL_WIN32_DISABLE_GAMEPAD /I"%OPENXR%" /I"%OPENVR%" /I"%IMGUI%" /I"%DXVKVR%" /I"%VKINC%" /Fo"%OUT%\\"
set LFLAGS=/nologo /DLL /MACHINE:X86 /DEF:"%ROOT%src\proxy\d3d9.def" /OUT:"%OUT%\d3d9.dll" /MAP:"%OUT%\d3d9.map"
echo Compiling...
del /q "%OUT%\*.obj" 2>nul
cl %CFLAGS% %SRC%
if errorlevel 1 (
echo BUILD FAILED ^(compile^)
exit /b 1
)
echo Linking...
rem Deliberately NOT linking d3d9.lib: this DLL *is* d3d9.dll, and an import
rem library would make it import from itself. Every entry point is resolved
rem from the backend with GetProcAddress instead. dxguid.lib supplies the
rem interface IIDs only, and pulls in no DLL.
link %LFLAGS% "%OUT%\*.obj" "%OPENXRLIB%" /DELAYLOAD:openxr_loader.dll delayimp.lib dxguid.lib user32.lib kernel32.lib advapi32.lib
if errorlevel 1 (
echo BUILD FAILED ^(link^)
exit /b 1
)
copy /y "%OUT%\d3d9.dll" "%BIN%\d3d9.dll" >nul
rem The XInput proxy (src\xinput) is no longer built. The controllers drive
rem the keyboard and mouse from the d3d9 side instead -- the game polls
rem XInput once at startup and never again, and a thumbstick caps how fast
rem aim can turn. See src\vr\vr_input.cpp. The source is kept, unbuilt.
echo Building the launcher...
rem Its own exe, deliberately: the large-address-aware bit is read by the
rem loader from the file before any code in the process runs, so nothing the
rem mod does from inside the game can set it.
cl /nologo /EHsc /MT /O2 /W4 /std:c++17 /DWIN32 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS ^
/Fo"%OUT%\launcher_" /Fe"%OUT%\trlvr_launcher.exe" ^
"%ROOT%src\launcher\main.cpp" ^
/link /MACHINE:X86 /SUBSYSTEM:WINDOWS user32.lib kernel32.lib shell32.lib
if errorlevel 1 (
echo BUILD FAILED ^(launcher^)
exit /b 1
)
copy /y "%OUT%\trlvr_launcher.exe" "%BIN%\trlvr_launcher.exe" >nul
echo.
echo Built: %BIN%\d3d9.dll
echo %BIN%\trlvr_launcher.exe
echo Use install.bat to put it in the game folder.
exit /b 0