Key bindings layer: skills on 1-7, weapon sets on F1-F7
Raw WM_KEYDOWN/WM_KEYUP are handled in both window procedures (the game swaps 0x8110d0 and 0x8122a0 with SetWindowLong; 0x8110d0 is the in-game one). Bound keys are swallowed and post the original hotkey's key event to the kernel, so F-keys work and bindings are layout independent ([keys] in sacred_re.ini). Replaces the WASD hotkey remap and the digit swap; W/A/S/D and the digit row no longer reach the game. Skill keys still cast through the right mouse button. Enabled switches removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9fb6c6b406
commit
cec2556fa3
11 files changed
+409
-279
No files matched your search
@@ -34,6 +34,7 @@
|
||||
#include "game/engine/input.h"
|
||||
#include "game/render/dx_driver7.h"
|
||||
#include "mods/hud.h"
|
||||
#include "mods/input.h"
|
||||
#include "mods/widescreen.h"
|
||||
#include "re/config.h"
|
||||
#include "game/addresses.h"
|
||||
@@ -215,6 +216,9 @@ void __cdecl GetMouseClientPos(HWND window, POINT* position) {
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
if (mods::input::HandleWindowMessage(window, message, wParam, lParam)) {
|
||||
return 0;
|
||||
}
|
||||
if (!g_viewport.active || window != g_viewport.window) {
|
||||
return MainWindowProc_original(window, message, wParam, lParam);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user