diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-11-10 23:39:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 23:39:21 +0100 |
commit | 0008bd6bf3d00cc284199be668c0b03d9f2c5d77 (patch) | |
tree | 65ca78284e4ed1a2b07716018a721aaaf68d3830 /extension/src/openvic-extension/MapMesh.cpp | |
parent | f8da0860795d273452501fa4d7fbfcc40073a884 (diff) | |
parent | cf591eddfa59839c2620ebf119727f069b965dfe (diff) |
Merge pull request #163 from Spartan322/improve-binding
Diffstat (limited to 'extension/src/openvic-extension/MapMesh.cpp')
-rw-r--r-- | extension/src/openvic-extension/MapMesh.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/extension/src/openvic-extension/MapMesh.cpp b/extension/src/openvic-extension/MapMesh.cpp index e407391..a557105 100644 --- a/extension/src/openvic-extension/MapMesh.cpp +++ b/extension/src/openvic-extension/MapMesh.cpp @@ -2,24 +2,26 @@ #include <godot_cpp/templates/vector.hpp> +#include "openvic-extension/utility/ClassBindings.hpp" + using namespace godot; using namespace OpenVic; void MapMesh::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_aspect_ratio", "ratio"), &MapMesh::set_aspect_ratio); - ClassDB::bind_method(D_METHOD("get_aspect_ratio"), &MapMesh::get_aspect_ratio); + OV_BIND_METHOD(MapMesh::set_aspect_ratio, { "ratio" }); + OV_BIND_METHOD(MapMesh::get_aspect_ratio); - ClassDB::bind_method(D_METHOD("set_repeat_proportion", "proportion"), &MapMesh::set_repeat_proportion); - ClassDB::bind_method(D_METHOD("get_repeat_proportion"), &MapMesh::get_repeat_proportion); + OV_BIND_METHOD(MapMesh::set_repeat_proportion, { "proportion" }); + OV_BIND_METHOD(MapMesh::get_repeat_proportion); - ClassDB::bind_method(D_METHOD("set_subdivide_width", "divisions"), &MapMesh::set_subdivide_width); - ClassDB::bind_method(D_METHOD("get_subdivide_width"), &MapMesh::get_subdivide_width); + OV_BIND_METHOD(MapMesh::set_subdivide_width, { "divisions" }); + OV_BIND_METHOD(MapMesh::get_subdivide_width); - ClassDB::bind_method(D_METHOD("set_subdivide_depth", "divisions"), &MapMesh::set_subdivide_depth); - ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &MapMesh::get_subdivide_depth); + OV_BIND_METHOD(MapMesh::set_subdivide_depth, { "divisions" }); + OV_BIND_METHOD(MapMesh::get_subdivide_depth); - ClassDB::bind_method(D_METHOD("get_core_aabb"), &MapMesh::get_core_aabb); - ClassDB::bind_method(D_METHOD("is_valid_uv_coord"), &MapMesh::is_valid_uv_coord); + OV_BIND_METHOD(MapMesh::get_core_aabb); + OV_BIND_METHOD(MapMesh::is_valid_uv_coord); ADD_PROPERTY( PropertyInfo(Variant::FLOAT, "aspect_ratio", PROPERTY_HINT_NONE, "suffix:m"), "set_aspect_ratio", "get_aspect_ratio" |