Added scripting functions: get/set_flags. This allows, for example, to turn character into a ghost dynamically from script.

This commit is contained in:
phobos2077
2017-03-13 04:12:52 +07:00
parent c63ddf3e9c
commit fa583d41d7
6 changed files with 21 additions and 3 deletions
+1 -2
View File
@@ -2,7 +2,6 @@
#include "..\scripting\headers\define_extra.h"
//#include "..\..\..\!SRC\headers\define.h"
#define it_flags (6)
#define CRITTER_IS_DEAD (1)
variable highlightKey;
@@ -10,7 +9,7 @@ variable highlightContainers;
procedure toggle_highlight_object(variable obj, variable color) begin
if obj
and (proto_data(obj_pid(obj), it_flags) bwand FLAG_NOHIGHLIGHT) == 0
and (get_flags(obj) bwand FLAG_NOHIGHLIGHT) == 0
and (color == 0 or not obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT)) then begin
set_outline(obj, color);
end
+2
View File
@@ -207,4 +207,6 @@
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
#define set_outline(obj, color) sfall_func2("set_outline", obj, color)
#define get_outline(obj) sfall_func1("get_outline", obj)
#define set_flags(obj, color) sfall_func2("set_flags", obj, color)
#define get_flags(obj) sfall_func1("get_flags", obj)
#define tile_refresh_display sfall_func0("tile_refresh_display")