Consolidates two standalone Railroader mods into one UMM "everything mod" with an optional-module framework. Modules are disabled by default and toggled per-module from the S3 settings page. Core framework: - IModule contract plus ModuleRegistry, with each module owning a Harmony instance scoped by its id so only enabled modules patch the game - Per-module flat JSON settings (SettingsStore). On this Mono runtime JsonUtility silently drops nested custom-class fields, so settings stay flat - Foldout-per-module settings panel plus a detector that offers to disable the old standalone mods if they are still installed Modules (moved over to parity, verified in-game): - Physics Optimizer (was RailroaderPhysicsOverhaul): LOD fast-path and auto-freeze, profiler overlay, debug car tinting, /rpf console commands - Map Popout (was RRPopout): native map detach window. Pure-UMM install that drops the winhttp proxy and LoadLibrary's RRPopout.dll from the mod folder. Native Win32 + D3D11 + Dear ImGui engine included. Fixes a latent break where the now-private MapBuilder.UpdateForZoom() is reached via Traverse. Build: dotnet for the managed assembly (netstandard2.1) and CMake for the native DLL. build-local.ps1 installs into the game, build-release.ps1 packages the UMM drag-install zip.
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#pragma once
|
|
#include <stdint.h>
|
|
|
|
// Minimal subset of Unity's plugin SDK headers (from Unity's NativeRenderingPlugin sample).
|
|
// Full headers available at: https://github.com/Unity-Technologies/NativeRenderingPlugin
|
|
|
|
#ifndef UNITY_INTERFACE_API
|
|
# if defined(_WIN32)
|
|
# define UNITY_INTERFACE_API __stdcall
|
|
# define UNITY_INTERFACE_EXPORT __declspec(dllexport)
|
|
# else
|
|
# define UNITY_INTERFACE_API
|
|
# define UNITY_INTERFACE_EXPORT __attribute__((visibility("default")))
|
|
# endif
|
|
#endif
|
|
|
|
struct IUnityInterface {};
|
|
|
|
// Must be declared before IUnityInterfaces uses it.
|
|
struct UnityInterfaceGUID {
|
|
uint64_t high;
|
|
uint64_t low;
|
|
};
|
|
|
|
struct IUnityInterfaces {
|
|
// x64 Windows ABI: a 16-byte struct is passed by pointer (caller allocates on stack,
|
|
// passes rdx = &struct). Our signature must match Unity's vtable exactly — one
|
|
// struct-by-value arg — so the compiler generates the correct pointer-passing call.
|
|
virtual IUnityInterface* UNITY_INTERFACE_API GetInterfaceByGUID(UnityInterfaceGUID guid) = 0;
|
|
|
|
template<typename T>
|
|
T* Get() {
|
|
return static_cast<T*>(GetInterfaceByGUID(T::GUID));
|
|
}
|
|
};
|