mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added description of HOOK_GAMEMODECHANGE to hookscripts.txt.
Fixed the line break for debug.log message of GameReset. Minor edits to Tiles.cpp code format.
This commit is contained in:
@@ -498,3 +498,11 @@ int arg3 - the hour part of the length of resting time
|
|||||||
int arg4 - the minute part of the length of resting time
|
int arg4 - the minute part of the length of resting time
|
||||||
|
|
||||||
int ret1 - pass 1 to interrupt the resting
|
int ret1 - pass 1 to interrupt the resting
|
||||||
|
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
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 arg1 - event type: 1 - when the player exits the game, 0 - otherwise
|
||||||
|
|||||||
@@ -37,8 +37,16 @@
|
|||||||
namespace sfall
|
namespace sfall
|
||||||
{
|
{
|
||||||
|
|
||||||
#define _InLoop(type, flag) _asm pushad _asm push flag _asm push type _asm call SetInLoop _asm popad
|
#define _InLoop(type, flag) __asm { \
|
||||||
#define _InLoop2(type, flag) _asm push flag _asm push type _asm call SetInLoop
|
_asm pushad \
|
||||||
|
_asm push flag \
|
||||||
|
_asm push type \
|
||||||
|
_asm call SetInLoop \
|
||||||
|
_asm popad }
|
||||||
|
#define _InLoop2(type, flag) __asm { \
|
||||||
|
_asm push flag \
|
||||||
|
_asm push type \
|
||||||
|
_asm call SetInLoop }
|
||||||
|
|
||||||
static Delegate<> onGameInit;
|
static Delegate<> onGameInit;
|
||||||
static Delegate<> onGameReset;
|
static Delegate<> onGameReset;
|
||||||
@@ -206,7 +214,7 @@ static void _stdcall GameReset(DWORD isGameLoad) {
|
|||||||
|
|
||||||
if (isDebug) {
|
if (isDebug) {
|
||||||
char* str = (isGameLoad) ? "on Load" : "on Exit";
|
char* str = (isGameLoad) ? "on Load" : "on Exit";
|
||||||
fo::func::debug_printf("n\[SFALL: State reset %s]", str);
|
fo::func::debug_printf("\n[SFALL: State reset %s]\n", str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,4 +572,5 @@ Delegate<>& LoadGameHook::OnAfterNewGame() {
|
|||||||
Delegate<DWORD>& LoadGameHook::OnGameModeChange() {
|
Delegate<DWORD>& LoadGameHook::OnGameModeChange() {
|
||||||
return onGameModeChange;
|
return onGameModeChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user