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 11:09:36 +01:00
|
|
|
#include "library/terrain_2d_surface.h"
|
|
|
|
#include "library/terrain_2d_surface_simple.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "library/terrain_2d_material_cache.h"
|
|
|
|
#include "library/terrain_2d_library.h"
|
|
|
|
#include "library/terrain_2d_library_simple.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
#ifdef TEXTURE_PACKER_PRESENT
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "library/terrain_2d_surface_merger.h"
|
|
|
|
#include "library/terrain_2d_library_merger.h"
|
|
|
|
#include "library/terrain_2d_library_merger_pcm.h"
|
|
|
|
#include "library/terrain_2d_material_cache_pcm.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
#endif
|
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "data/terrain_2d_light.h"
|
|
|
|
#include "meshers/terrain_2d_mesher.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "world/block_terrain_2d_structure.h"
|
|
|
|
#include "world/terrain_2d_chunk.h"
|
|
|
|
#include "world/terrain_2d_environment_data.h"
|
|
|
|
#include "world/terrain_2d_structure.h"
|
|
|
|
#include "world/terrain_2d_world.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "world/default/terrain_2d_chunk_default.h"
|
|
|
|
#include "world/default/terrain_2d_world_default.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "level_generator/terrain_2d_level_generator.h"
|
|
|
|
#include "level_generator/terrain_2d_level_generator_flat.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "areas/terrain_2d_world_area.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "world/terrain_2d_world_editor.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "meshers/blocky/terrain_2d_mesher_blocky.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "world/blocky/terrain_2d_chunk_blocky.h"
|
|
|
|
#include "world/blocky/terrain_2d_world_blocky.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "nodes/terrain_2d_light_node.h"
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:09:36 +01:00
|
|
|
#include "world/jobs/terrain_2d_job.h"
|
|
|
|
#include "world/jobs/terrain_2d_light_job.h"
|
|
|
|
#include "world/jobs/terrain_2d_mesher_job_step.h"
|
|
|
|
#include "world/jobs/terrain_2d_prop_job.h"
|
|
|
|
#include "world/jobs/terrain_2d_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 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DMesher>();
|
|
|
|
ClassDB::register_class<Terrain2DMesherDefault>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DSurface>();
|
|
|
|
ClassDB::register_class<Terrain2DSurfaceSimple>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DLibrary>();
|
|
|
|
ClassDB::register_class<Terrain2DLibrarySimple>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DMaterialCache>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
#ifdef TEXTURE_PACKER_PRESENT
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DSurfaceMerger>();
|
|
|
|
ClassDB::register_class<Terrain2DLibraryMerger>();
|
|
|
|
ClassDB::register_class<Terrain2DLibraryMergerPCM>();
|
|
|
|
ClassDB::register_class<Terrain2DMaterialCachePCM>();
|
2021-11-22 22:00:45 +01:00
|
|
|
#endif
|
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DLight>();
|
|
|
|
ClassDB::register_class<Terrain2DLightNode>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DWorld>();
|
|
|
|
ClassDB::register_class<Terrain2DChunk>();
|
|
|
|
ClassDB::register_class<Terrain2DStructure>();
|
|
|
|
ClassDB::register_class<BlockTerrain2DStructure>();
|
|
|
|
ClassDB::register_class<Terrain2DEnvironmentData>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DChunkDefault>();
|
|
|
|
ClassDB::register_class<Terrain2DWorldDefault>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DMesherBlocky>();
|
|
|
|
ClassDB::register_class<Terrain2DWorldBlocky>();
|
|
|
|
ClassDB::register_class<Terrain2DChunkBlocky>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DLevelGenerator>();
|
|
|
|
ClassDB::register_class<Terrain2DLevelGeneratorFlat>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DWorldArea>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
2022-02-22 11:42:28 +01:00
|
|
|
ClassDB::register_class<Terrain2DJob>();
|
|
|
|
ClassDB::register_class<Terrain2DTerrain2DJob>();
|
|
|
|
ClassDB::register_class<Terrain2DMesherJobStep>();
|
|
|
|
ClassDB::register_class<Terrain2DLightJob>();
|
2022-02-22 13:29:31 +01:00
|
|
|
ClassDB::register_class<Terrain2DProp2DJob>();
|
2021-11-22 22:00:45 +01:00
|
|
|
|
|
|
|
#ifdef TOOLS_ENABLED
|
2022-02-22 11:42:28 +01:00
|
|
|
EditorPlugins::add_by_type<Terrain2DWorldEditorPlugin>();
|
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
|
|
|
}
|