mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-20 10:47:19 +01:00
Work on fixing compile.
This commit is contained in:
parent
1374ff1636
commit
efc9f895bd
@ -120,7 +120,7 @@ void VoxelLibraryMergerPCM::_material_cache_get_key(Ref<VoxelChunk> chunk) {
|
||||
//print_error("New cache: " + hstr);
|
||||
|
||||
Ref<VoxelMaterialCachePCM> cache;
|
||||
cache.instance();
|
||||
cache.instantiate();
|
||||
cache->inc_ref_count();
|
||||
|
||||
cache->set_texture_flags(get_texture_flags());
|
||||
@ -295,7 +295,7 @@ void VoxelLibraryMergerPCM::_prop_material_cache_get_key(Ref<VoxelChunk> chunk)
|
||||
//print_error("New prop cache: " + hstr);
|
||||
|
||||
Ref<VoxelMaterialCachePCM> cache;
|
||||
cache.instance();
|
||||
cache.instantiate();
|
||||
cache->inc_ref_count();
|
||||
|
||||
cache->set_texture_flags(get_texture_flags());
|
||||
@ -514,7 +514,7 @@ void VoxelLibraryMergerPCM::set_prop(const int index, const Ref<PropData> &value
|
||||
void VoxelLibraryMergerPCM::remove_prop(const int index) {
|
||||
ERR_FAIL_INDEX(index, _props.size());
|
||||
|
||||
_props.remove(index);
|
||||
_props.remove_at(index);
|
||||
}
|
||||
int VoxelLibraryMergerPCM::get_num_props() const {
|
||||
return _props.size();
|
||||
@ -708,7 +708,7 @@ void VoxelLibraryMergerPCM::_setup_material_albedo(const int material_index, con
|
||||
}
|
||||
|
||||
VoxelLibraryMergerPCM::VoxelLibraryMergerPCM() {
|
||||
_packer.instance();
|
||||
_packer.instantiate();
|
||||
|
||||
#if GODOT4
|
||||
#warning implement
|
||||
@ -720,7 +720,7 @@ VoxelLibraryMergerPCM::VoxelLibraryMergerPCM() {
|
||||
_packer->set_keep_original_atlases(false);
|
||||
_packer->set_margin(0);
|
||||
|
||||
_prop_packer.instance();
|
||||
_prop_packer.instantiate();
|
||||
|
||||
#if GODOT4
|
||||
#warning implement
|
||||
|
@ -179,7 +179,7 @@ void VoxelMaterialCachePCM::_setup_material_albedo(Ref<Texture> texture) {
|
||||
}
|
||||
|
||||
VoxelMaterialCachePCM::VoxelMaterialCachePCM() {
|
||||
_packer.instance();
|
||||
_packer.instantiate();
|
||||
|
||||
#if GODOT4
|
||||
#warning implement
|
||||
|
@ -48,26 +48,26 @@ Ref<VoxelChunk> VoxelWorldBlocky::_create_chunk(int x, int y, int z, Ref<VoxelCh
|
||||
tj.INSTANCE();
|
||||
|
||||
Ref<VoxelMesherJobStep> s;
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
Ref<FastQuadraticMeshSimplifier> fqms;
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
s->set_simplification_step_ratio(0.8);
|
||||
@ -83,22 +83,22 @@ Ref<VoxelChunk> VoxelWorldBlocky::_create_chunk(int x, int y, int z, Ref<VoxelCh
|
||||
pj.INSTANCE();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(memnew(VoxelMesherBlocky)));
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_simplification_steps(2);
|
||||
#endif
|
||||
|
@ -46,26 +46,26 @@ Ref<VoxelChunk> VoxelWorldCubic::_create_chunk(int x, int y, int z, Ref<VoxelChu
|
||||
tj.INSTANCE();
|
||||
|
||||
Ref<VoxelMesherJobStep> s;
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
Ref<FastQuadraticMeshSimplifier> fqms;
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
s->set_simplification_step_ratio(0.8);
|
||||
@ -84,22 +84,22 @@ Ref<VoxelChunk> VoxelWorldCubic::_create_chunk(int x, int y, int z, Ref<VoxelChu
|
||||
pj.INSTANCE();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(memnew(VoxelMesherCubic)));
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_simplification_steps(2);
|
||||
#endif
|
||||
|
@ -194,32 +194,32 @@ Ref<VoxelChunk> VoxelWorldDefault::_create_chunk(int x, int y, int z, Ref<VoxelC
|
||||
|
||||
if (chunk->job_get_count() == 0) {
|
||||
Ref<VoxelLightJob> lj;
|
||||
lj.instance();
|
||||
lj.instantiate();
|
||||
|
||||
Ref<VoxelTerrainJob> tj;
|
||||
tj.instance();
|
||||
tj.instantiate();
|
||||
|
||||
Ref<VoxelMesherJobStep> s;
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
Ref<FastQuadraticMeshSimplifier> fqms;
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
s->set_simplification_step_ratio(0.8);
|
||||
@ -232,25 +232,25 @@ Ref<VoxelChunk> VoxelWorldDefault::_create_chunk(int x, int y, int z, Ref<VoxelC
|
||||
//tj->add_liquid_mesher(Ref<VoxelMesher>(memnew(VoxelMesherDefault())));
|
||||
|
||||
Ref<VoxelPropJob> pj;
|
||||
pj.instance();
|
||||
pj.instantiate();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(memnew(VoxelMesherDefault)));
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_simplification_steps(2);
|
||||
#endif
|
||||
|
@ -46,26 +46,26 @@ Ref<VoxelChunk> VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref<
|
||||
tj.INSTANCE();
|
||||
|
||||
Ref<VoxelMesherJobStep> s;
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_DROP_UV2);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
tj->add_jobs_step(s);
|
||||
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
Ref<FastQuadraticMeshSimplifier> fqms;
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
s->set_simplification_step_ratio(0.8);
|
||||
@ -85,22 +85,22 @@ Ref<VoxelChunk> VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref<
|
||||
pj.INSTANCE();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(memnew(VoxelMesherMarchingCubes)));
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE);
|
||||
pj->add_jobs_step(s);
|
||||
|
||||
s.instance();
|
||||
s.instantiate();
|
||||
s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH);
|
||||
#ifdef MESH_UTILS_PRESENT
|
||||
fqms.instance();
|
||||
fqms.instantiate();
|
||||
s->set_fqms(fqms);
|
||||
s->set_simplification_steps(2);
|
||||
#endif
|
||||
|
@ -413,7 +413,7 @@ void VoxelWorld::chunk_setup(Ref<VoxelChunk> chunk) {
|
||||
Ref<VoxelChunk> VoxelWorld::_create_chunk(const int x, const int y, const int z, Ref<VoxelChunk> chunk) {
|
||||
if (!chunk.is_valid()) {
|
||||
#if VERSION_MAJOR < 4
|
||||
chunk.instance();
|
||||
chunk.instantiate();
|
||||
#else
|
||||
chunk.instantiate();
|
||||
#endif
|
||||
@ -668,7 +668,7 @@ void VoxelWorld::prop_add(Transform tarnsform, const Ref<PropData> &prop, const
|
||||
if (light_data.is_valid()) {
|
||||
Ref<VoxelLight> light;
|
||||
#if VERSION_MAJOR < 4
|
||||
light.instance();
|
||||
light.instantiate();
|
||||
#else
|
||||
light.instantiate();
|
||||
#endif
|
||||
|
@ -253,7 +253,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) {
|
||||
SpatialEditor::get_singleton()->add_control_to_menu_panel(spatial_editor_hb);
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
_tool_button_group.instance();
|
||||
_tool_button_group.instantiate();
|
||||
#else
|
||||
_tool_button_group.instantiate();
|
||||
#endif
|
||||
@ -329,7 +329,7 @@ VoxelWorldEditor::VoxelWorldEditor(EditorNode *p_editor) {
|
||||
_surfaces_vbox_container->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
#if VERSION_MAJOR < 4
|
||||
_surfaces_button_group.instance();
|
||||
_surfaces_button_group.instantiate();
|
||||
#else
|
||||
_surfaces_button_group.instantiate();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user