mirror of
https://github.com/Relintai/terraman.git
synced 2025-05-01 22:07:59 +02:00
Added TerramanLibraryMergerPCM. PCM = Per Chunk Material. Just a skeleton class for now.
This commit is contained in:
parent
660ea8bf74
commit
ac786ab720
1
SCsub
1
SCsub
@ -71,6 +71,7 @@ sources = [
|
|||||||
|
|
||||||
if has_texture_packer:
|
if has_texture_packer:
|
||||||
sources.append("library/terraman_library_merger.cpp")
|
sources.append("library/terraman_library_merger.cpp")
|
||||||
|
sources.append("library/terraman_library_merger_pcm.cpp")
|
||||||
sources.append("library/terra_surface_merger.cpp")
|
sources.append("library/terra_surface_merger.cpp")
|
||||||
|
|
||||||
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
||||||
|
@ -24,6 +24,7 @@ def get_doc_classes():
|
|||||||
"TerramanLibraryMerger",
|
"TerramanLibraryMerger",
|
||||||
"TerramanLibrarySimple",
|
"TerramanLibrarySimple",
|
||||||
"TerramanLibrary",
|
"TerramanLibrary",
|
||||||
|
"TerramanLibraryMergerPCM",
|
||||||
|
|
||||||
"TerraCubePoints",
|
"TerraCubePoints",
|
||||||
"TerraMesherCubic",
|
"TerraMesherCubic",
|
||||||
|
@ -104,7 +104,6 @@ protected:
|
|||||||
|
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
private:
|
|
||||||
Vector<Ref<TerraSurfaceMerger> > _voxel_surfaces;
|
Vector<Ref<TerraSurfaceMerger> > _voxel_surfaces;
|
||||||
#ifdef PROPS_PRESENT
|
#ifdef PROPS_PRESENT
|
||||||
Vector<Ref<PropData> > _props;
|
Vector<Ref<PropData> > _props;
|
||||||
|
36
library/terraman_library_merger_pcm.cpp
Normal file
36
library/terraman_library_merger_pcm.cpp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2019-2021 Péter Magyar
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "terraman_library_merger_pcm.h"
|
||||||
|
|
||||||
|
bool TerramanLibraryMergerPCM::_supports_caching() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
TerramanLibraryMergerPCM::TerramanLibraryMergerPCM() {
|
||||||
|
}
|
||||||
|
|
||||||
|
TerramanLibraryMergerPCM::~TerramanLibraryMergerPCM() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void TerramanLibraryMergerPCM::_bind_methods() {
|
||||||
|
}
|
52
library/terraman_library_merger_pcm.h
Normal file
52
library/terraman_library_merger_pcm.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2019-2021 Péter Magyar
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TERRAMAN_LIBRARY_MERGER_PCM_H
|
||||||
|
#define TERRAMAN_LIBRARY_MERGER_PCM_H
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/io/resource.h"
|
||||||
|
#include "core/templates/map.h"
|
||||||
|
#else
|
||||||
|
#include "core/resource.h"
|
||||||
|
#include "core/map.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "terraman_library_merger.h"
|
||||||
|
|
||||||
|
//pcm = per chunk material
|
||||||
|
class TerramanLibraryMergerPCM : public TerramanLibraryMerger {
|
||||||
|
GDCLASS(TerramanLibraryMergerPCM, TerramanLibraryMerger)
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool _supports_caching();
|
||||||
|
|
||||||
|
TerramanLibraryMergerPCM();
|
||||||
|
~TerramanLibraryMergerPCM();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static void _bind_methods();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -32,6 +32,7 @@ SOFTWARE.
|
|||||||
#ifdef TEXTURE_PACKER_PRESENT
|
#ifdef TEXTURE_PACKER_PRESENT
|
||||||
#include "library/terra_surface_merger.h"
|
#include "library/terra_surface_merger.h"
|
||||||
#include "library/terraman_library_merger.h"
|
#include "library/terraman_library_merger.h"
|
||||||
|
#include "library/terraman_library_merger_pcm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "data/terra_light.h"
|
#include "data/terra_light.h"
|
||||||
@ -80,6 +81,7 @@ void register_terraman_types() {
|
|||||||
#ifdef TEXTURE_PACKER_PRESENT
|
#ifdef TEXTURE_PACKER_PRESENT
|
||||||
ClassDB::register_class<TerraSurfaceMerger>();
|
ClassDB::register_class<TerraSurfaceMerger>();
|
||||||
ClassDB::register_class<TerramanLibraryMerger>();
|
ClassDB::register_class<TerramanLibraryMerger>();
|
||||||
|
ClassDB::register_class<TerramanLibraryMergerPCM>();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ClassDB::register_class<TerraLight>();
|
ClassDB::register_class<TerraLight>();
|
||||||
|
Loading…
Reference in New Issue
Block a user