Skip to content

Commit

Permalink
Move Godot TSCN plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-johansson committed Oct 8, 2024
1 parent f296827 commit fdf57ec
Show file tree
Hide file tree
Showing 18 changed files with 55 additions and 61 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if (TACTILE_BUILD_TILED_TMX_FORMAT)
endif ()

if (TACTILE_BUILD_GODOT_TSCN_FORMAT)
add_subdirectory("source/godot_tscn_format")
add_subdirectory("source/plugins/godot_tscn")
endif ()

if (TACTILE_BUILD_ZLIB_COMPRESSION)
Expand Down
35 changes: 0 additions & 35 deletions source/godot_tscn_format/lib/CMakeLists.txt

This file was deleted.

5 changes: 0 additions & 5 deletions source/godot_tscn_format/test/.clang-tidy

This file was deleted.

1 change: 0 additions & 1 deletion source/godot_tscn_format/test/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(tactile-godot-tscn-format CXX)
project(tactile-plugins-godot-tscn CXX)

add_subdirectory("lib")

Expand Down
35 changes: 35 additions & 0 deletions source/plugins/godot_tscn/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
project(tactile-plugins-godot-tscn-lib CXX)

add_library(tactile-godot-tscn SHARED)
add_library(tactile::godot_tscn ALIAS tactile-godot-tscn)

target_sources(tactile-godot-tscn
PRIVATE
"src/gd3_document_converter.cpp"
"src/gd3_exporter.cpp"
"src/gd3_scene_writer.cpp"
"src/godot_scene_format.cpp"
"src/godot_scene_format_plugin.cpp"

PUBLIC FILE_SET "HEADERS" BASE_DIRS "inc" FILES
"inc/tactile/godot_tscn/api.hpp"
"inc/tactile/godot_tscn/gd3_document_converter.hpp"
"inc/tactile/godot_tscn/gd3_exporter.hpp"
"inc/tactile/godot_tscn/gd3_scene_writer.hpp"
"inc/tactile/godot_tscn/gd3_types.hpp"
"inc/tactile/godot_tscn/godot_scene_format.hpp"
"inc/tactile/godot_tscn/godot_scene_format_plugin.hpp"
)

tactile_prepare_target(tactile-godot-tscn)

target_compile_definitions(tactile-godot-tscn
PRIVATE
"TACTILE_BUILDING_GODOT_TSCN"
)

target_link_libraries(tactile-godot-tscn
PUBLIC
tactile::base
tactile::runtime
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "tactile/base/prelude.hpp"

#ifdef TACTILE_BUILDING_GODOT_TSCN_FORMAT
#ifdef TACTILE_BUILDING_GODOT_TSCN
#define TACTILE_GODOT_API TACTILE_DLL_EXPORT
#else
#define TACTILE_GODOT_API TACTILE_DLL_IMPORT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "tactile/base/document/document_visitor.hpp"
#include "tactile/base/io/save/save_format.hpp"
#include "tactile/godot_tscn_format/api.hpp"
#include "tactile/godot_tscn_format/gd3_types.hpp"
#include "tactile/godot_tscn/api.hpp"
#include "tactile/godot_tscn/gd3_types.hpp"

namespace tactile::godot {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "tactile/base/container/result.hpp"
#include "tactile/base/io/save/save_format.hpp"
#include "tactile/godot_tscn_format/api.hpp"
#include "tactile/godot_tscn/api.hpp"

namespace tactile::godot {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "tactile/base/meta/color.hpp"
#include "tactile/base/numeric/vec.hpp"
#include "tactile/base/prelude.hpp"
#include "tactile/godot_tscn_format/api.hpp"
#include "tactile/godot_tscn_format/gd3_types.hpp"
#include "tactile/godot_tscn/api.hpp"
#include "tactile/godot_tscn/gd3_types.hpp"

namespace tactile::godot {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "tactile/base/io/save/save_format.hpp"
#include "tactile/base/runtime.hpp"
#include "tactile/godot_tscn_format/api.hpp"
#include "tactile/godot_tscn/api.hpp"

namespace tactile::godot {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <memory> // unique_ptr

#include "tactile/base/prelude.hpp"
#include "tactile/godot_tscn_format/api.hpp"
#include "tactile/godot_tscn_format/godot_scene_format.hpp"
#include "tactile/godot_tscn/api.hpp"
#include "tactile/godot_tscn/godot_scene_format.hpp"
#include "tactile/runtime/plugin.hpp"

namespace tactile::godot {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0)

#include "tactile/godot_tscn_format/gd3_document_converter.hpp"
#include "tactile/godot_tscn/gd3_document_converter.hpp"

#include <algorithm> // replace
#include <cassert> // assert
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0)

#include "tactile/godot_tscn_format/gd3_exporter.hpp"
#include "tactile/godot_tscn/gd3_exporter.hpp"

#include <cstddef> // size_t
#include <format> // format
Expand All @@ -11,8 +11,8 @@
#include <sstream> // stringstream

#include "tactile/base/numeric/saturate_cast.hpp"
#include "tactile/godot_tscn_format/gd3_scene_writer.hpp"
#include "tactile/godot_tscn_format/gd3_types.hpp"
#include "tactile/godot_tscn/gd3_scene_writer.hpp"
#include "tactile/godot_tscn/gd3_types.hpp"
#include "tactile/runtime/logging.hpp"

namespace tactile::godot {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0)

#include "tactile/godot_tscn_format/gd3_scene_writer.hpp"
#include "tactile/godot_tscn/gd3_scene_writer.hpp"

#include <iomanip> // quoted, setprecision
#include <ios> // boolalpha, fixed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0)

#include "tactile/godot_tscn_format/godot_scene_format.hpp"
#include "tactile/godot_tscn/godot_scene_format.hpp"

#include <exception> // exception
#include <system_error> // make_error_code, errc

#include "tactile/base/document/map_view.hpp"
#include "tactile/base/io/int_parser.hpp"
#include "tactile/base/numeric/saturate_cast.hpp"
#include "tactile/godot_tscn_format/gd3_document_converter.hpp"
#include "tactile/godot_tscn_format/gd3_exporter.hpp"
#include "tactile/godot_tscn/gd3_document_converter.hpp"
#include "tactile/godot_tscn/gd3_exporter.hpp"
#include "tactile/runtime/logging.hpp"

namespace tactile::godot {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0)

#include "tactile/godot_tscn_format/godot_scene_format_plugin.hpp"
#include "tactile/godot_tscn/godot_scene_format_plugin.hpp"

#include <new> // nothrow

Expand Down

0 comments on commit fdf57ec

Please sign in to comment.