summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-20 11:30:56 +0100
committerGitHub <noreply@github.com>2020-02-20 11:30:56 +0100
commitbd61281a5f515065b05be008dd3d6b73a03f5a7c (patch)
tree0add52fc270f808b4b2ad0bf7c970d72338c667e /servers
parent1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff)
parent69c95f4b4c128a22777af1e155bc24c7033decca (diff)
Merge pull request #36368 from reduz/variant-rework
Reworked signal system, added support for Callable and Signal
Diffstat (limited to 'servers')
-rw-r--r--servers/physics/area_sw.cpp4
-rw-r--r--servers/physics/body_sw.cpp2
-rw-r--r--servers/physics_2d/area_2d_sw.cpp4
-rw-r--r--servers/physics_2d/body_2d_sw.cpp2
-rw-r--r--servers/visual/visual_server_raster.cpp4
5 files changed, 8 insertions, 8 deletions
diff --git a/servers/physics/area_sw.cpp b/servers/physics/area_sw.cpp
index 1016afcaba..4b54a56253 100644
--- a/servers/physics/area_sw.cpp
+++ b/servers/physics/area_sw.cpp
@@ -200,7 +200,7 @@ void AreaSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
@@ -232,7 +232,7 @@ void AreaSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index b71c9772df..8819941f04 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -713,7 +713,7 @@ void BodySW::call_queries() {
} else {
const Variant *vp[2] = { &v, &fi_callback->udata };
- Variant::CallError ce;
+ Callable::CallError ce;
int argc = (fi_callback->udata.get_type() == Variant::NIL) ? 1 : 2;
obj->call(fi_callback->method, vp, argc, ce);
}
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index c67d870b2a..45666d9d09 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -200,7 +200,7 @@ void Area2DSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
@@ -232,7 +232,7 @@ void Area2DSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index 4de52cacbd..863b422996 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -612,7 +612,7 @@ void Body2DSW::call_queries() {
set_force_integration_callback(ObjectID(), StringName());
} else {
- Variant::CallError ce;
+ Callable::CallError ce;
if (fi_callback->callback_udata.get_type() != Variant::NIL) {
obj->call(fi_callback->method, vp, 2, ce);
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index b27c01cccc..35ec52a5c0 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -120,10 +120,10 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) {
Object *obj = ObjectDB::get_instance(frame_drawn_callbacks.front()->get().object);
if (obj) {
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant *v = &frame_drawn_callbacks.front()->get().param;
obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce);
ERR_PRINT("Error calling frame drawn function: " + err);
}