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:
commit
d9f5c85430
31 files changed
+1184
No files matched your search
@@ -0,0 +1,33 @@
|
||||
#include "re/config.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
namespace re {
|
||||
namespace {
|
||||
|
||||
std::wstring g_path;
|
||||
|
||||
std::wstring Widen(const char* s) {
|
||||
return std::wstring(s, s + strlen(s));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void SetConfigPath(const std::wstring& path) {
|
||||
g_path = path;
|
||||
}
|
||||
|
||||
const std::wstring& ConfigPath() {
|
||||
return g_path;
|
||||
}
|
||||
|
||||
int ConfigInt(const char* section, const char* key, int fallback) {
|
||||
if (g_path.empty()) {
|
||||
return fallback;
|
||||
}
|
||||
return static_cast<int>(GetPrivateProfileIntW(Widen(section).c_str(), Widen(key).c_str(), fallback, g_path.c_str()));
|
||||
}
|
||||
|
||||
} // namespace re
|
||||
Reference in new issue
Block a user