mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Changed the implementation of AutoQuickSave
* now it sets the number of pages used for quick saving. Added related macros for controlling the save slot with scripts.
This commit is contained in:
@@ -257,16 +257,10 @@
|
||||
if (get_flags(obj1) bwand FLAG_MULTIHEX) then distance--; \
|
||||
if (get_flags(obj2) bwand FLAG_MULTIHEX) then distance--
|
||||
|
||||
|
||||
/* sfall metarule3 function macros */
|
||||
// sets the number of days (range 1...127) for the Frank Horrigan encounter, or disable the encounter if days is set to 0
|
||||
#define set_horrigan_days(day) metarule3(200, day, 0, 0)
|
||||
// clears the keyboard input buffer, use it in the HOOK_KEYPRESS hook to clear keyboard events before calling functions that are waiting for keyboard input
|
||||
#define clear_keyboard_buffer metarule3(201, 0, 0, 0)
|
||||
|
||||
// checks if the specified PID number exists in the list of registered protos
|
||||
#define check_pid(pid) (get_proto_data(pid, 0) != -1)
|
||||
|
||||
|
||||
/* sfall_funcX macros */
|
||||
#define add_extra_msg_file(name) sfall_func1("add_extra_msg_file", name)
|
||||
#define add_global_timer_event(time, fixedParam) sfall_func2("add_g_timer_event", time, fixedParam)
|
||||
@@ -365,4 +359,19 @@
|
||||
#define unwield_slot(critter, slot) sfall_func2("unwield_slot", critter, slot)
|
||||
#define win_fill_color(x, y, width, height, color) sfall_func5("win_fill_color", x, y, width, height, color)
|
||||
|
||||
|
||||
/* sfall metarule3 function macros */
|
||||
// sets the number of days (range 1...127) for the Frank Horrigan encounter, or disable the encounter if days is set to 0
|
||||
#define set_horrigan_days(day) metarule3(200, day, 0, 0)
|
||||
// clears the keyboard input buffer, use it in the HOOK_KEYPRESS hook to clear keyboard events before calling functions that are waiting for keyboard input
|
||||
#define clear_keyboard_buffer metarule3(201, 0, 0, 0)
|
||||
|
||||
// functions to control the save slot
|
||||
// Note: page and slot here are 0-indexed instead of 1-indexed displayed in game
|
||||
#define get_current_save_slot metarule3(1000, 0, 0, 0) // returns the amount: page + slot
|
||||
#define set_current_save_slot(page, slot) metarule3(1001, page, slot, 0)
|
||||
#define get_current_quick_save_page metarule3(1002, 0, 0, 0)
|
||||
#define get_current_quick_save_slot metarule3(1003, 0, 0, 0)
|
||||
#define set_current_quick_save_slot(page, slot, check) metarule3(1004, page, slot, check) // check: 1 - don't check slot when saving
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user