summaryrefslogtreecommitdiffstats
path: root/core/script_language.h
diff options
context:
space:
mode:
authorErik <35656626+SeleckyErik@users.noreply.github.com>2019-04-06 22:55:01 +0200
committerSeleckyErik <35656626+SeleckyErik@users.noreply.github.com>2019-10-23 02:51:32 +0100
commit8b0546d93b7487476e8ec290399d95fd172d9f50 (patch)
treeadbe77833e84bc2a90c095c26686ce40a907e221 /core/script_language.h
parent72dfa67dd3508f20592959d306e8f2ef159eea5f (diff)
downloadredot-engine-8b0546d93b7487476e8ec290399d95fd172d9f50.tar.gz
Implement game camera override
Implemented uniform API in Viewport class to override 2D and/or 3D camera. Added buttons in 2D and 3D editor viewport toolbars that override the running game camera transform with the editor viewport camera transform. Implemented via remote debugger protocol and camera override API. Removed LiveEditFuncs function pointers from ScriptDebugger class. Since the debugger got access to the SceneTree instance (if one exists), there is no need to store the function pointers. The live edit functions in SceneTree are used directly instead. Also removed the static version of live edit functions in SceneTree for the same reason. This reduced the SceneTree -> Debugger coupling too since the function pointers don't need to be set from SceneTree anymore. Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'. This is because the remote debugger is now using SceneTree directly and 'core/' classes should not depend on 'scene/' classes.
Diffstat (limited to 'core/script_language.h')
-rw-r--r--core/script_language.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/core/script_language.h b/core/script_language.h
index 116918fdc0..f90bb4b6c3 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -427,31 +427,6 @@ class ScriptDebugger {
ScriptLanguage *break_lang;
public:
- typedef void (*RequestSceneTreeMessageFunc)(void *);
-
- struct LiveEditFuncs {
-
- void *udata;
- void (*node_path_func)(void *, const NodePath &p_path, int p_id);
- void (*res_path_func)(void *, const String &p_path, int p_id);
-
- void (*node_set_func)(void *, int p_id, const StringName &p_prop, const Variant &p_value);
- void (*node_set_res_func)(void *, int p_id, const StringName &p_prop, const String &p_value);
- void (*node_call_func)(void *, int p_id, const StringName &p_method, VARIANT_ARG_DECLARE);
- void (*res_set_func)(void *, int p_id, const StringName &p_prop, const Variant &p_value);
- void (*res_set_res_func)(void *, int p_id, const StringName &p_prop, const String &p_value);
- void (*res_call_func)(void *, int p_id, const StringName &p_method, VARIANT_ARG_DECLARE);
- void (*root_func)(void *, const NodePath &p_scene_path, const String &p_scene_from);
-
- void (*tree_create_node_func)(void *, const NodePath &p_parent, const String &p_type, const String &p_name);
- void (*tree_instance_node_func)(void *, const NodePath &p_parent, const String &p_path, const String &p_name);
- void (*tree_remove_node_func)(void *, const NodePath &p_at);
- void (*tree_remove_and_keep_node_func)(void *, const NodePath &p_at, ObjectID p_keep_id);
- void (*tree_restore_node_func)(void *, ObjectID p_id, const NodePath &p_at, int p_at_pos);
- void (*tree_duplicate_node_func)(void *, const NodePath &p_at, const String &p_new_name);
- void (*tree_reparent_node_func)(void *, const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos);
- };
-
_FORCE_INLINE_ static ScriptDebugger *get_singleton() { return singleton; }
void set_lines_left(int p_left);
int get_lines_left() const;
@@ -480,8 +455,6 @@ public:
virtual bool is_remote() const { return false; }
virtual void request_quit() {}
- virtual void set_request_scene_tree_message_func(RequestSceneTreeMessageFunc p_func, void *p_udata) {}
- virtual void set_live_edit_funcs(LiveEditFuncs *p_funcs) {}
virtual void set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) {}
virtual bool is_profiling() const = 0;