2021-11-22 22:00:45 +01:00
|
|
|
/*
|
2022-02-22 10:33:06 +01:00
|
|
|
Copyright (c) 2019-2022 Péter Magyar
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
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 "register_types.h"
|
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "library/terrain_surface.h"
|
|
|
|
#include "library/terrain_surface_simple.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "library/terrain_material_cache.h"
|
|
|
|
#include "library/terrain_library.h"
|
|
|
|
#include "library/terrain_library_simple.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
#ifdef TEXTURE_PACKER_PRESENT
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "library/terrain_surface_merger.h"
|
|
|
|
#include "library/terrain_library_merger.h"
|
|
|
|
#include "library/terrain_library_merger_pcm.h"
|
|
|
|
#include "library/terrain_material_cache_pcm.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
#endif
|
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "data/terrain_light.h"
|
|
|
|
#include "meshers/terrain_mesher.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "world/block_terrain_structure.h"
|
|
|
|
#include "world/terrain_chunk.h"
|
|
|
|
#include "world/terrain_environment_data.h"
|
|
|
|
#include "world/terrain_structure.h"
|
|
|
|
#include "world/terrain_world.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "world/default/terrain_chunk_default.h"
|
|
|
|
#include "world/default/terrain_world_default.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "level_generator/terrain_level_generator.h"
|
|
|
|
#include "level_generator/terrain_level_generator_flat.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "areas/terrain_world_area.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "world/terrain_world_editor.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "meshers/blocky/terrain_mesher_blocky.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "world/blocky/terrain_chunk_blocky.h"
|
|
|
|
#include "world/blocky/terrain_world_blocky.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "nodes/terrain_light_node.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
#include "world/jobs/terrain_job.h"
|
|
|
|
#include "world/jobs/terrain_light_job.h"
|
|
|
|
#include "world/jobs/terrain_mesher_job_step.h"
|
|
|
|
#include "world/jobs/terrain_prop_job.h"
|
|
|
|
#include "world/jobs/terrain_terrain_job.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2021-11-22 22:10:41 +01:00
|
|
|
void register_terraman_2d_types() {
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainMesher>();
|
|
|
|
ClassDB::register_class<TerrainMesherDefault>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainSurface>();
|
|
|
|
ClassDB::register_class<TerrainSurfaceSimple>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainLibrary>();
|
|
|
|
ClassDB::register_class<TerrainLibrarySimple>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainMaterialCache>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
#ifdef TEXTURE_PACKER_PRESENT
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainSurfaceMerger>();
|
|
|
|
ClassDB::register_class<TerrainLibraryMerger>();
|
|
|
|
ClassDB::register_class<TerrainLibraryMergerPCM>();
|
|
|
|
ClassDB::register_class<TerrainMaterialCachePCM>();
|
2021-11-22 22:00:45 +01:00
|
|
|
#endif
|
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainLight>();
|
|
|
|
ClassDB::register_class<TerrainLightNode>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainWorld>();
|
|
|
|
ClassDB::register_class<TerrainChunk>();
|
|
|
|
ClassDB::register_class<TerrainStructure>();
|
|
|
|
ClassDB::register_class<BlockTerrainStructure>();
|
|
|
|
ClassDB::register_class<TerrainEnvironmentData>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainChunkDefault>();
|
|
|
|
ClassDB::register_class<TerrainWorldDefault>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainMesherBlocky>();
|
|
|
|
ClassDB::register_class<TerrainWorldBlocky>();
|
|
|
|
ClassDB::register_class<TerrainChunkBlocky>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainLevelGenerator>();
|
|
|
|
ClassDB::register_class<TerrainLevelGeneratorFlat>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainWorldArea>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 10:33:06 +01:00
|
|
|
ClassDB::register_class<TerrainJob>();
|
|
|
|
ClassDB::register_class<TerrainTerrainJob>();
|
|
|
|
ClassDB::register_class<TerrainMesherJobStep>();
|
|
|
|
ClassDB::register_class<TerrainLightJob>();
|
|
|
|
ClassDB::register_class<TerrainPropJob>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
#ifdef TOOLS_ENABLED
|
2022-02-22 10:33:06 +01:00
|
|
|
EditorPlugins::add_by_type<TerrainWorldEditorPlugin>();
|
2021-11-22 22:00:45 +01:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2021-11-22 22:10:41 +01:00
|
|
|
void unregister_terraman_2d_types() {
|
2021-11-22 22:00:45 +01:00
|
|
|
}
|