diff --git a/artifacts/scripting/headers/sfall.h b/artifacts/scripting/headers/sfall.h
index 490d995a..fa3dff18 100644
--- a/artifacts/scripting/headers/sfall.h
+++ b/artifacts/scripting/headers/sfall.h
@@ -249,6 +249,7 @@
// sfall_funcX macros
#define add_extra_msg_file(name) sfall_func1("add_extra_msg_file", name)
+#define add_global_timer_event(time, param) sfall_func2("add_g_timer_event", time, param)
#define add_iface_tag sfall_func0("add_iface_tag")
#define add_trait(traitId) sfall_func1("add_trait", traitId)
#define art_cache_clear sfall_func0("art_cache_clear")
@@ -293,6 +294,8 @@
#define obj_under_cursor(crSwitch, inclDude) sfall_func2("obj_under_cursor", crSwitch, inclDude)
#define outlined_object sfall_func0("outlined_object")
#define real_dude_obj sfall_func0("real_dude_obj")
+#define remove_all_timer_events sfall_func0("remove_timer_event")
+#define remove_timer_event(param) sfall_func1("remove_timer_event", param)
#define set_can_rest_on_map(map, elev, value) sfall_func3("set_can_rest_on_map", map, elev, value)
#define set_car_intface_art(artIndex) sfall_func1("set_car_intface_art", artIndex)
#define set_cursor_mode(mode) sfall_func1("set_cursor_mode", mode)
diff --git a/artifacts/scripting/sfall function notes.txt b/artifacts/scripting/sfall function notes.txt
index 52132f1c..6311862b 100644
--- a/artifacts/scripting/sfall function notes.txt
+++ b/artifacts/scripting/sfall function notes.txt
@@ -633,6 +633,17 @@ optional argument:
> int sfall_func0("get_inven_ap_cost")
- returns the current AP cost to access the inventory in combat
+> void sfall_func2("add_g_timer_event", int time, int param)
+- adds a timer event that calls the timed_event_p_proc procedure in the current global script
+- time: the number of ticks after which the event timer is triggered
+- param: the value that is passed to the timed_event_p_proc procedure for the fixed_param function
+
+> void sfall_func0("remove_timer_event")
+- clears all set timer events for the current global script
+
+> void sfall_func1("remove_timer_event", int param)
+- removes all timer events with the specified 'param' value for the current global script
+
------------------------
------ MORE INFO -------
------------------------
diff --git a/sfall/FalloutEngine/Functions.cpp b/sfall/FalloutEngine/Functions.cpp
index 85ea645a..2a449a2d 100644
--- a/sfall/FalloutEngine/Functions.cpp
+++ b/sfall/FalloutEngine/Functions.cpp
@@ -26,7 +26,7 @@ namespace fo
namespace func
{
-// prints debug message to debug.log file for develop build
+// Prints debug message to debug.log file for develop build
#ifndef NDEBUG
void __declspec(naked) dev_printf(const char* fmt, ...) {
__asm jmp fo::funcoffs::debug_printf_;
@@ -181,7 +181,7 @@ long __stdcall db_dir_entry(const char *fileName, DWORD *sizeOut) {
// prints message to debug.log file
void __declspec(naked) debug_printf(const char* fmt, ...) {
- __asm jmp fo::funcoffs::debug_printf_
+ __asm jmp fo::funcoffs::debug_printf_;
}
// Displays message in main UI console window
diff --git a/sfall/Modules/Interface.cpp b/sfall/Modules/Interface.cpp
index 9f6a2db4..8520b0c3 100644
--- a/sfall/Modules/Interface.cpp
+++ b/sfall/Modules/Interface.cpp
@@ -591,8 +591,8 @@ static void __declspec(naked) gmouse_bk_process_hook() {
retn;
checkFlag:
call fo::funcoffs::GNW_find_;
- cmp [eax + 4], Hidden; // window flags
- jnz skip;
+ test [eax + 4], Hidden; // window flags
+ jz skip;
mov eax, ds:[FO_VAR_display_win]; // window is hidden, so return the number of the display_win
skip:
retn;
@@ -609,7 +609,7 @@ void Interface::init() {
// Fix for interface windows with 'Hidden' and 'ScriptWindow' flags
// Hidden - will not toggle the mouse cursor when the cursor hovers over a hidden window
- // ScriptWindow - prevents player's movement when clicking on the window if the 'Transparent' flag is not set
+ // ScriptWindow - prevents the player from moving when clicking on the window if the 'Transparent' flag is not set
HookCall(0x44B737, gmouse_bk_process_hook);
LoadGameHook::OnBeforeGameInit() += []() {
if (hrpVersionValid) IFACE_BAR_MODE = *(BYTE*)HRPAddress(0x1006EB0C) != 0;
diff --git a/sfall/Modules/ScriptExtender.cpp b/sfall/Modules/ScriptExtender.cpp
index d6f3d5ff..9bad83f0 100644
--- a/sfall/Modules/ScriptExtender.cpp
+++ b/sfall/Modules/ScriptExtender.cpp
@@ -16,9 +16,7 @@
* along with this program. If not, see .
*/
-#include
//#include
-#include
#include
#include