diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-12 12:52:50 -0400 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-12 15:12:49 -0400 |
commit | 428f03cf06d3841b2a593f46aa42912ef5c82f3c (patch) | |
tree | c006361e19c5ecbc02534496f936d1a4a5ad6ef3 /modules | |
parent | 5052cb2b9104f57d0ff38d80da50bbeceb926e6f (diff) |
Updated function argument names
Diffstat (limited to 'modules')
-rw-r--r-- | modules/enet/networked_multiplayer_enet.h | 2 | ||||
-rw-r--r-- | modules/gdnative/gdnative.h | 2 | ||||
-rw-r--r-- | modules/gdnative/godot/string.cpp | 12 | ||||
-rw-r--r-- | modules/gdnative/godot/string.h | 4 | ||||
-rw-r--r-- | modules/gdscript/gd_function.cpp | 6 | ||||
-rw-r--r-- | modules/gridmap/grid_map.cpp | 16 | ||||
-rw-r--r-- | modules/gridmap/grid_map.h | 2 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.h | 4 | ||||
-rw-r--r-- | modules/nativescript/nativescript.h | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script.h | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 12 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 6 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.h | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 1 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.h | 6 |
15 files changed, 41 insertions, 40 deletions
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h index 8b971adf55..f2c3b838e4 100644 --- a/modules/enet/networked_multiplayer_enet.h +++ b/modules/enet/networked_multiplayer_enet.h @@ -113,7 +113,7 @@ public: virtual int get_packet_peer() const; - Error create_server(int p_port, int p_max_peers = 32, int p_in_bandwidth = 0, int p_out_bandwidth = 0); + Error create_server(int p_port, int p_max_clients = 32, int p_in_bandwidth = 0, int p_out_bandwidth = 0); Error create_client(const IP_Address &p_ip, int p_port, int p_in_bandwidth = 0, int p_out_bandwidth = 0); void close_connection(); diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h index b03866f432..003ec46a25 100644 --- a/modules/gdnative/gdnative.h +++ b/modules/gdnative/gdnative.h @@ -137,7 +137,7 @@ public: bool initialize(); bool terminate(); - Variant call_native(StringName p_call_type, StringName p_procedure_name, Array p_arguments = Array()); + Variant call_native(StringName p_native_call_type, StringName p_procedure_name, Array p_arguments = Array()); void call_native_raw(StringName p_raw_call_type, StringName p_procedure_name, void *data, int num_args, void **args, void *r_return); }; diff --git a/modules/gdnative/godot/string.cpp b/modules/gdnative/godot/string.cpp index 76cf1fba12..2235c12a2d 100644 --- a/modules/gdnative/godot/string.cpp +++ b/modules/gdnative/godot/string.cpp @@ -63,13 +63,13 @@ void GDAPI godot_string_new_unicode_data(godot_string *r_dest, const wchar_t *p_ memnew_placement(dest, String(p_contents, p_size)); } -void GDAPI godot_string_get_data(const godot_string *p_self, char *r_dest, int *p_size) { +void GDAPI godot_string_get_data(const godot_string *p_self, char *p_dest, int *p_size) { String *self = (String *)p_self; if (p_size != NULL) { *p_size = self->utf8().length(); } - if (r_dest != NULL) { - memcpy(r_dest, self->utf8().get_data(), *p_size); + if (p_dest != NULL) { + memcpy(p_dest, self->utf8().get_data(), *p_size); } } @@ -277,11 +277,11 @@ godot_int GDAPI godot_string_hex_to_int_without_prefix(const godot_string *p_sel return self->hex_to_int(true); } -godot_string GDAPI godot_string_insert(const godot_string *p_self, godot_int at_pos, godot_string p_content) { +godot_string GDAPI godot_string_insert(const godot_string *p_self, godot_int p_at_pos, godot_string p_string) { const String *self = (const String *)p_self; - String *content = (String *)&p_content; + String *content = (String *)&p_string; godot_string result; - memnew_placement(&result, String(self->insert(at_pos, *content))); + memnew_placement(&result, String(self->insert(p_at_pos, *content))); return result; } diff --git a/modules/gdnative/godot/string.h b/modules/gdnative/godot/string.h index bfe66aa5ec..c901ce36e6 100644 --- a/modules/gdnative/godot/string.h +++ b/modules/gdnative/godot/string.h @@ -83,8 +83,8 @@ godot_int GDAPI godot_string_findmk_from_in_place(const godot_string *p_self, co godot_int GDAPI godot_string_findn(const godot_string *p_self, godot_string p_what); godot_int GDAPI godot_string_findn_from(const godot_string *p_self, godot_string p_what, godot_int p_from); godot_int GDAPI find_last(const godot_string *p_self, godot_string p_what); -godot_string GDAPI godot_string_format(const godot_string *p_self, const godot_variant *values); -godot_string GDAPI godot_string_format_with_custom_placeholder(const godot_string *p_self, const godot_variant *values, const char *placeholder); +godot_string GDAPI godot_string_format(const godot_string *p_self, const godot_variant *p_values); +godot_string GDAPI godot_string_format_with_custom_placeholder(const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder); godot_string GDAPI godot_string_hex_encode_buffer(const uint8_t *p_buffer, godot_int p_len); godot_int GDAPI godot_string_hex_to_int(const godot_string *p_self); godot_int GDAPI godot_string_hex_to_int_without_prefix(const godot_string *p_self); diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp index cafcc1e965..13a7480a36 100644 --- a/modules/gdscript/gd_function.cpp +++ b/modules/gdscript/gd_function.cpp @@ -1233,10 +1233,10 @@ int GDFunction::get_default_argument_count() const { return default_arguments.size(); } -int GDFunction::get_default_argument_addr(int p_arg) const { +int GDFunction::get_default_argument_addr(int p_idx) const { - ERR_FAIL_INDEX_V(p_arg, default_arguments.size(), -1); - return default_arguments[p_arg]; + ERR_FAIL_INDEX_V(p_idx, default_arguments.size(), -1); + return default_arguments[p_idx]; } StringName GDFunction::get_name() const { diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index f241a96e58..1205776882 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -1049,21 +1049,21 @@ void GridMap::_update_area_instances() { } } -Error GridMap::create_area(int p_id, const Rect3 &p_bounds) { +Error GridMap::create_area(int p_id, const Rect3 &p_area) { ERR_FAIL_COND_V(area_map.has(p_id), ERR_ALREADY_EXISTS); ERR_EXPLAIN("ID 0 is taken as global area, start from 1"); ERR_FAIL_COND_V(p_id == 0, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_bounds.has_no_area(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_area.has_no_area(), ERR_INVALID_PARAMETER); // FIRST VALIDATE AREA IndexKey from, to; - from.x = p_bounds.position.x; - from.y = p_bounds.position.y; - from.z = p_bounds.position.z; - to.x = p_bounds.position.x + p_bounds.size.x; - to.y = p_bounds.position.y + p_bounds.size.y; - to.z = p_bounds.position.z + p_bounds.size.z; + from.x = p_area.position.x; + from.y = p_area.position.y; + from.z = p_area.position.z; + to.x = p_area.position.x + p_area.size.x; + to.y = p_area.position.y + p_area.size.y; + to.z = p_area.position.z + p_area.size.z; for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) { //this should somehow be faster... diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index c386e4f66b..106bf82dc2 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -242,7 +242,7 @@ public: void set_center_z(bool p_enable); bool get_center_z() const; - void set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_orientation = 0); + void set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_rot = 0); int get_cell_item(int p_x, int p_y, int p_z) const; int get_cell_item_orientation(int p_x, int p_y, int p_z) const; diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h index 1572f4fbe5..a1b2c96ccd 100644 --- a/modules/gridmap/grid_map_editor_plugin.h +++ b/modules/gridmap/grid_map_editor_plugin.h @@ -239,8 +239,8 @@ public: virtual bool forward_spatial_input_event(Camera *p_camera, const Ref<InputEvent> &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); } virtual String get_name() const { return "GridMap"; } bool has_main_screen() const { return false; } - virtual void edit(Object *p_node); - virtual bool handles(Object *p_node) const; + virtual void edit(Object *p_object); + virtual bool handles(Object *p_object) const; virtual void make_visible(bool p_visible); GridMapEditorPlugin(EditorNode *p_node); diff --git a/modules/nativescript/nativescript.h b/modules/nativescript/nativescript.h index c60effd0c1..b62fefec40 100644 --- a/modules/nativescript/nativescript.h +++ b/modules/nativescript/nativescript.h @@ -120,7 +120,7 @@ public: void set_class_name(String p_class_name); String get_class_name() const; - void set_library(Ref<GDNativeLibrary> library); + void set_library(Ref<GDNativeLibrary> p_library); Ref<GDNativeLibrary> get_library() const; virtual bool can_instance() const; diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index 63ac5769c6..b61b67a890 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -291,8 +291,8 @@ public: void data_disconnect(const StringName &p_func, int p_from_node, int p_from_port, int p_to_node, int p_to_port); bool has_data_connection(const StringName &p_func, int p_from_node, int p_from_port, int p_to_node, int p_to_port) const; void get_data_connection_list(const StringName &p_func, List<DataConnection> *r_connection) const; - bool is_input_value_port_connected(const StringName &p_name, int p_node, int p_port) const; - bool get_input_value_port_connection_source(const StringName &p_name, int p_node, int p_port, int *r_node, int *r_port) const; + bool is_input_value_port_connected(const StringName &p_func, int p_node, int p_port) const; + bool get_input_value_port_connection_source(const StringName &p_func, int p_node, int p_port, int *r_node, int *r_port) const; void add_variable(const StringName &p_name, const Variant &p_default_value = Variant(), bool p_export = false); bool has_variable(const StringName &p_name) const; diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 8912227692..0192fe33f4 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -2450,17 +2450,17 @@ void VisualScriptEditor::_graph_connect_to_empty(const String &p_from, int p_fro port_action_popup->popup(); } -VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node, int p_output, Set<int> &visited_nodes) { +VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_action_node, int p_port_action_output, Set<int> &visited_nodes) { VisualScriptNode::TypeGuess tg; tg.type = Variant::NIL; - if (visited_nodes.has(p_node)) + if (visited_nodes.has(p_port_action_node)) return tg; //no loop - visited_nodes.insert(p_node); + visited_nodes.insert(p_port_action_node); - Ref<VisualScriptNode> node = script->get_node(edited_func, p_node); + Ref<VisualScriptNode> node = script->get_node(edited_func, p_port_action_node); if (!node.is_valid()) { @@ -2479,7 +2479,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node, i int from_node; int from_port; - if (script->get_input_value_port_connection_source(edited_func, p_node, i, &from_node, &from_port)) { + if (script->get_input_value_port_connection_source(edited_func, p_port_action_node, i, &from_node, &from_port)) { g = _guess_output_type(from_node, from_port, visited_nodes); } else { @@ -2501,7 +2501,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node, i in_guesses.push_back(g); } - return node->guess_output_type(in_guesses.ptr(), p_output); + return node->guess_output_type(in_guesses.ptr(), p_port_action_output); } void VisualScriptEditor::_port_action_menu(int p_option) { diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 3c057cdbd5..afdf50027e 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -341,12 +341,12 @@ String VisualScriptFunctionCall::get_base_script() const { return base_script; } -void VisualScriptFunctionCall::set_singleton(const StringName &p_path) { +void VisualScriptFunctionCall::set_singleton(const StringName &p_type) { - if (singleton == p_path) + if (singleton == p_type) return; - singleton = p_path; + singleton = p_type; Object *obj = ProjectSettings::get_singleton()->get_singleton_object(singleton); if (obj) { base_type = obj->get_class(); diff --git a/modules/visual_script/visual_script_func_nodes.h b/modules/visual_script/visual_script_func_nodes.h index 7839748661..3b38d0d08f 100644 --- a/modules/visual_script/visual_script_func_nodes.h +++ b/modules/visual_script/visual_script_func_nodes.h @@ -70,7 +70,7 @@ private: MethodInfo method_cache; void _update_method_cache(); - void _set_argument_cache(const Dictionary &p_args); + void _set_argument_cache(const Dictionary &p_cache); Dictionary _get_argument_cache() const; protected: diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 923e425997..4f9cd4a33b 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -1208,6 +1208,7 @@ void VisualScriptPreload::set_preload(const Ref<Resource> &p_preload) { preload = p_preload; ports_changed_notify(); } + Ref<Resource> VisualScriptPreload::get_preload() const { return preload; diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h index ff49417114..6ce906efe0 100644 --- a/modules/visual_script/visual_script_nodes.h +++ b/modules/visual_script/visual_script_nodes.h @@ -196,7 +196,7 @@ public: virtual String get_text() const; virtual String get_category() const { return "data"; } - void set_variable(StringName p_var); + void set_variable(StringName p_variable); StringName get_variable() const; virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance); @@ -230,7 +230,7 @@ public: virtual String get_text() const; virtual String get_category() const { return "data"; } - void set_variable(StringName p_var); + void set_variable(StringName p_variable); StringName get_variable() const; virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance); @@ -301,7 +301,7 @@ public: virtual String get_text() const; virtual String get_category() const { return "data"; } - void set_preload(const Ref<Resource> &p_value); + void set_preload(const Ref<Resource> &p_preload); Ref<Resource> get_preload() const; virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance); |