diff --git a/.gitmodules b/.gitmodules index a76824bb..601d051d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,6 +19,3 @@ [submodule "lib/libarchive"] path = lib/libarchive url = https://github.com/libarchive/libarchive -[submodule "lib/Catch2"] - path = lib/Catch2 - url = https://github.com/catchorg/Catch2.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 5160acb5..a25a21f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,14 +34,6 @@ project(Dawn LANGUAGES C CXX ) -# Setup tests -add_executable(dawntests) -target_link_libraries(dawntests PRIVATE Catch2::Catch2WithMain) -target_compile_definitions(dawntests - PUBLIC - DAWN_ASSET_LOCATION="${DAWN_ROOT_DIR}/test/data" -) - # Add tools add_subdirectory(tools) @@ -49,10 +41,4 @@ add_subdirectory(tools) add_subdirectory(lib) # Add Project Files -add_subdirectory(src) - -# Run tests -list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) -include(CTest) -include(Catch) -catch_discover_tests(dawntests) \ No newline at end of file +add_subdirectory(src) \ No newline at end of file diff --git a/cmake/targets/CMakeLists.txt b/cmake/targets/CMakeLists.txt index 6f8807b4..d5fbd0f6 100644 --- a/cmake/targets/CMakeLists.txt +++ b/cmake/targets/CMakeLists.txt @@ -5,7 +5,7 @@ # Now validate we have a build target for real if(NOT DEFINED DAWN_BUILD_TARGET) - message(FATAL_ERROR "You need to define a DAWN_BUILD_TARGET") + set(DAWN_BUILD_TARGET "target-rpg-linux-glfw" CACHE INTERNAL ${DAWN_CACHE_TARGET}) endif() message("Building target ${DAWN_BUILD_TARGET}") diff --git a/cmake/targets/target-rpg-linux-glfw/CMakeLists.txt b/cmake/targets/target-rpg-linux-glfw/CMakeLists.txt new file mode 100644 index 00000000..2915c185 --- /dev/null +++ b/cmake/targets/target-rpg-linux-glfw/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2023 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +set(DAWN_BUILDING dawnrpg CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_LINUX true CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_NAME "DawnRPG" CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_ARCHIVE true CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_TRUETYPE false CACHE INTERNAL ${DAWN_CACHE_TARGET}) \ No newline at end of file diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 6091b390..8ca4cbff 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,10 +45,6 @@ if(DAWN_TARGET_OPENAL) add_subdirectory(AudioFile) endif() -# Catch2 Testing Framework -set(catch2_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Catch2 CACHE INTERNAL ${DAWN_CACHE_TARGET}) -add_subdirectory(Catch2) - # Emscripten (TESTING ONLY) if(DEFINED DAWN_EMSCRIPTEN_FLAGS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DAWN_EMSCRIPTEN_FLAGS}" CACHE INTERNAL ${DAWN_CACHE_TARGET}) diff --git a/lib/Catch2 b/lib/Catch2 deleted file mode 160000 index 32d9ae24..00000000 --- a/lib/Catch2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 32d9ae24bc4a0fed9a136a73e116b4ded0ac84b7 diff --git a/lib/SDL b/lib/SDL index 4722269f..fb149756 160000 --- a/lib/SDL +++ b/lib/SDL @@ -1 +1 @@ -Subproject commit 4722269fb62315640cbdbd8916cfc937ee3603d4 +Subproject commit fb1497566c5a05e2babdcf45ef0ab5c7cca2c4ae diff --git a/lib/freetype b/lib/freetype index e969289f..7ff43d3e 160000 --- a/lib/freetype +++ b/lib/freetype @@ -1 +1 @@ -Subproject commit e969289f88a586c40678133abcf999362aefe565 +Subproject commit 7ff43d3e9f981991048a459303e431bf0c617a36 diff --git a/lib/glfw b/lib/glfw index a87acd8c..b35641f4 160000 --- a/lib/glfw +++ b/lib/glfw @@ -1 +1 @@ -Subproject commit a87acd8c1fac78011013bebb537926e18fe49f46 +Subproject commit b35641f4a3c62aa86a0b3c983d163bc0fe36026d diff --git a/lib/glm b/lib/glm index 586a4023..45008b22 160000 --- a/lib/glm +++ b/lib/glm @@ -1 +1 @@ -Subproject commit 586a402397dd35d66d7a079049856d1e2cbab300 +Subproject commit 45008b225e28eb700fa0f7d3ff69b7c1db94fadf diff --git a/lib/libarchive b/lib/libarchive index ee16885f..313aa1fa 160000 --- a/lib/libarchive +++ b/lib/libarchive @@ -1 +1 @@ -Subproject commit ee16885fe6278344854db4174ebc276c307947aa +Subproject commit 313aa1fa10b657de791e3202c168a6c833bc3543 diff --git a/lib/openal-soft b/lib/openal-soft index d6d572df..d3875f33 160000 --- a/lib/openal-soft +++ b/lib/openal-soft @@ -1 +1 @@ -Subproject commit d6d572df66eb2b5beeb3da7f3b11a328500c33c3 +Subproject commit d3875f333fb6abe2f39d82caca329414871ae53b diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 225e3580..7fcf387d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,17 +49,15 @@ if(DEFINED DAWN_TARGET_NAME) add_subdirectory(dawnopengl) endif() + if(DAWN_TARGET_TRUETYPE) + add_subdirectory(dawntruetype) + endif() + if(DAWN_TARGET_SDL2) add_subdirectory(dawnsdl2) add_subdirectory(dawnopengl) endif() - if(DAWN_TARGET_ARCHIVE) - # add_subdirectory(dawnarchiveasset) - else() - add_subdirectory(dawnfileasset) - endif() - if(DAWN_TARGET_VITA) add_subdirectory(dawnopengl) endif() diff --git a/src/dawn/CMakeLists.txt b/src/dawn/CMakeLists.txt index e6617171..1cc36339 100644 --- a/src/dawn/CMakeLists.txt +++ b/src/dawn/CMakeLists.txt @@ -7,7 +7,6 @@ target_link_libraries(${DAWN_TARGET_NAME} PUBLIC glm - freetype archive_static ) @@ -35,22 +34,4 @@ add_subdirectory(scene) # add_subdirectory(state) add_subdirectory(time) add_subdirectory(util) -add_subdirectory(ui) - -# Definitions -# target_compile_definitions(${DAWN_TARGET_NAME} -# PUBLIC -# DAWN_DEBUG_BUILD=${DAWN_DEBUG_BUILD} -# ) - -# Tests -target_link_libraries(dawntests - PUBLIC - glm - freetype -) - -target_include_directories(dawntests - PUBLIC - ${CMAKE_CURRENT_LIST_DIR} -) \ No newline at end of file +add_subdirectory(ui) \ No newline at end of file diff --git a/src/dawn/assert/CMakeLists.txt b/src/dawn/assert/CMakeLists.txt index a9f2dfca..a22374f6 100644 --- a/src/dawn/assert/CMakeLists.txt +++ b/src/dawn/assert/CMakeLists.txt @@ -6,10 +6,4 @@ target_sources(${DAWN_TARGET_NAME} PRIVATE assert.cpp -) - -target_sources(dawntests - PRIVATE - assert.cpp - _test_.assert.cpp ) \ No newline at end of file diff --git a/src/dawn/assert/_test_.assert.cpp b/src/dawn/assert/_test_.assert.cpp deleted file mode 100644 index 9549b110..00000000 --- a/src/dawn/assert/_test_.assert.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2023 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT - -#include -#include "assert.hpp" - -TEST_CASE("assertTrue", "[assert]") { - SECTION("true") { - assertTrue(true, "This should not fail"); - } - - SECTION("false") { - REQUIRE_THROWS(assertTrue(false, "This should fail")); - } -} - -TEST_CASE("assertFalse", "[assert]") { - SECTION("true") { - REQUIRE_THROWS(assertFalse(true, "This should fail")); - } - - SECTION("false") { - assertFalse(false, "This should not fail"); - } -} - -TEST_CASE("assertUnreachable", "[assert]") { - REQUIRE_THROWS(assertUnreachable("This should fail all the time.")); -} - -TEST_CASE("assertNotNull", "[assert]") { - SECTION("nullptr") { - REQUIRE_THROWS(assertNotNull(nullptr, "This should fail")); - } - - SECTION("NULL") { - REQUIRE_THROWS(assertNotNull(NULL, "This should fail")); - } - - SECTION("not nullptr or NULL") { - assertNotNull((void*)0x1, "This should not fail"); - } -} - -TEST_CASE("assertNull", "[assert]") { - SECTION("nullptr") { - assertNull(nullptr, "This should not fail"); - } - - SECTION("NULL") { - assertNull(NULL, "This should not fail"); - } - - SECTION("not nullptr or NULL") { - REQUIRE_THROWS(assertNull((void*)0x1, "This should fail")); - } -} - -TEST_CASE("assertMapHasKey", "[assert]") { - SECTION("has key") { - std::map map; - map["key"] = "value"; - assertMapHasKey(map, "key", "This should not fail"); - } - - SECTION("does not have key") { - std::map map; - map["different_key"] = "Some other value"; - REQUIRE_THROWS(assertMapHasKey(map, "key", "This should fail")); - } -} - -TEST_CASE("assertDeprecated", "[assert]") { - REQUIRE_THROWS(assertDeprecated("This should fail")); -} \ No newline at end of file diff --git a/src/dawn/asset/AssetManager.cpp b/src/dawn/asset/AssetManager.cpp index ce40768f..f70d7bbd 100644 --- a/src/dawn/asset/AssetManager.cpp +++ b/src/dawn/asset/AssetManager.cpp @@ -5,7 +5,6 @@ #include "AssetManager.hpp" #include "loaders/TextureLoader.hpp" -#include "loaders/TrueTypeLoader.hpp" using namespace Dawn; @@ -60,45 +59,6 @@ bool_t AssetManager::isLoaded(const std::string filename) { return false; } -template<> -std::shared_ptr AssetManager::get( - const std::string filename -) { - auto existing = this->getExisting(filename); - if(existing) { - // Check pointer hasn't gone stale, if it has remove it and create new. - auto texture = existing->weakTexture.lock(); - if(texture) return texture; - this->removeExisting(filename); - } - - std::shared_ptr loader = std::make_shared( - filename - ); - pendingAssetLoaders.push_back(std::static_pointer_cast(loader)); - return loader->sharedTexture; -} - -template<> -std::shared_ptr AssetManager::get( - const std::string filename, - const uint32_t fontSize -) { - auto existing = this->getExisting(filename); - if(existing) { - // Check pointer hasn't gone stale, if it has remove it and create new. - auto texture = existing->getTexture(fontSize); - if(texture) return texture; - this->removeExisting(filename); - } - - std::shared_ptr loader = std::make_shared( - filename - ); - pendingAssetLoaders.push_back(std::static_pointer_cast(loader)); - return loader->getTexture(fontSize); -} - AssetManager::~AssetManager() { } \ No newline at end of file diff --git a/src/dawn/asset/loaders/CMakeLists.txt b/src/dawn/asset/loaders/CMakeLists.txt index e7c90da1..b4f5f2b4 100644 --- a/src/dawn/asset/loaders/CMakeLists.txt +++ b/src/dawn/asset/loaders/CMakeLists.txt @@ -7,5 +7,4 @@ target_sources(${DAWN_TARGET_NAME} PRIVATE TextureLoader.cpp - TrueTypeLoader.cpp ) \ No newline at end of file diff --git a/src/dawn/dawnlibs.hpp b/src/dawn/dawnlibs.hpp index 3a4c2081..9d70aea2 100644 --- a/src/dawn/dawnlibs.hpp +++ b/src/dawn/dawnlibs.hpp @@ -39,11 +39,12 @@ extern "C" { #include #include #include -#include +// #include #include #include #include #include -#include +// #include #include +#define GLM_ENABLE_EXPERIMENTAL 1 #include \ No newline at end of file diff --git a/src/dawn/display/CMakeLists.txt b/src/dawn/display/CMakeLists.txt index c33affdc..3a6929fb 100644 --- a/src/dawn/display/CMakeLists.txt +++ b/src/dawn/display/CMakeLists.txt @@ -12,6 +12,5 @@ target_sources(${DAWN_TARGET_NAME} ) # Subdirs -add_subdirectory(font) add_subdirectory(mesh) add_subdirectory(shader) \ No newline at end of file diff --git a/src/dawn/game/Game.cpp b/src/dawn/game/Game.cpp index bbb6ecfa..6a1d38a6 100644 --- a/src/dawn/game/Game.cpp +++ b/src/dawn/game/Game.cpp @@ -47,5 +47,4 @@ std::shared_ptr Game::getCurrentScene() { } Game::~Game() { - std::cout << "Game successfully destructed" << std::endl; } \ No newline at end of file diff --git a/src/dawn/ui/elements/CMakeLists.txt b/src/dawn/ui/elements/CMakeLists.txt index e626ddfc..8e377a9b 100644 --- a/src/dawn/ui/elements/CMakeLists.txt +++ b/src/dawn/ui/elements/CMakeLists.txt @@ -6,5 +6,4 @@ target_sources(${DAWN_TARGET_NAME} PRIVATE UIRectangle.cpp - UILabel.cpp ) \ No newline at end of file diff --git a/src/dawnrpg/CMakeLists.txt b/src/dawnrpg/CMakeLists.txt new file mode 100644 index 00000000..84ad2889 --- /dev/null +++ b/src/dawnrpg/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2023 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Includes +target_include_directories(${DAWN_TARGET_NAME} + PUBLIC + ${CMAKE_CURRENT_LIST_DIR} +) + +# Subdirs +add_subdirectory(game) +add_subdirectory(scene) + +# Assets +# include("${DAWN_ASSETS_SOURCE_DIR}/games/helloworld/CMakeLists.txt") \ No newline at end of file diff --git a/src/dawnrpg/game/CMakeLists.txt b/src/dawnrpg/game/CMakeLists.txt new file mode 100644 index 00000000..57b52897 --- /dev/null +++ b/src/dawnrpg/game/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2023 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +target_sources(${DAWN_TARGET_NAME} + PRIVATE + GameInit.cpp +) \ No newline at end of file diff --git a/src/dawnrpg/game/GameInit.cpp b/src/dawnrpg/game/GameInit.cpp new file mode 100644 index 00000000..4aef18a2 --- /dev/null +++ b/src/dawnrpg/game/GameInit.cpp @@ -0,0 +1,13 @@ +// Copyright (c) 2023 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "game/GameInit.hpp" +#include "scene/SceneList.hpp" + +using namespace Dawn; + +std::function GameInit::getInitialScene() { + return helloWorldScene; +} \ No newline at end of file diff --git a/src/dawnrpg/scene/CMakeLists.txt b/src/dawnrpg/scene/CMakeLists.txt new file mode 100644 index 00000000..dfda9095 --- /dev/null +++ b/src/dawnrpg/scene/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2023 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +target_sources(${DAWN_TARGET_NAME} + PRIVATE + HelloWorldScene.cpp +) \ No newline at end of file diff --git a/src/dawnrpg/scene/HelloWorldScene.cpp b/src/dawnrpg/scene/HelloWorldScene.cpp new file mode 100644 index 00000000..77b5958a --- /dev/null +++ b/src/dawnrpg/scene/HelloWorldScene.cpp @@ -0,0 +1,46 @@ + +// Copyright (c) 2023 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "scene/SceneList.hpp" +#include "component/display/Camera.hpp" +#include "prefab/SimpleSpinningCube.hpp" +#include "component/display/material/SimpleTexturedMaterial.hpp" +#include "display/mesh/QuadMesh.hpp" +#include "component/ui/UICanvas.hpp" + +using namespace Dawn; + +void Dawn::helloWorldScene(Scene &s) { + // while(!s.getGame()->assetManager.isLoaded(font)) { + // s.getGame()->assetManager.update(); + // } + + auto cameraItem = s.createSceneItem(); + auto camera = cameraItem->addComponent(); + cameraItem->lookAt({ 3, 3, 3 }, { 0, 0, 0 }, { 0, 1, 0 }); + camera->clipFar = 99999.99f; + + glm::vec2 position = { 0, 0 }; + glm::vec2 size = { 1, 1 }; + auto quad = s.createSceneItem(); + auto quadMesh = std::make_shared(); + quadMesh->createBuffers(QUAD_VERTICE_COUNT, QUAD_INDICE_COUNT); + QuadMesh::buffer( + quadMesh, + glm::vec4(position.x, position.y, size.x, size.y), + glm::vec4(0, 0, 1, 1), + 0, 0, 0 + ); + + auto quadRenderer = quad->addComponent(); + quadRenderer->mesh = quadMesh; + + auto quadMaterial = quad->addComponent(); + quadMaterial->setColor(COLOR_WHITE); + + auto uiCanvasItem = s.createSceneItem(); + auto uiCanvas = uiCanvasItem->addComponent(); +} \ No newline at end of file diff --git a/src/dawnrpg/scene/SceneList.hpp b/src/dawnrpg/scene/SceneList.hpp new file mode 100644 index 00000000..6ab98c67 --- /dev/null +++ b/src/dawnrpg/scene/SceneList.hpp @@ -0,0 +1,11 @@ +// Copyright (c) 2023 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "scene/Scene.hpp" + +namespace Dawn { + void helloWorldScene(Scene &s); +} \ No newline at end of file diff --git a/src/dawntruetype/CMakeLists.txt b/src/dawntruetype/CMakeLists.txt new file mode 100644 index 00000000..86a8bf3b --- /dev/null +++ b/src/dawntruetype/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) 2022 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Includes +target_include_directories(${DAWN_TARGET_NAME} + PUBLIC + ${CMAKE_CURRENT_LIST_DIR} +) + +target_link_libraries(${DAWN_TARGET_NAME} + PUBLIC + freetype +) + +# Subdirs +add_subdirectory(asset) +add_subdirectory(display) +add_subdirectory(ui) \ No newline at end of file diff --git a/src/dawntruetype/asset/AssetManagerTrueType.cpp b/src/dawntruetype/asset/AssetManagerTrueType.cpp new file mode 100644 index 00000000..797c93aa --- /dev/null +++ b/src/dawntruetype/asset/AssetManagerTrueType.cpp @@ -0,0 +1,27 @@ +// Copyright (c) 2024 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "AssetManager.hpp" +#include "loaders/TrueTypeLoader.hpp" + +template<> +std::shared_ptr AssetManager::get( + const std::string filename, + const uint32_t fontSize +) { + auto existing = this->getExisting(filename); + if(existing) { + // Check pointer hasn't gone stale, if it has remove it and create new. + auto texture = existing->getTexture(fontSize); + if(texture) return texture; + this->removeExisting(filename); + } + + std::shared_ptr loader = std::make_shared( + filename + ); + pendingAssetLoaders.push_back(std::static_pointer_cast(loader)); + return loader->getTexture(fontSize); +} \ No newline at end of file diff --git a/src/dawntruetype/asset/CMakeLists.txt b/src/dawntruetype/asset/CMakeLists.txt new file mode 100644 index 00000000..fbf54f24 --- /dev/null +++ b/src/dawntruetype/asset/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2024 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +target_sources(${DAWN_TARGET_NAME} + PRIVATE + AssetManagerTrueType.cpp +) + +add_subdirectory(loaders) \ No newline at end of file diff --git a/src/dawntruetype/asset/loaders/CMakeLists.txt b/src/dawntruetype/asset/loaders/CMakeLists.txt new file mode 100644 index 00000000..577a1d15 --- /dev/null +++ b/src/dawntruetype/asset/loaders/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Dominic Msters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Sources +target_sources(${DAWN_TARGET_NAME} + PRIVATE + TrueTypeLoader.cpp +) \ No newline at end of file diff --git a/src/dawn/asset/loaders/TrueTypeLoader.cpp b/src/dawntruetype/asset/loaders/TrueTypeLoader.cpp similarity index 100% rename from src/dawn/asset/loaders/TrueTypeLoader.cpp rename to src/dawntruetype/asset/loaders/TrueTypeLoader.cpp diff --git a/src/dawn/asset/loaders/TrueTypeLoader.hpp b/src/dawntruetype/asset/loaders/TrueTypeLoader.hpp similarity index 100% rename from src/dawn/asset/loaders/TrueTypeLoader.hpp rename to src/dawntruetype/asset/loaders/TrueTypeLoader.hpp diff --git a/src/dawntruetype/display/CMakeLists.txt b/src/dawntruetype/display/CMakeLists.txt new file mode 100644 index 00000000..4f7c267f --- /dev/null +++ b/src/dawntruetype/display/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2024 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +add_subdirectory(font) \ No newline at end of file diff --git a/src/dawn/display/font/CMakeLists.txt b/src/dawntruetype/display/font/CMakeLists.txt similarity index 100% rename from src/dawn/display/font/CMakeLists.txt rename to src/dawntruetype/display/font/CMakeLists.txt diff --git a/src/dawn/display/font/TrueTypeCharacter.hpp b/src/dawntruetype/display/font/TrueTypeCharacter.hpp similarity index 100% rename from src/dawn/display/font/TrueTypeCharacter.hpp rename to src/dawntruetype/display/font/TrueTypeCharacter.hpp diff --git a/src/dawn/display/font/TrueTypeTexture.cpp b/src/dawntruetype/display/font/TrueTypeTexture.cpp similarity index 100% rename from src/dawn/display/font/TrueTypeTexture.cpp rename to src/dawntruetype/display/font/TrueTypeTexture.cpp diff --git a/src/dawn/display/font/TrueTypeTexture.hpp b/src/dawntruetype/display/font/TrueTypeTexture.hpp similarity index 100% rename from src/dawn/display/font/TrueTypeTexture.hpp rename to src/dawntruetype/display/font/TrueTypeTexture.hpp diff --git a/src/dawntruetype/ui/CMakeLists.txt b/src/dawntruetype/ui/CMakeLists.txt new file mode 100644 index 00000000..bb90be1b --- /dev/null +++ b/src/dawntruetype/ui/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2024 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +add_subdirectory(elements) \ No newline at end of file diff --git a/src/dawntruetype/ui/elements/CMakeLists.txt b/src/dawntruetype/ui/elements/CMakeLists.txt new file mode 100644 index 00000000..a17b14dd --- /dev/null +++ b/src/dawntruetype/ui/elements/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2023 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +target_sources(${DAWN_TARGET_NAME} + PRIVATE + UILabel.cpp +) \ No newline at end of file diff --git a/src/dawn/ui/elements/UILabel.cpp b/src/dawntruetype/ui/elements/UILabel.cpp similarity index 100% rename from src/dawn/ui/elements/UILabel.cpp rename to src/dawntruetype/ui/elements/UILabel.cpp diff --git a/src/dawn/ui/elements/UILabel.hpp b/src/dawntruetype/ui/elements/UILabel.hpp similarity index 100% rename from src/dawn/ui/elements/UILabel.hpp rename to src/dawntruetype/ui/elements/UILabel.hpp