Added use_item_on_dude macro to sfall.h

Various code edits:
* Implemented more HookCalls/MakeCalls/SafeWriteBatch in code.
* Moved return/jump address consts into their respective functions.
This commit is contained in:
NovaRain
2020-04-18 21:25:54 +08:00
parent e3af4f5754
commit 7decec4a2c
18 changed files with 65 additions and 61 deletions
+6
View File
@@ -238,6 +238,12 @@
#define ADD_PERK_MODE_PERK (2) // add to the player's perks
#define ADD_PERK_MODE_REMOVE (4) // remove from the list of selectable perks (after added to the player)
// instantly apply the item to dude_obj (w/o animation)
#define use_item_on_dude(item) set_self(dude_obj); \
set_self(dude_obj); \
use_obj_on_obj(item, dude_obj); \
set_self(0)
// sfall_funcX macros
#define add_global_timer_event(time, fixedParam) sfall_func2("add_g_timer_event", time, fixedParam)
#define add_iface_tag sfall_func0("add_iface_tag")