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) { void GroundClutter2DFoliage::remove_texture(const int index) {
ERR_FAIL_INDEX(index, _textures.size()); ERR_FAIL_INDEX(index, _textures.size());
_textures.remove(index); _textures.remove_at(index);
} }
void GroundClutter2DFoliage::add_texture(Ref<Texture> texture) { void GroundClutter2DFoliage::add_texture(Ref<Texture> texture) {
_textures.push_back(texture); _textures.push_back(texture);

View File

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

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@ SOFTWARE.
#include "core/version.h" #include "core/version.h"
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
#include "core/object/reference.h" #include "core/object/ref_counted.h"
#define Texture Texture2D #define Texture Texture2D
#else #else
#include "core/reference.h" #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()) { if (tiled_wall_data->get_collision()) {
Ref<BoxShape> tws; Ref<BoxShape> tws;
tws.instance(); tws.instantiate();
float hew = tiled_wall_data->get_width() / 2.0; float hew = tiled_wall_data->get_width() / 2.0;
float heh = tiled_wall_data->get_heigth() / 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()) { if (light_data.is_valid()) {
Ref<Prop2DLight> light; Ref<Prop2DLight> light;
light.instance(); light.instantiate();
Vector2 v = t.xform(Vector2()); Vector2 v = t.xform(Vector2());

View File

@ -521,7 +521,7 @@ Prop2DInstanceProp2DJob::Prop2DInstanceProp2DJob() {
_prop_instace = NULL; _prop_instace = NULL;
//todo allocate this in a virtual method //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); _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) { for (int j = 0; j < indices.size(); ++j) {
int index = indices[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 //make all indices that were bigger than the one we replaced one lower
for (int k = 0; k < _indices.size(); ++k) { for (int k = 0; k < _indices.size(); ++k) {
@ -317,7 +317,7 @@ void Prop2DMesher::remove_doubles_hashed() {
int index = indices[j]; int index = indices[j];
hashes.remove(index); hashes.remove(index);
_vertices.remove(index); _vertices.remove_at(index);
//make all indices that were bigger than the one we replaced one lower //make all indices that were bigger than the one we replaced one lower
for (int k = 0; k < _indices.size(); ++k) { for (int k = 0; k < _indices.size(); ++k) {
@ -1129,7 +1129,7 @@ Prop2DMesher::Prop2DMesher() {
_format = VisualServer::ARRAY_FORMAT_TEX_UV; _format = VisualServer::ARRAY_FORMAT_TEX_UV;
_noise.instance(); _noise.instantiate();
//todo add properties for these if needed //todo add properties for these if needed
_noise->set_octaves(4); _noise->set_octaves(4);
_noise->set_period(30); _noise->set_period(30);

View File

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

View File

@ -58,7 +58,7 @@ void Prop2DData::add_prop(const Ref<Prop2DDataEntry> prop) {
void Prop2DData::remove_prop(const int index) { void Prop2DData::remove_prop(const int index) {
ERR_FAIL_INDEX(index, _props.size()); ERR_FAIL_INDEX(index, _props.size());
_props.remove(index); _props.remove_at(index);
} }
int Prop2DData::get_prop_count() const { 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("get_room_bounds"), &Prop2DData::get_room_bounds);
ClassDB::bind_method(D_METHOD("set_room_bounds", "value"), &Prop2DData::set_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); ClassDB::bind_method(D_METHOD("copy_from", "prop_data"), &Prop2DData::copy_from);
} }

View File

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

View File

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

View File

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

View File

@ -84,7 +84,7 @@ void Prop2DDataLight::_processor_process(Ref<Prop2DData> prop_data, Node *node,
if (entry.is_valid()) { if (entry.is_valid()) {
l = entry; l = entry;
} else { } else {
l.instance(); l.instantiate();
} }
l->set_light_color(i->get_color()); 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()) { if (entry.is_valid()) {
l = entry; l = entry;
} else { } else {
l.instance(); l.instantiate();
} }
l->set_is_active(p->get_portal_active()); 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()) { if (entry.is_valid()) {
l = entry; l = entry;
} else { } else {
l.instance(); l.instantiate();
} }
l->set_prop(i->get_prop_data()); 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()) { if (entry.is_valid()) {
l = entry; l = entry;
} else { } else {
l.instance(); l.instantiate();
} }
l->set_scene(i->get_scene()); 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()) { if (entry.is_valid()) {
l = entry; l = entry;
} else { } else {
l.instance(); l.instantiate();
} }
l->set_texture(s->get_texture()); 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()) { if (entry.is_valid()) {
tw = entry; tw = entry;
} else { } else {
tw.instance(); tw.instantiate();
} }
tw->set_width(t->get_width()); tw->set_width(t->get_width());

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "core/core_bind.h" #include "core/core_bind.h"
#include "core/math/color.h" #include "core/math/color.h"
#include "core/object/object.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/hash_map.h"
#include "core/templates/vector.h" #include "core/templates/vector.h"
#else #else

View File

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

View File

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

View File

@ -267,7 +267,7 @@ TiledWall2D::TiledWall2D() {
_width = 1; _width = 1;
_height = 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); //_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() { TiledWall2D::~TiledWall2D() {

View File

@ -88,7 +88,7 @@ void TiledWall2DData::add_texture(const Ref<Texture> &texture) {
void TiledWall2DData::remove_texture(const int index) { void TiledWall2DData::remove_texture(const int index) {
ERR_FAIL_INDEX(index, _textures.size()); ERR_FAIL_INDEX(index, _textures.size());
_textures.remove(index); _textures.remove_at(index);
emit_changed(); emit_changed();
} }
@ -136,7 +136,7 @@ void TiledWall2DData::add_flavour_texture(const Ref<Texture> &texture) {
void TiledWall2DData::remove_flavour_texture(const int index) { void TiledWall2DData::remove_flavour_texture(const int index) {
ERR_FAIL_INDEX(index, _flavour_textures.size()); ERR_FAIL_INDEX(index, _flavour_textures.size());
_flavour_textures.remove(index); _flavour_textures.remove_at(index);
emit_changed(); 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("get_flavour_chance"), &TiledWall2DData::get_flavour_chance);
ClassDB::bind_method(D_METHOD("set_flavour_chance", "texture"), &TiledWall2DData::set_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 //materials
ClassDB::bind_method(D_METHOD("material_get"), &TiledWall2DData::material_get); 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); ClassDB::bind_method(D_METHOD("add_textures_into", "texture_packer"), &TiledWall2DData::add_textures_into);
#endif #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);
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" #include "core/version.h"
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
#include "core/object/reference.h" #include "core/object/ref_counted.h"
#include "core/templates/vector.h" #include "core/templates/vector.h"
#else #else
#include "core/reference.h" #include "core/reference.h"
@ -34,7 +34,7 @@ SOFTWARE.
#endif #endif
#include "core/math/rect2.h" #include "core/math/rect2.h"
#include "core/math/transform.h" #include "core/math/transform_3d.h"
#include "core/math/vector2.h" #include "core/math/vector2.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"