railroader-setons-special-s.../native/external/IUnityGraphics.h
seton a1fcf01125 Initial commit: S3 - Seton's Special Sauce v0.2.0
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.
2026-06-17 14:17:41 -04:00

31 lines
1.2 KiB
C

#pragma once
#include "IUnityInterface.h"
enum UnityGfxDeviceEventType {
kUnityGfxDeviceEventInitialize = 0,
kUnityGfxDeviceEventShutdown = 1,
kUnityGfxDeviceEventBeforeReset = 2,
kUnityGfxDeviceEventAfterReset = 3,
};
enum UnityGfxRenderer {
kUnityGfxRendererD3D11 = 2,
kUnityGfxRendererD3D12 = 18,
kUnityGfxRendererVulkan = 21,
kUnityGfxRendererOpenGLCore = 17,
};
typedef void (UNITY_INTERFACE_API * IUnityGraphicsDeviceEventCallback)(UnityGfxDeviceEventType eventType);
typedef void (UNITY_INTERFACE_API * UnityRenderingEvent)(int eventId);
struct IUnityGraphics : IUnityInterface {
static const UnityInterfaceGUID GUID;
virtual UnityGfxRenderer UNITY_INTERFACE_API GetRenderer() = 0;
virtual void UNITY_INTERFACE_API RegisterDeviceEventCallback(IUnityGraphicsDeviceEventCallback callback) = 0;
virtual void UNITY_INTERFACE_API UnregisterDeviceEventCallback(IUnityGraphicsDeviceEventCallback callback) = 0;
virtual int UNITY_INTERFACE_API ReserveEventIDRange(int count) = 0;
};
// {7CBA0A9C-0EFB-4B97-A51E-03B7B9994DC1}
const UnityInterfaceGUID IUnityGraphics::GUID = { 0x7CBA0A9C0EFB4B97ULL, 0xA51E03B7B9994DC1ULL };