summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/godot/godot_rect2.cpp16
-rw-r--r--modules/gdnative/godot/godot_rect2.h6
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp6
-rw-r--r--modules/hdr/image_loader_hdr.cpp2
-rw-r--r--modules/squish/image_compress_squish.cpp4
-rw-r--r--modules/visual_script/visual_script_editor.cpp6
-rw-r--r--modules/visual_script/visual_script_editor.h1
7 files changed, 23 insertions, 18 deletions
diff --git a/modules/gdnative/godot/godot_rect2.cpp b/modules/gdnative/godot/godot_rect2.cpp
index eea95ca6fe..0e456ea3ba 100644
--- a/modules/gdnative/godot/godot_rect2.cpp
+++ b/modules/gdnative/godot/godot_rect2.cpp
@@ -38,11 +38,11 @@ extern "C" {
void _rect2_api_anchor() {}
-void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) {
- const Vector2 *pos = (const Vector2 *)p_pos;
+void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) {
+ const Vector2 *position = (const Vector2 *)p_pos;
const Vector2 *size = (const Vector2 *)p_size;
Rect2 *dest = (Rect2 *)r_dest;
- *dest = Rect2(*pos, *size);
+ *dest = Rect2(*position, *size);
}
void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) {
@@ -124,11 +124,11 @@ godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const god
return *self == *b;
}
-godot_vector2 GDAPI godot_rect2_get_pos(const godot_rect2 *p_self) {
+godot_vector2 GDAPI godot_rect2_get_position(const godot_rect2 *p_self) {
godot_vector2 dest;
Vector2 *d = (Vector2 *)&dest;
const Rect2 *self = (const Rect2 *)p_self;
- *d = self->get_pos();
+ *d = self->get_position();
return dest;
}
@@ -140,10 +140,10 @@ godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self) {
return dest;
}
-void GDAPI godot_rect2_set_pos(godot_rect2 *p_self, const godot_vector2 *p_pos) {
+void GDAPI godot_rect2_set_position(godot_rect2 *p_self, const godot_vector2 *p_pos) {
Rect2 *self = (Rect2 *)p_self;
- const Vector2 *pos = (const Vector2 *)p_pos;
- self->set_pos(*pos);
+ const Vector2 *position = (const Vector2 *)p_pos;
+ self->set_position(*position);
}
void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size) {
diff --git a/modules/gdnative/godot/godot_rect2.h b/modules/gdnative/godot/godot_rect2.h
index 9743321a3b..488a1204f7 100644
--- a/modules/gdnative/godot/godot_rect2.h
+++ b/modules/gdnative/godot/godot_rect2.h
@@ -46,7 +46,7 @@ typedef struct godot_rect2 {
#include "../godot.h"
#include "godot_vector2.h"
-void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size);
+void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size);
void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height);
godot_string GDAPI godot_rect2_as_string(const godot_rect2 *p_self);
@@ -71,11 +71,11 @@ godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vect
godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b);
-godot_vector2 GDAPI godot_rect2_get_pos(const godot_rect2 *p_self);
+godot_vector2 GDAPI godot_rect2_get_position(const godot_rect2 *p_self);
godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self);
-void GDAPI godot_rect2_set_pos(godot_rect2 *p_self, const godot_vector2 *p_pos);
+void GDAPI godot_rect2_set_position(godot_rect2 *p_self, const godot_vector2 *p_pos);
void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size);
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index e567e08c79..121b403f64 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -560,7 +560,7 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
else
return false;
- return do_input_action(p_camera, Point2(mb->get_pos().x, mb->get_pos().y), true);
+ return do_input_action(p_camera, Point2(mb->get_position().x, mb->get_position().y), true);
} else {
if (
@@ -604,7 +604,7 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
if (mm.is_valid()) {
- return do_input_action(p_camera, mm->get_pos(), false);
+ return do_input_action(p_camera, mm->get_position(), false);
}
} else if (edit_mode->get_selected() == 1) {
@@ -616,7 +616,7 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
- Point2 point = mb->get_pos();
+ Point2 point = mb->get_position();
Camera *camera = p_camera;
Vector3 from = camera->project_ray_origin(point);
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp
index 85819104cf..19df27b962 100644
--- a/modules/hdr/image_loader_hdr.cpp
+++ b/modules/hdr/image_loader_hdr.cpp
@@ -131,7 +131,7 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
//convert
for (int i = 0; i < width * height; i++) {
- float exp = pow(2, ptr[3] - 128);
+ float exp = pow(2.0f, ptr[3] - 128.0f);
Color c(
ptr[0] * exp / 255.0,
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index efed0b8665..e927f1ceaa 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -153,8 +153,8 @@ void image_compress_squish(Image *p_image, bool p_srgb) {
int bh = h % 4 != 0 ? h + (4 - h % 4) : h;
int src_ofs = p_image->get_mipmap_offset(i);
- squish::CompressImage(&rb[src_ofs], bw, bh, &wb[dst_ofs], squish_comp);
- dst_ofs += (MAX(4, w) * MAX(4, h)) >> shift;
+ squish::CompressImage(&rb[src_ofs], w, h, &wb[dst_ofs], squish_comp);
+ dst_ofs += (MAX(4, bw) * MAX(4, bh)) >> shift;
w >>= 1;
h >>= 1;
}
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 5839bc9243..941668d474 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1011,7 +1011,7 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
}
Rect2 pos = members->get_item_rect(ti);
- new_function_menu->set_position(members->get_global_position() + pos.pos + Vector2(0, pos.size.y));
+ new_function_menu->set_position(members->get_global_position() + pos.position + Vector2(0, pos.size.y));
new_function_menu->popup();
return;
} else if (p_button == 0) {
@@ -2240,6 +2240,10 @@ void VisualScriptEditor::add_callback(const String &p_function, PoolStringArray
//undo_redo->clear_history();
}
+bool VisualScriptEditor::show_members_overview() {
+ return false;
+}
+
void VisualScriptEditor::update_settings() {
_update_graph();
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index bb832431a0..92f31f20da 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -248,6 +248,7 @@ public:
virtual void get_breakpoints(List<int> *p_breakpoints);
virtual void add_callback(const String &p_function, PoolStringArray p_args);
virtual void update_settings();
+ virtual bool show_members_overview();
virtual void set_debugger_active(bool p_active);
virtual void set_tooltip_request_func(String p_method, Object *p_obj);
virtual Control *get_edit_menu();