Work on fixing compile.

This commit is contained in:
Relintai 2023-01-09 01:17:02 +01:00
parent e06657b0cb
commit 38e4bb3203
26 changed files with 37 additions and 37 deletions

View File

@ -33,7 +33,7 @@ Ref<Texture> GroundClutter2DFoliage::get_texture(const int index) {
void GroundClutter2DFoliage::remove_texture(const int index) {
ERR_FAIL_INDEX(index, _textures.size());
_textures.remove(index);
_textures.remove_at(index);
}
void GroundClutter2DFoliage::add_texture(Ref<Texture> texture) {
_textures.push_back(texture);

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"
#define Texture Texture2D
#else
#include "core/reference.h"

View File

@ -26,7 +26,7 @@ SOFTWARE.
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/object/reference.h"
#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
#include "core/math/color.h"
#else

View File

@ -108,7 +108,7 @@ void Prop2DMaterialCache::texture_remove(const Ref<Texture> &texture) {
void Prop2DMaterialCache::texture_remove_index(const int index) {
ERR_FAIL_INDEX(index, _textures.size());
_textures.remove(index);
_textures.remove_at(index);
}
void Prop2DMaterialCache::textures_clear() {
_textures.clear();

View File

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

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"
#define Texture Texture2D
#else
#include "core/reference.h"

View File

@ -420,7 +420,7 @@ void Prop2DInstanceMerger::_prop_preprocess(Transform2D transform, const Ref<Pro
if (tiled_wall_data->get_collision()) {
Ref<BoxShape> tws;
tws.instance();
tws.instantiate();
float hew = tiled_wall_data->get_width() / 2.0;
float heh = tiled_wall_data->get_heigth() / 2.0;
@ -464,7 +464,7 @@ void Prop2DInstanceMerger::_prop_preprocess(Transform2D transform, const Ref<Pro
if (light_data.is_valid()) {
Ref<Prop2DLight> light;
light.instance();
light.instantiate();
Vector2 v = t.xform(Vector2());

View File

@ -521,7 +521,7 @@ Prop2DInstanceProp2DJob::Prop2DInstanceProp2DJob() {
_prop_instace = NULL;
//todo allocate this in a virtual method
_prop_mesher.instance();
_prop_mesher.instantiate();
_prop_mesher->set_build_flags(Prop2DMesher::BUILD_FLAG_USE_LIGHTING | Prop2DMesher::BUILD_FLAG_USE_AO | Prop2DMesher::BUILD_FLAG_USE_RAO | Prop2DMesher::BUILD_FLAG_BAKE_LIGHTS);
}

View File

@ -268,7 +268,7 @@ void Prop2DMesher::remove_doubles() {
for (int j = 0; j < indices.size(); ++j) {
int index = indices[j];
_vertices.remove(index);
_vertices.remove_at(index);
//make all indices that were bigger than the one we replaced one lower
for (int k = 0; k < _indices.size(); ++k) {
@ -317,7 +317,7 @@ void Prop2DMesher::remove_doubles_hashed() {
int index = indices[j];
hashes.remove(index);
_vertices.remove(index);
_vertices.remove_at(index);
//make all indices that were bigger than the one we replaced one lower
for (int k = 0; k < _indices.size(); ++k) {
@ -1129,7 +1129,7 @@ Prop2DMesher::Prop2DMesher() {
_format = VisualServer::ARRAY_FORMAT_TEX_UV;
_noise.instance();
_noise.instantiate();
//todo add properties for these if needed
_noise->set_octaves(4);
_noise->set_period(30);

View File

@ -27,7 +27,7 @@ SOFTWARE.
#if VERSION_MAJOR > 3
#include "core/math/color.h"
#include "core/object/reference.h"
#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
template <class N>

View File

@ -58,7 +58,7 @@ void Prop2DData::add_prop(const Ref<Prop2DDataEntry> prop) {
void Prop2DData::remove_prop(const int index) {
ERR_FAIL_INDEX(index, _props.size());
_props.remove(index);
_props.remove_at(index);
}
int Prop2DData::get_prop_count() const {
@ -162,7 +162,7 @@ void Prop2DData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_room_bounds"), &Prop2DData::get_room_bounds);
ClassDB::bind_method(D_METHOD("set_room_bounds", "value"), &Prop2DData::set_room_bounds);
ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "room_bounds"), "set_room_bounds", "get_room_bounds");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "room_bounds"), "set_room_bounds", "get_room_bounds");
ClassDB::bind_method(D_METHOD("copy_from", "prop_data"), &Prop2DData::copy_from);
}

View File

@ -35,7 +35,7 @@ SOFTWARE.
#else
#include "core/reference.h"
#include "core/vector.h"
#include "core/math/transform.h"
#include "core/math/transform_3d.h"
#endif
#include "core/math/rect2.h"
@ -74,8 +74,8 @@ public:
bool get_is_room() const;
void set_is_room(const bool value);
PoolVector3Array get_room_bounds();
void set_room_bounds(const PoolVector3Array &bounds);
PackedVector3Array get_room_bounds();
void set_room_bounds(const PackedVector3Array &bounds);
void copy_from(const Ref<Prop2DData> &prop_data);
@ -93,7 +93,7 @@ private:
Vector<Ref<Prop2DDataEntry>> _props;
bool _is_room;
PoolVector3Array _room_bounds;
PackedVector3Array _room_bounds;
};
#endif

View File

@ -143,7 +143,7 @@ void Prop2DDataEntry::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) {
e = entry;
} else {
e.instance();
e.instantiate();
}
e->set_transform_2d(transform * n->get_transform());

View File

@ -33,7 +33,7 @@ SOFTWARE.
#define Transform Transform3D
#endif
#else
#include "core/math/transform.h"
#include "core/math/transform_3d.h"
#include "core/math/transform_2d.h"
#include "core/resource.h"
#endif

View File

@ -84,7 +84,7 @@ void Prop2DDataLight::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) {
l = entry;
} else {
l.instance();
l.instantiate();
}
l->set_light_color(i->get_color());

View File

@ -77,7 +77,7 @@ void Prop2DDataPortal::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) {
l = entry;
} else {
l.instance();
l.instantiate();
}
l->set_is_active(p->get_portal_active());

View File

@ -56,7 +56,7 @@ void Prop2DDataProp2D::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) {
l = entry;
} else {
l.instance();
l.instantiate();
}
l->set_prop(i->get_prop_data());

View File

@ -48,7 +48,7 @@ void Prop2DDataScene::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) {
l = entry;
} else {
l.instance();
l.instantiate();
}
l->set_scene(i->get_scene());

View File

@ -133,7 +133,7 @@ void Prop2DDataSprite::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) {
l = entry;
} else {
l.instance();
l.instantiate();
}
l->set_texture(s->get_texture());

View File

@ -71,7 +71,7 @@ void Prop2DDataTiledWall2D::_processor_process(Ref<Prop2DData> prop_data, Node *
if (entry.is_valid()) {
tw = entry;
} else {
tw.instance();
tw.instantiate();
}
tw->set_width(t->get_width());

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "core/core_bind.h"
#include "core/math/color.h"
#include "core/object/object.h"
#include "core/object/reference.h"
#include "core/object/ref_counted.h"
#include "core/templates/hash_map.h"
#include "core/templates/vector.h"
#else

View File

@ -61,7 +61,7 @@ Ref<Prop2DData> Prop2DUtils::convert_tree(Node *root) {
#endif
Ref<Prop2DData> data;
data.instance();
data.instantiate();
Transform2D t;
_convert_tree(data, root, t);

View File

@ -27,7 +27,7 @@ SOFTWARE.
#if VERSION_MAJOR > 3
#include "core/object/object.h"
#include "core/object/reference.h"
#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
#include "scene/3d/node_3d.h"
#else

View File

@ -267,7 +267,7 @@ TiledWall2D::TiledWall2D() {
_width = 1;
_height = 1;
_mesher.instance();
_mesher.instantiate();
//_mesher->set_build_flags(Prop2DMesher::BUILD_FLAG_USE_LIGHTING | Prop2DMesher::BUILD_FLAG_USE_AO | Prop2DMesher::BUILD_FLAG_USE_RAO | Prop2DMesher::BUILD_FLAG_BAKE_LIGHTS);
}
TiledWall2D::~TiledWall2D() {

View File

@ -88,7 +88,7 @@ void TiledWall2DData::add_texture(const Ref<Texture> &texture) {
void TiledWall2DData::remove_texture(const int index) {
ERR_FAIL_INDEX(index, _textures.size());
_textures.remove(index);
_textures.remove_at(index);
emit_changed();
}
@ -136,7 +136,7 @@ void TiledWall2DData::add_flavour_texture(const Ref<Texture> &texture) {
void TiledWall2DData::remove_flavour_texture(const int index) {
ERR_FAIL_INDEX(index, _flavour_textures.size());
_flavour_textures.remove(index);
_flavour_textures.remove_at(index);
emit_changed();
}
@ -298,7 +298,7 @@ void TiledWall2DData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_flavour_chance"), &TiledWall2DData::get_flavour_chance);
ClassDB::bind_method(D_METHOD("set_flavour_chance", "texture"), &TiledWall2DData::set_flavour_chance);
ADD_PROPERTY(PropertyInfo(Variant::REAL, "flavour_chance"), "set_flavour_chance", "get_flavour_chance");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flavour_chance"), "set_flavour_chance", "get_flavour_chance");
//materials
ClassDB::bind_method(D_METHOD("material_get"), &TiledWall2DData::material_get);
@ -309,7 +309,7 @@ void TiledWall2DData::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_textures_into", "texture_packer"), &TiledWall2DData::add_textures_into);
#endif
BIND_VMETHOD(MethodInfo("_setup_cache", PropertyInfo(Variant::OBJECT, "cache", PROPERTY_HINT_RESOURCE_TYPE, "Prop2DMaterialCache")));
//BIND_VMETHOD(MethodInfo("_setup_cache", PropertyInfo(Variant::OBJECT, "cache", PROPERTY_HINT_RESOURCE_TYPE, "Prop2DMaterialCache")));
ClassDB::bind_method(D_METHOD("setup_cache", "cache"), &TiledWall2DData::setup_cache);
ClassDB::bind_method(D_METHOD("_setup_cache", "cache"), &TiledWall2DData::_setup_cache);

View File

@ -26,7 +26,7 @@ SOFTWARE.
#include "core/version.h"
#if VERSION_MAJOR > 3
#include "core/object/reference.h"
#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
#else
#include "core/reference.h"
@ -34,7 +34,7 @@ SOFTWARE.
#endif
#include "core/math/rect2.h"
#include "core/math/transform.h"
#include "core/math/transform_3d.h"
#include "core/math/vector2.h"
#include "core/math/vector3.h"