Initial sacred_re scaffold with borderless fullscreen mod

- Launcher (sacred_re.exe) starts sacred.exe with sacred_re.dll injected
  via Detours; the DLL verifies the Sacred Gold 2.28 build before hooking.
- Hook framework: RE_HOOK for game addresses, RE_HOOK_API for Windows
  APIs, per-hook enable/disable in sacred_re.ini, sacred_re.log.
- Game code: Log (0x66f1c0) hooked, CmdLineHasFlag (0x813140) rewritten.
- Borderless mod: forces windowed mode, covers the monitor, scales the
  1024x768 image aspect-correct, remaps mouse input, keeps running in the
  background with keyboard input hidden while unfocused.
- CMake/Ninja/MSVC x86 build, VS Code setup, disasm tool, function map.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-13 23:55:50 +02:00
commit d9f5c85430
31 files changed
+1184

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
{
"recommendations": ["ms-vscode.cpptools", "ms-vscode.cmake-tools"]
}
+26
View File
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Builds, then starts the game through the launcher (no debugger in the game).
"name": "Run Sacred (sacred_re)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/x86-debug/sacred_re.exe",
"args": ["--game-dir", "D:\\Gaming\\Sacred Gold", "log"],
"cwd": "${workspaceFolder}/build/x86-debug",
"preLaunchTask": "CMake: build",
"console": "internalConsole"
},
{
// Debug our DLL inside the game: set [debug] WaitForDebugger=1 in
// build/<preset>/sacred_re.ini, start "Run Sacred", then run this and
// pick sacred.exe. The DLL waits (up to 60 s) before installing hooks.
"name": "Attach to sacred.exe",
"type": "cppvsdbg",
"request": "attach",
"processId": "${command:pickProcess}",
"symbolSearchPath": "${workspaceFolder}/build/x86-debug"
}
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"cmake.useCMakePresets": "always",
"cmake.configureOnOpen": true,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"files.associations": { "*.def": "plaintext" }
}
+13
View File
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "CMake: build",
"type": "cmake",
"command": "build",
"targets": ["all"],
"group": { "kind": "build", "isDefault": true },
"problemMatcher": ["$msCompile"]
}
]
}