Updated documents for hook/function changes

This commit is contained in:
NovaRain
2023-06-13 12:33:28 +08:00
parent f413bb8b9a
commit 6f45d45fcd
6 changed files with 37 additions and 10 deletions
+24 -3
View File
@@ -230,6 +230,20 @@ FUNCTION REFERENCE
##### `void set_critter_pickpocket_mod(object critter, int max, int mod)`
- The same as above, but applies only to specific critter.
-----
##### `int get_tile_fid(int tileData)`
- Returns FID information about the square under the given tile at elevation 0.
- Pass elevation as 4-bit number in bits 25-28 to access other elevations.
- Pass result mode in bits 29-32: 0 - ground FID, 1 - roof FID, 2 - raw data. Following macros are available in **sfall.h**:
-----
##### `int get_tile_ground_fid(int tileNum, int elevation)`
- Returns FID of a ground tile at given tile number and elevation.
-----
##### `int get_tile_roof_fid(int tileNum, int elevation)`
- Returns FID of a roof tile at given tile number and elevation. Note that FID of 1 is used when there is no actual roof.
-----
##### `void reg_anim_combat_check`
- Allows enabling all `reg_anim_*` functions in combat (including vanilla functions) if set to 0. It is automatically reset at the end of each frame, so you need to call it before `reg_anim_begin() ... reg_anim_end()` code block.
@@ -257,7 +271,7 @@ FUNCTION REFERENCE
-----
##### `void reg_anim_turn_towards(object, tile/target, delay)`
- Makes object change its direction to face given tile num or target object.
- Makes object change its direction to face given tile number or target object.
-----
##### `void reg_anim_callback(procedure proc)`
@@ -569,10 +583,16 @@ sfall_funcX metarule functions
`object sfall_func0("outlined_object")`
- Returns an object that is currently highlighted by hovering the mouse above it
----
#### set_dude_obj
`object sfall_func1("set_dude_obj", critter)`
- Take control of a given critter
- Passing 0 will reset control back to "real" dude
----
#### real_dude_obj
`void sfall_func0("real_dude_obj")`
- Returns the initial `dude_obj` after taking control of other critters in combat
- Returns the initial `dude_obj` after `set_dude_obj` was used
----
#### get_ini_sections
@@ -700,7 +720,8 @@ sfall_funcX metarule functions
----
#### get_string_pointer
`int sfall_func1("get_string_pointer", string text)`
- Returns a pointer to a string variable or to a text
- (DEPRECATED) Returns a pointer to a string variable or to a text
- __NOTE:__ this function is intended for use only in `HOOK_DESCRIPTIONOBJ`. Starting from sfall 4.3.9/3.8.39, you can return normal strings directly in the hook without calling the function
----
#### dialog_message