Work on fixing compile.

This commit is contained in:
Relintai 2023-01-09 01:16:43 +01:00
parent 4b4db780f2
commit 01c83d647c
11 changed files with 26 additions and 26 deletions

View File

@ -171,7 +171,7 @@ void Terrain2DLibraryMerger::set_prop(const int index, const Ref<Prop2DData> &va
void Terrain2DLibraryMerger::remove_prop(const int index) {
ERR_FAIL_INDEX(index, _props.size());
_props.remove(index);
_props.remove_at(index);
}
int Terrain2DLibraryMerger::get_num_props() const {
return _props.size();
@ -319,7 +319,7 @@ void Terrain2DLibraryMerger::_setup_material_albedo(const int material_index, co
}
Terrain2DLibraryMerger::Terrain2DLibraryMerger() {
_packer.instance();
_packer.instantiate();
#if GODOT4
#warning implement
@ -331,7 +331,7 @@ Terrain2DLibraryMerger::Terrain2DLibraryMerger() {
_packer->set_keep_original_atlases(false);
_packer->set_margin(0);
_prop_packer.instance();
_prop_packer.instantiate();
#if GODOT4
#warning implement

View File

@ -143,7 +143,7 @@ void Terrain2DLibraryMergerPCM::_material_cache_get_key(Ref<Terrain2DChunk> chun
//print_error("New cache: " + hstr);
Ref<Terrain2DMaterialCachePCM> cache;
cache.instance();
cache.instantiate();
cache->inc_ref_count();
cache->set_texture_flags(get_texture_flags());
@ -322,7 +322,7 @@ void Terrain2DLibraryMergerPCM::_prop_material_cache_get_key(Ref<Terrain2DChunk>
//print_error("New prop cache: " + hstr);
Ref<Terrain2DMaterialCachePCM> cache;
cache.instance();
cache.instantiate();
cache->inc_ref_count();
cache->set_texture_flags(get_texture_flags());
@ -546,7 +546,7 @@ void Terrain2DLibraryMergerPCM::set_prop(const int index, const Ref<Prop2DData>
void Terrain2DLibraryMergerPCM::remove_prop(const int index) {
ERR_FAIL_INDEX(index, _props.size());
_props.remove(index);
_props.remove_at(index);
}
int Terrain2DLibraryMergerPCM::get_num_props() const {
return _props.size();
@ -694,7 +694,7 @@ void Terrain2DLibraryMergerPCM::_setup_material_albedo(const int material_index,
}
Terrain2DLibraryMergerPCM::Terrain2DLibraryMergerPCM() {
_packer.instance();
_packer.instantiate();
#if GODOT4
#warning implement
@ -706,7 +706,7 @@ Terrain2DLibraryMergerPCM::Terrain2DLibraryMergerPCM() {
_packer->set_keep_original_atlases(false);
_packer->set_margin(0);
_prop_packer.instance();
_prop_packer.instantiate();
#if GODOT4
#warning implement

View File

@ -170,7 +170,7 @@ void Terrain2DMaterialCachePCM::_setup_material_albedo(Ref<Texture> texture) {
}
Terrain2DMaterialCachePCM::Terrain2DMaterialCachePCM() {
_packer.instance();
_packer.instantiate();
#if GODOT4
#warning implement

View File

@ -629,7 +629,7 @@ void Terrain2DMesherIsometric::mesh_walls(Ref<Terrain2DChunkDefault> chunk) {
Ref<Shape2D> Terrain2DMesherIsometric::create_terrain_tile_collider_shape(Ref<Terrain2DChunk> chunk) {
Ref<ConvexPolygonShape2D> sh;
sh.instance();
sh.instantiate();
Vector<Vector2> points;

View File

@ -518,7 +518,7 @@ AABB Terrain2DMesher::calculate_stored_mesh_aabb(const int index) {
Ref<Shape2D> Terrain2DMesher::create_terrain_tile_collider_shape(Ref<Terrain2DChunk> chunk) {
Ref<RectangleShape2D> sh;
sh.instance();
sh.instantiate();
sh->set_extents(Vector2(_cell_size_x, _cell_size_y));

View File

@ -114,13 +114,13 @@ Ref<Terrain2DChunk> Terrain2DWorldDefault::_create_chunk(int x, int y, Ref<Terra
if (chunk->job_get_count() == 0) {
Ref<Terrain2DTerrain2DJob> tj;
tj.instance();
tj.instantiate();
Ref<Terrain2DLightJob> lj;
lj.instance();
lj.instantiate();
Ref<Terrain2DProp2DJob> pj;
pj.instance();
pj.instantiate();
pj->set_prop_mesher(Ref<Terrain2DMesher>(memnew(Terrain2DMesherDefault)));
chunk->job_add(lj);

View File

@ -36,20 +36,20 @@ Ref<Terrain2DChunk> Terrain2DWorldIsometric::_create_chunk(int x, int y, Ref<Ter
if (chunk->job_get_count() == 0) {
Ref<Terrain2DTerrain2DJob> tj;
tj.instance();
tj.instantiate();
Ref<Terrain2DLightJob> lj;
lj.instance();
lj.instantiate();
tj->set_mesher(Ref<Terrain2DMesher>(memnew(Terrain2DMesherIsometric())));
Ref<Terrain2DMesherIsometric> liquid_mesher;
liquid_mesher.instance();
liquid_mesher.instantiate();
liquid_mesher->set_channel_index_type(Terrain2DChunkDefault::DEFAULT_CHANNEL_LIQUID_TYPE);
tj->set_liquid_mesher(liquid_mesher);
Ref<Terrain2DProp2DJob> pj;
pj.instance();
pj.instantiate();
pj->set_prop_mesher(Ref<Terrain2DMesher>(memnew(Terrain2DMesherIsometric)));
chunk->job_add(lj);

View File

@ -124,7 +124,7 @@ void Terrain2DJob::generate_random_ao(int seed, int octaves, int period, float p
float cy = _chunk->get_cell_size_y();
Ref<OpenSimplexNoise> noise;
noise.instance();
noise.instantiate();
noise->set_seed(seed);
noise->set_octaves(octaves);

View File

@ -32,7 +32,7 @@ SOFTWARE.
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/object/reference.h"
#include "core/object/ref_counted.h"
#else
#include "core/reference.h"
#endif

View File

@ -36,20 +36,20 @@ Ref<Terrain2DChunk> Terrain2DWorldSimple::_create_chunk(int x, int y, Ref<Terrai
if (chunk->job_get_count() == 0) {
Ref<Terrain2DTerrain2DJob> tj;
tj.instance();
tj.instantiate();
Ref<Terrain2DLightJob> lj;
lj.instance();
lj.instantiate();
tj->set_mesher(Ref<Terrain2DMesher>(memnew(Terrain2DMesherSimple())));
Ref<Terrain2DMesherSimple> liquid_mesher;
liquid_mesher.instance();
liquid_mesher.instantiate();
liquid_mesher->set_channel_index_type(Terrain2DChunkDefault::DEFAULT_CHANNEL_LIQUID_TYPE);
tj->set_liquid_mesher(liquid_mesher);
Ref<Terrain2DProp2DJob> pj;
pj.instance();
pj.instantiate();
pj->set_prop_mesher(Ref<Terrain2DMesher>(memnew(Terrain2DMesherSimple)));
chunk->job_add(lj);

View File

@ -234,7 +234,7 @@ Terrain2DWorldEditor::Terrain2DWorldEditor(EditorNode *p_editor) {
spatial_editor_hb->set_alignment(BoxContainer::ALIGN_BEGIN);
SpatialEditor::get_singleton()->add_control_to_menu_panel(spatial_editor_hb);
_tool_button_group.instance();
_tool_button_group.instantiate();
ToolButton *add_button = memnew(ToolButton);
add_button->set_text("Add");
@ -291,7 +291,7 @@ Terrain2DWorldEditor::Terrain2DWorldEditor(EditorNode *p_editor) {
scs->add_child(_surfaces_vbox_container);
_surfaces_vbox_container->set_h_size_flags(SIZE_EXPAND_FILL);
_surfaces_button_group.instance();
_surfaces_button_group.instantiate();
}
Terrain2DWorldEditor::~Terrain2DWorldEditor() {
_world = NULL;