mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Add PAUSEWIN (Ctrl+P) to LoadGameHook game modes
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
#define HEROWIN (0x40000)
|
#define HEROWIN (0x40000)
|
||||||
#define DIALOGVIEW (0x80000)
|
#define DIALOGVIEW (0x80000)
|
||||||
#define COUNTERWIN (0x100000) // counter window for moving multiple items or setting a timer
|
#define COUNTERWIN (0x100000) // counter window for moving multiple items or setting a timer
|
||||||
|
#define PAUSEWIN (0x200000) // Ctrl+P pause window
|
||||||
#define SPECIAL (0x80000000)
|
#define SPECIAL (0x80000000)
|
||||||
|
|
||||||
// Valid arguments to register_hook_proc
|
// Valid arguments to register_hook_proc
|
||||||
|
|||||||
@@ -569,6 +569,15 @@ static void __declspec(naked) HelpMenuHook() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __declspec(naked) PauseWindowHook() {
|
||||||
|
__asm {
|
||||||
|
_InLoop(1, PAUSEWIN);
|
||||||
|
call fo::funcoffs::PauseWindow_;
|
||||||
|
_InLoop(0, PAUSEWIN);
|
||||||
|
retn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void __declspec(naked) CharacterHook() {
|
static void __declspec(naked) CharacterHook() {
|
||||||
__asm {
|
__asm {
|
||||||
push edx;
|
push edx;
|
||||||
@@ -865,6 +874,8 @@ void LoadGameHook::init() {
|
|||||||
HookCall(0x447A7E, gdialog_bk_hook); // set when switching from dialog mode to barter mode (unset when entering barter)
|
HookCall(0x447A7E, gdialog_bk_hook); // set when switching from dialog mode to barter mode (unset when entering barter)
|
||||||
HookCall(0x4457B1, gdialogUpdatePartyStatus_hook1); // set when a party member joins/leaves
|
HookCall(0x4457B1, gdialogUpdatePartyStatus_hook1); // set when a party member joins/leaves
|
||||||
HookCall(0x4457BC, gdialogUpdatePartyStatus_hook0); // unset
|
HookCall(0x4457BC, gdialogUpdatePartyStatus_hook0); // unset
|
||||||
|
|
||||||
|
HookCall(0x443482, PauseWindowHook);
|
||||||
}
|
}
|
||||||
|
|
||||||
Delegate<>& LoadGameHook::OnBeforeGameInit() {
|
Delegate<>& LoadGameHook::OnBeforeGameInit() {
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ enum LoopFlag : unsigned long {
|
|||||||
HEROWIN = 1 << 18, // 0x40000 Hero Appearance mod
|
HEROWIN = 1 << 18, // 0x40000 Hero Appearance mod
|
||||||
DIALOGVIEW = 1 << 19, // 0x80000
|
DIALOGVIEW = 1 << 19, // 0x80000
|
||||||
COUNTERWIN = 1 << 20, // 0x100000 Counter window for moving multiple items or setting a timer
|
COUNTERWIN = 1 << 20, // 0x100000 Counter window for moving multiple items or setting a timer
|
||||||
|
PAUSEWIN = 1 << 21, // 0x200000 Ctrl+P pause window
|
||||||
|
|
||||||
SPECIAL = 1UL << 31 // 0x80000000 Additional special flag for all modes
|
SPECIAL = 1UL << 31 // 0x80000000 Additional special flag for all modes
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user