Backported HOOK_GAMEMODECHANGE from 4.2

Backported SPECIAL game mode flag from 4.2
This commit is contained in:
NovaRain
2021-01-10 21:45:50 +08:00
parent e075c05a3f
commit cf90437b71
8 changed files with 209 additions and 85 deletions
+2
View File
@@ -22,6 +22,7 @@
#define HEROWIN (0x40000)
#define DIALOGVIEW (0x80000)
#define COUNTERWIN (0x100000) // counter window for moving multiple items or setting a timer
#define SPECIAL (0x80000000)
//Valid arguments to register_hook
#define HOOK_TOHIT (0)
@@ -50,6 +51,7 @@
#define HOOK_WITHINPERCEPTION (23)
#define HOOK_INVENTORYMOVE (24)
#define HOOK_INVENWIELD (25)
#define HOOK_GAMEMODECHANGE (31)
//Valid arguments to list_begin
#define LIST_CRITTERS (0)
+9
View File
@@ -462,3 +462,12 @@ int arg3 - 1 when wielding, 0 when unwielding
int arg4 - 1 when removing an equipped item from inventory, 0 otherwise
int ret0 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED
-------------------------------------------
HOOK_GAMEMODECHANGE (hs_gamemodechange.int)
Runs once every time when the game mode was changed, like opening/closing the inventory, character screen, pipboy, etc.
int arg0 - event type: 1 - when the player exits the game, 0 - otherwise
int arg1 - the previous game mode