mirror of
https://github.com/Relintai/terraman_2d.git
synced 2024-11-12 10:15:18 +01:00
Work on fixing compile.
This commit is contained in:
parent
01c83d647c
commit
cbcde2c3a5
@ -37,7 +37,7 @@ Terrain2DLevelGenerator::~Terrain2DLevelGenerator() {
|
||||
}
|
||||
|
||||
void Terrain2DLevelGenerator::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("generate_chunk", "chunk"), &Terrain2DLevelGenerator::generate_chunk);
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ void Terrain2DLibrary::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "initialized", PROPERTY_HINT_NONE, "", 0), "set_initialized", "get_initialized");
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "ret"), "_supports_caching"));
|
||||
//BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "ret"), "_supports_caching"));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_supports_caching);
|
||||
#endif
|
||||
@ -391,15 +391,15 @@ void Terrain2DLibrary::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "prop_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "prop_texture_set", "prop_texture_get");
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::INT, "material_index"), PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture")));
|
||||
//BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::INT, "material_index"), PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_setup_material_albedo, "material_index", "texture");
|
||||
#endif
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMaterialCache"), "_material_cache_get", PropertyInfo(Variant::INT, "key")));
|
||||
BIND_VMETHOD(MethodInfo("_material_cache_unref", PropertyInfo(Variant::INT, "key")));
|
||||
//BIND_VMETHOD(MethodInfo("_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMaterialCache"), "_material_cache_get", PropertyInfo(Variant::INT, "key")));
|
||||
//BIND_VMETHOD(MethodInfo("_material_cache_unref", PropertyInfo(Variant::INT, "key")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_material_cache_get_key, "chunk", "texture");
|
||||
GDVIRTUAL_BIND(_material_cache_get, "key");
|
||||
@ -418,9 +418,9 @@ void Terrain2DLibrary::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "material_set", "material_get");
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_liquid_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMaterialCache"), "_liquid_material_cache_get", PropertyInfo(Variant::INT, "key")));
|
||||
BIND_VMETHOD(MethodInfo("_liquid_material_cache_unref", PropertyInfo(Variant::INT, "key")));
|
||||
//BIND_VMETHOD(MethodInfo("_liquid_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMaterialCache"), "_liquid_material_cache_get", PropertyInfo(Variant::INT, "key")));
|
||||
//BIND_VMETHOD(MethodInfo("_liquid_material_cache_unref", PropertyInfo(Variant::INT, "key")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_liquid_material_cache_get_key, "chunk", "texture");
|
||||
GDVIRTUAL_BIND(_liquid_material_cache_get, "key");
|
||||
@ -439,9 +439,9 @@ void Terrain2DLibrary::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "liquid_material", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "liquid_material_set", "liquid_material_get");
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_prop_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMaterialCache"), "_prop_material_cache_get", PropertyInfo(Variant::INT, "key")));
|
||||
BIND_VMETHOD(MethodInfo("_prop_material_cache_unref", PropertyInfo(Variant::INT, "key")));
|
||||
//BIND_VMETHOD(MethodInfo("_prop_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMaterialCache"), "_prop_material_cache_get", PropertyInfo(Variant::INT, "key")));
|
||||
//BIND_VMETHOD(MethodInfo("_prop_material_cache_unref", PropertyInfo(Variant::INT, "key")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_prop_material_cache_get_key, "chunk", "texture");
|
||||
GDVIRTUAL_BIND(_prop_material_cache_get, "key");
|
||||
|
@ -314,7 +314,7 @@ void Terrain2DLibraryMerger::_setup_material_albedo(const int material_index, co
|
||||
}
|
||||
|
||||
if (shmat.is_valid()) {
|
||||
shmat->set_shader_param("texture_albedo", texture);
|
||||
shmat->set_shader_parameter("texture_albedo", texture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ SOFTWARE.
|
||||
|
||||
#include "../defines.h"
|
||||
#include "../world/default/terrain_2d_chunk_default.h"
|
||||
#include "core/hashfuncs.h"
|
||||
#include "core/templates/hashfuncs.h"
|
||||
#include "core/message_queue.h"
|
||||
#include "terrain_2d_material_cache_pcm.h"
|
||||
|
||||
@ -689,7 +689,7 @@ void Terrain2DLibraryMergerPCM::_setup_material_albedo(const int material_index,
|
||||
}
|
||||
|
||||
if (shmat.is_valid()) {
|
||||
shmat->set_shader_param("texture_albedo", texture);
|
||||
shmat->set_shader_parameter("texture_albedo", texture);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ void Terrain2DMaterialCache::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("dec_ref_count"), &Terrain2DMaterialCache::dec_ref_count);
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture")));
|
||||
//BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_setup_material_albedo, "texture");
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ Rect2 Terrain2DMaterialCachePCM::additional_texture_get_uv_rect(const Ref<Textur
|
||||
return Rect2(0, 0, 1, 1);
|
||||
}
|
||||
|
||||
Ref<Image> image = tex->get_data();
|
||||
Ref<Image> image = tex->get_image();
|
||||
|
||||
if (!image.is_valid()) {
|
||||
return Rect2(0, 0, 1, 1);
|
||||
@ -165,7 +165,7 @@ void Terrain2DMaterialCachePCM::_setup_material_albedo(Ref<Texture> texture) {
|
||||
Ref<ShaderMaterial> shmat = m;
|
||||
|
||||
if (shmat.is_valid()) {
|
||||
shmat->set_shader_param("texture_albedo", texture);
|
||||
shmat->set_shader_parameter("texture_albedo", texture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -936,9 +936,9 @@ Terrain2DMesher::~Terrain2DMesher() {
|
||||
|
||||
void Terrain2DMesher::_bind_methods() {
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_add_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo("_bake_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo("_bake_liquid_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_add_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_bake_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_bake_liquid_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_add_chunk, "chunk");
|
||||
GDVIRTUAL_BIND(_bake_colors, "chunk");
|
||||
@ -998,7 +998,7 @@ void Terrain2DMesher::_bind_methods() {
|
||||
#endif
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_add_mesher", PropertyInfo(Variant::OBJECT, "mesher", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMesher")));
|
||||
//BIND_VMETHOD(MethodInfo("_add_mesher", PropertyInfo(Variant::OBJECT, "mesher", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DMesher")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_add_mesher, "mesher");
|
||||
#endif
|
||||
|
@ -37,7 +37,6 @@ SOFTWARE.
|
||||
|
||||
class Terrain2DLightNode : public Spatial {
|
||||
GDCLASS(Terrain2DLightNode, Spatial);
|
||||
OBJ_CATEGORY("Prop2Ds");
|
||||
|
||||
public:
|
||||
//make it turn into a normal light if voxelman isn't present?
|
||||
|
@ -293,8 +293,8 @@ Terrain2DJob::~Terrain2DJob() {
|
||||
}
|
||||
|
||||
void Terrain2DJob::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_build_phase_type"), &Terrain2DJob::get_build_phase_type);
|
||||
ClassDB::bind_method(D_METHOD("set_build_phase_type", "value"), &Terrain2DJob::set_build_phase_type);
|
||||
@ -311,14 +311,14 @@ void Terrain2DJob::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("next_job"), &Terrain2DJob::next_job);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_reset"));
|
||||
//BIND_VMETHOD(MethodInfo("_reset"));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("reset"), &Terrain2DJob::reset);
|
||||
ClassDB::bind_method(D_METHOD("_reset"), &Terrain2DJob::_reset);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_execute"), &Terrain2DJob::_execute);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_execute_phase"));
|
||||
//BIND_VMETHOD(MethodInfo("_execute_phase"));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("execute_phase"), &Terrain2DJob::execute_phase);
|
||||
ClassDB::bind_method(D_METHOD("_execute_phase"), &Terrain2DJob::_execute_phase);
|
||||
@ -350,7 +350,7 @@ void Terrain2DJob::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("should_do", "just_check"), &Terrain2DJob::should_do, DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("should_return"), &Terrain2DJob::should_return);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_execute"));
|
||||
//BIND_VMETHOD(MethodInfo("_execute"));
|
||||
ClassDB::bind_method(D_METHOD("execute"), &Terrain2DJob::execute);
|
||||
|
||||
ADD_SIGNAL(MethodInfo("completed"));
|
||||
|
@ -1381,32 +1381,32 @@ void Terrain2DChunk::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
void Terrain2DChunk::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("mesh_generation_finished", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_mesh_data_resource_added", PropertyInfo(Variant::INT, "index")));
|
||||
//BIND_VMETHOD(MethodInfo("_mesh_data_resource_added", PropertyInfo(Variant::INT, "index")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_channel_setup"));
|
||||
//BIND_VMETHOD(MethodInfo("_channel_setup"));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_bake_lights"));
|
||||
BIND_VMETHOD(MethodInfo("_bake_light", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DLight")));
|
||||
BIND_VMETHOD(MethodInfo("_clear_baked_lights"));
|
||||
//BIND_VMETHOD(MethodInfo("_bake_lights"));
|
||||
//BIND_VMETHOD(MethodInfo("_bake_light", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DLight")));
|
||||
//BIND_VMETHOD(MethodInfo("_clear_baked_lights"));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("bake_lights"), &Terrain2DChunk::bake_lights);
|
||||
ClassDB::bind_method(D_METHOD("bake_light", "light"), &Terrain2DChunk::bake_light);
|
||||
ClassDB::bind_method(D_METHOD("clear_baked_lights"), &Terrain2DChunk::clear_baked_lights);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_enter_tree"));
|
||||
BIND_VMETHOD(MethodInfo("_exit_tree"));
|
||||
BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
BIND_VMETHOD(MethodInfo("_world_transform_changed"));
|
||||
BIND_VMETHOD(MethodInfo("_visibility_changed", PropertyInfo(Variant::BOOL, "visible")));
|
||||
BIND_VMETHOD(MethodInfo("_world_light_added", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DLight")));
|
||||
BIND_VMETHOD(MethodInfo("_world_light_removed", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DLight")));
|
||||
BIND_VMETHOD(MethodInfo("_draw"));
|
||||
//BIND_VMETHOD(MethodInfo("_enter_tree"));
|
||||
//BIND_VMETHOD(MethodInfo("_exit_tree"));
|
||||
//BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_world_transform_changed"));
|
||||
//BIND_VMETHOD(MethodInfo("_visibility_changed", PropertyInfo(Variant::BOOL, "visible")));
|
||||
//BIND_VMETHOD(MethodInfo("_world_light_added", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DLight")));
|
||||
//BIND_VMETHOD(MethodInfo("_world_light_removed", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DLight")));
|
||||
//BIND_VMETHOD(MethodInfo("_draw"));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_generation_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
BIND_VMETHOD(MethodInfo("_generation_physics_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_generation_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_generation_physics_process", PropertyInfo(Variant::REAL, "delta")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_finalize_build"));
|
||||
//BIND_VMETHOD(MethodInfo("_finalize_build"));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("enter_tree"), &Terrain2DChunk::enter_tree);
|
||||
ClassDB::bind_method(D_METHOD("exit_tree"), &Terrain2DChunk::exit_tree);
|
||||
@ -1665,7 +1665,7 @@ void Terrain2DChunk::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("collider_remove", "index"), &Terrain2DChunk::collider_remove);
|
||||
ClassDB::bind_method(D_METHOD("colliders_clear"), &Terrain2DChunk::colliders_clear);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_build"));
|
||||
//BIND_VMETHOD(MethodInfo("_build"));
|
||||
ClassDB::bind_method(D_METHOD("build"), &Terrain2DChunk::build);
|
||||
ClassDB::bind_method(D_METHOD("_build"), &Terrain2DChunk::_build);
|
||||
|
||||
|
@ -86,7 +86,7 @@ Terrain2DEnvironmentData::~Terrain2DEnvironmentData() {
|
||||
|
||||
void Terrain2DEnvironmentData::_bind_methods() {
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_setup", PropertyInfo(Variant::OBJECT, "world_environment", PROPERTY_HINT_RESOURCE_TYPE, "WorldEnvironment"), PropertyInfo(Variant::OBJECT, "primary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight"), PropertyInfo(Variant::OBJECT, "secondary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight")));
|
||||
//BIND_VMETHOD(MethodInfo("_setup", PropertyInfo(Variant::OBJECT, "world_environment", PROPERTY_HINT_RESOURCE_TYPE, "WorldEnvironment"), PropertyInfo(Variant::OBJECT, "primary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight"), PropertyInfo(Variant::OBJECT, "secondary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_setup, "world_environment", "primary_light", "secondary_light");
|
||||
#endif
|
||||
|
@ -74,7 +74,7 @@ Terrain2DStructure::~Terrain2DStructure() {
|
||||
|
||||
void Terrain2DStructure::_bind_methods() {
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_write_to_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_write_to_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_write_to_chunk, "chunk");
|
||||
#endif
|
||||
|
@ -1250,7 +1250,7 @@ void Terrain2DWorld::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "voxel_structures", PROPERTY_HINT_NONE, "17/17:Terrain2DStructure", PROPERTY_USAGE_DEFAULT, "Terrain2DStructure"), "voxel_structures_set", "voxel_structures_get");
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_chunk_added", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_chunk_added", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_chunk_added, "chunk");
|
||||
#endif
|
||||
@ -1283,11 +1283,11 @@ void Terrain2DWorld::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("generation_finished"));
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_generation_finished"));
|
||||
//BIND_VMETHOD(MethodInfo("_generation_finished"));
|
||||
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk"), "_create_chunk", PropertyInfo(Variant::INT, "x"), PropertyInfo(Variant::INT, "y"), PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo("_prepare_chunk_for_generation", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk"), "_create_chunk", PropertyInfo(Variant::INT, "x"), PropertyInfo(Variant::INT, "y"), PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_prepare_chunk_for_generation", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
//BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "Terrain2DChunk")));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_generation_finished);
|
||||
GDVIRTUAL_BIND(_create_chunk, "chunk", "x", "y", "chunk", "ret");
|
||||
@ -1326,7 +1326,7 @@ void Terrain2DWorld::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_or_create_chunk_at_world_position", "world_position"), &Terrain2DWorld::get_or_create_chunk_at_world_position);
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::INT, "ret"), "_get_channel_index_info", PropertyInfo(Variant::INT, "channel_type", PROPERTY_HINT_ENUM, BINDING_STRING_CHANNEL_TYPE_INFO)));
|
||||
//BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::INT, "ret"), "_get_channel_index_info", PropertyInfo(Variant::INT, "channel_type", PROPERTY_HINT_ENUM, BINDING_STRING_CHANNEL_TYPE_INFO)));
|
||||
#else
|
||||
GDVIRTUAL_BIND(_get_channel_index_info, "channel_type", "ret");
|
||||
#endif
|
||||
@ -1335,7 +1335,7 @@ void Terrain2DWorld::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_get_channel_index_info", "channel_type"), &Terrain2DWorld::_get_channel_index_info);
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
BIND_VMETHOD(MethodInfo("_set_voxel_with_tool",
|
||||
//BIND_VMETHOD(MethodInfo("_set_voxel_with_tool",
|
||||
PropertyInfo(Variant::BOOL, "mode_add"),
|
||||
PropertyInfo(Variant::VECTOR2, "hit_position"),
|
||||
PropertyInfo(Variant::INT, "selected_voxel"),
|
||||
@ -1347,7 +1347,7 @@ void Terrain2DWorld::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_voxel_with_tool", "mode_add", "hit_position", "selected_voxel", "isolevel"), &Terrain2DWorld::set_voxel_with_tool);
|
||||
ClassDB::bind_method(D_METHOD("_set_voxel_with_tool", "mode_add", "hit_position", "selected_voxel", "isolevel"), &Terrain2DWorld::_set_voxel_with_tool);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_draw"));
|
||||
//BIND_VMETHOD(MethodInfo("_draw"));
|
||||
ClassDB::bind_method(D_METHOD("_draw"), &Terrain2DWorld::_draw);
|
||||
|
||||
BIND_ENUM_CONSTANT(CHANNEL_TYPE_INFO_TYPE);
|
||||
|
Loading…
Reference in New Issue
Block a user