mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
get_tile_fid correct for backwards compatibility and flexibility
- Allow to pass elevation using the free bits of the tileNum value to access elevations 1 and 2 (instead of defaulting to dude_elevation, which is not how it worked before) - Access roof FID and raw data using mode flags in the top 4 bits
This commit is contained in:
@@ -321,6 +321,9 @@
|
||||
#define get_npc_stat_max(stat) sfall_func2("get_stat_max", stat, 1)
|
||||
#define get_npc_stat_min(stat) sfall_func2("get_stat_min", stat, 1)
|
||||
#define get_sfall_arg_at(argNum) sfall_func1("get_sfall_arg_at", argNum)
|
||||
#define get_tile_fid_ext(tile, elev, mode) get_tile_fid(((mode bwand 0xF) * 0x10000000) bwor ((elev bwand 0xF) * 0x1000000) bwor (tile bwand 0xFFFFFF))
|
||||
#define get_tile_ground_fid(tile, elev) get_tile_fid_ext(tile, elev, 0)
|
||||
#define get_tile_roof_fid(tile, elev) get_tile_fid_ext(tile, elev, 1)
|
||||
#define get_terrain_name(x, y) sfall_func2("get_terrain_name", x, y)
|
||||
#define get_text_width(text) sfall_func1("get_text_width", text)
|
||||
#define has_fake_perk_npc(npc, perk) sfall_func2("has_fake_perk_npc", npc, perk)
|
||||
|
||||
Reference in New Issue
Block a user