mirror of
https://github.com/Relintai/props_2d.git
synced 2025-02-04 16:15:57 +01:00
Fix a 2D2D.
This commit is contained in:
parent
104549adcc
commit
1b5d2102bc
@ -190,7 +190,7 @@ void Prop2DMaterialCache::prop_add_textures(const Ref<Prop2DData> &prop) {
|
||||
|
||||
for (int i = 0; i < prop->get_prop_count(); ++i) {
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
Ref<Prop2D2DDataMeshData> pdm = prop->get_prop(i);
|
||||
Ref<Prop2DDataMeshData> pdm = prop->get_prop(i);
|
||||
|
||||
if (pdm.is_valid()) {
|
||||
Ref<Texture> tex = pdm->get_texture();
|
||||
@ -231,7 +231,7 @@ void Prop2DMaterialCache::prop_remove_textures(const Ref<Prop2DData> &prop) {
|
||||
|
||||
for (int i = 0; i < prop->get_prop_count(); ++i) {
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
Ref<Prop2D2DDataMeshData> pdm = prop->get_prop(i);
|
||||
Ref<Prop2DDataMeshData> pdm = prop->get_prop(i);
|
||||
|
||||
if (pdm.is_valid()) {
|
||||
Ref<Texture> tex = pdm->get_texture();
|
||||
|
@ -207,7 +207,7 @@ void Prop2DInstance::_prop_preprocess(Transform transform, const Ref<Prop2DData>
|
||||
}
|
||||
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
Ref<Prop2D2DDataMeshData> mesh_data = e;
|
||||
Ref<Prop2DDataMeshData> mesh_data = e;
|
||||
|
||||
if (mesh_data.is_valid()) {
|
||||
Ref<MeshDataResource> mdr = mesh_data->get_mesh();
|
||||
|
@ -682,7 +682,7 @@ void Prop2DInstanceMerger::_prop_preprocess(Transform transform, const Ref<Prop2
|
||||
}
|
||||
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
Ref<Prop2D2DDataMeshData> mesh_data = e;
|
||||
Ref<Prop2DDataMeshData> mesh_data = e;
|
||||
|
||||
if (mesh_data.is_valid()) {
|
||||
Ref<MeshDataResource> mdr = mesh_data->get_mesh();
|
||||
|
@ -122,7 +122,7 @@ void Prop2DInstanceProp2DJob::set_prop_mesher(const Ref<Prop2DMesher> &mesher) {
|
||||
}
|
||||
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
void Prop2DInstanceProp2DJob::add_mesh(const Ref<Prop2D2DDataMeshData> &mesh_data, const Transform &base_transform) {
|
||||
void Prop2DInstanceProp2DJob::add_mesh(const Ref<Prop2DDataMeshData> &mesh_data, const Transform &base_transform) {
|
||||
PMDREntry e;
|
||||
e.mesh_data = mesh_data;
|
||||
e.base_transform = base_transform;
|
||||
@ -306,7 +306,7 @@ void Prop2DInstanceProp2DJob::phase_prop() {
|
||||
for (int i = 0; i < _prop_mesh_datas.size(); ++i) {
|
||||
PMDREntry &e = _prop_mesh_datas.write[i];
|
||||
|
||||
Ref<Prop2D2DDataMeshData> pmd = e.mesh_data;
|
||||
Ref<Prop2DDataMeshData> pmd = e.mesh_data;
|
||||
|
||||
Ref<MeshDataResource> mesh = pmd->get_mesh();
|
||||
Ref<Texture> tex = pmd->get_texture();
|
||||
|
@ -35,7 +35,7 @@ class Prop2DLight;
|
||||
class Prop2DDataTiledWall2D;
|
||||
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
class Prop2D2DDataMeshData;
|
||||
class Prop2DDataMeshData;
|
||||
#endif
|
||||
|
||||
class Prop2DInstanceProp2DJob : public Prop2DInstanceJob {
|
||||
@ -62,7 +62,7 @@ public:
|
||||
void set_prop_mesher(const Ref<Prop2DMesher> &mesher);
|
||||
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
void add_mesh(const Ref<Prop2D2DDataMeshData> &mesh_data, const Transform &base_transform);
|
||||
void add_mesh(const Ref<Prop2DDataMeshData> &mesh_data, const Transform &base_transform);
|
||||
void clear_meshes();
|
||||
#endif
|
||||
|
||||
@ -102,7 +102,7 @@ protected:
|
||||
protected:
|
||||
#if MESH_DATA_RESOURCE_PRESENT
|
||||
struct PMDREntry {
|
||||
Ref<Prop2D2DDataMeshData> mesh_data;
|
||||
Ref<Prop2DDataMeshData> mesh_data;
|
||||
Transform base_transform;
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user