Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions Obelisk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,36 @@ project (Obelisk
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_STANDARD 20)

set (TARGET_NAME Obelisk)

if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
add_executable (${TARGET_NAME} WIN32)
add_executable (Obelisk WIN32)
else()
add_executable (${TARGET_NAME})
add_executable (Obelisk)
endif()

target_sources(${TARGET_NAME} PUBLIC EntryPoint.cpp)
target_sources(Obelisk PRIVATE EntryPoint.cpp)

# We set this debugger directory to find assets and resources file
# after being copied to Debug and Release output directories
#
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set_target_properties(${TARGET_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
set_target_properties(Obelisk PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
endif ()

target_include_directories (${TARGET_NAME}
PRIVATE
.
${ENLISTMENT_ROOT}
${ENLISTMENT_ROOT}/ZEngine
)

target_precompile_headers(${TARGET_NAME} PRIVATE pch.h)

target_compile_definitions(${TARGET_NAME}
target_compile_definitions(Obelisk
PRIVATE
NOMINMAX
UNICODE
_UNICODE
)

target_link_libraries(${TARGET_NAME} PUBLIC
tetragrama
target_link_libraries(Obelisk PUBLIC
Tetragrama
imported::External_obeliskLibs
)

set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set_target_properties(Obelisk PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)

install(TARGETS ${TARGET_NAME}
install(TARGETS Obelisk
DESTINATION bin
)

Expand Down
12 changes: 4 additions & 8 deletions Obelisk/EntryPoint.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include <CLI/CLI.hpp>
#include <Tetragrama/Editor.h>
#include <ZEngine/Applications/GameApplication.h>
#include <ZEngine/Core/Memory/MemoryManager.h>
#include <ZEngine/EngineConfiguration.h>
#include <ZEngine/Logging/Logger.h>
#include <ZEngine/Applications/GameApplication.h>

#include <Tetragrama/Editor.h>

#ifdef ZENGINE_PLATFORM

Expand All @@ -23,11 +22,9 @@ int applicationEntryPoint(int argc, char* argv[])
LoggerConfiguration logger_cfg = {};
Logger::Initialize(arena, logger_cfg);


GameApplicationPtr app = nullptr;


CLI::App cli{"ObeliskCLI"};
CLI::App cli{"ObeliskCLI"};
argv = cli.ensure_utf8(argv);

std::string config_file = "";
Expand All @@ -37,10 +34,9 @@ int applicationEntryPoint(int argc, char* argv[])

CLI11_PARSE(cli, argc, argv);


if (launch_editor)
{
app = ZPushStructCtor(arena, Tetragrama::Editor);
app = ZPushStructCtor(arena, Tetragrama::Editor);
app->EnableRenderOverlay = true;
}

Expand Down
18 changes: 0 additions & 18 deletions Obelisk/pch.h

This file was deleted.

32 changes: 8 additions & 24 deletions Tetragrama/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,25 @@ file (GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp

source_group (TREE ${PROJECT_SOURCE_DIR} PREFIX "Source Files" FILES ${HEADER_FILES} ${CPP_FILES})

set (TARGET_NAME tetragrama)
add_library (Tetragrama)

add_library (${TARGET_NAME})

target_sources(${TARGET_NAME} PUBLIC ${HEADER_FILES} ${CPP_FILES})
target_sources(Tetragrama
PUBLIC FILE_SET HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR}/..
PRIVATE ${CPP_FILES}
)

# We set this debugger directory to find assets and resources file
# after being copied to Debug and Release output directories
#
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set_target_properties(${TARGET_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
set_target_properties(Tetragrama PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
endif ()

target_include_directories (${TARGET_NAME}
PUBLIC
.
./Components
./Components/Events
./Controllers
./Inputs
./Layers
./Messengers
./Helpers
./Importers
./Serializers
./Managers
)

target_precompile_headers(${TARGET_NAME} PRIVATE pch.h)

target_compile_definitions(${TARGET_NAME}
target_compile_definitions(Tetragrama
PRIVATE
NOMINMAX
UNICODE
_UNICODE
)

target_link_libraries(${TARGET_NAME} PUBLIC zEngineLib)
target_link_libraries(Tetragrama PUBLIC zEngineLib)
2 changes: 1 addition & 1 deletion Tetragrama/Components/AboutUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <imgui.h>

namespace Tetragrama::Components
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/DemoUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <imgui.h>

namespace Tetragrama::Components
Expand Down
13 changes: 7 additions & 6 deletions Tetragrama/Components/DockspaceUIComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include <DockspaceUIComponent.h>
#include <Editor.h>
#include <Helpers/UIDispatcher.h>
#include <Importers/AssimpImporter.h>
#include <MessageToken.h>
#include <Messengers/Messenger.h>
#include <Tetragrama/Components/DockspaceUIComponent.h>
#include <Tetragrama/Editor.h>
#include <Tetragrama/Helpers/UIDispatcher.h>
#include <Tetragrama/MessageToken.h>
#include <Tetragrama/Messengers/Messenger.h>
#include <ZEngine/Importers/AssimpImporter.h>
#include <ZEngine/Logging/LoggerDefinition.h>
#include <fmt/format.h>
#include <imgui/imgui_internal.h>
#include <filesystem>

namespace fs = std::filesystem;

Expand Down
8 changes: 4 additions & 4 deletions Tetragrama/Components/DockspaceUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include <Importers/IAssetImporter.h>
#include <Message.h>
#include <Serializers/EditorSceneSerializer.h>
#include <UIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <Tetragrama/Messengers/Message.h>
#include <Tetragrama/Serializers/EditorSceneSerializer.h>
#include <ZEngine/Importers/IAssetImporter.h>
#include <imgui.h>

namespace Tetragrama::Components
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/Events/SceneTextureAvailableEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponentEvent.h>
#include <Tetragrama/UIComponentEvent.h>

namespace Tetragrama::Components::Event
{
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/Events/SceneViewportFocusedEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponentEvent.h>
#include <Tetragrama/Components/Events/UIComponentEvent.h>

namespace Tetragrama::Components::Event
{
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/Events/SceneViewportResizedEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponentEvent.h>
#include <Tetragrama/Components/Events/UIComponentEvent.h>

namespace Tetragrama::Components::Event
{
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/Events/SceneViewportUnfocusedEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponentEvent.h>
#include <Tetragrama/Components/Events/UIComponentEvent.h>

namespace Tetragrama::Components::Event
{
Expand Down
9 changes: 6 additions & 3 deletions Tetragrama/Components/HierarchyViewUIComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#include <Controllers/EditorCameraController.h>
#include <Editor.h>
#include <HierarchyViewUIComponent.h>
// clang-format off
#include <Tetragrama/Components/HierarchyViewUIComponent.h>
#include <Tetragrama/Controllers/EditorCameraController.h>
#include <ImGuizmo/ImGuizmo.h>
#include <Tetragrama/Editor.h>
#include <ZEngine/Core/Maths/Matrix.h>
#include <ZEngine/Managers/AssetManager.h>
#include <ZEngine/Rendering/Scenes/GraphicScene.h>
#include <ZEngine/Windows/Inputs/KeyCodeDefinition.h>
#include <ZEngine/Windows/Inputs/Keyboard.h>
#include <ZEngine/Windows/Inputs/Mouse.h>
// clang-format on
#include <stack>

using namespace ZEngine;
using namespace ZEngine::Helpers;
Expand Down
3 changes: 2 additions & 1 deletion Tetragrama/Components/HierarchyViewUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <UIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <Tetragrama/EditorScene.h>
#include <imgui.h>

namespace Tetragrama::Components
Expand Down
6 changes: 3 additions & 3 deletions Tetragrama/Components/InspectorViewUIComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <Editor.h>
#include <InspectorViewUIComponent.h>
#include <UIComponentDrawerHelper.h>
#include <Tetragrama/Components/InspectorViewUIComponent.h>
#include <Tetragrama/Editor.h>
#include <Tetragrama/Helpers/UIComponentDrawerHelper.h>
#include <ZEngine/Core/Coroutine.h>
#include <ZEngine/Core/Maths/Matrix.h>
#include <ZEngine/Helpers/MeshHelper.h>
Expand Down
7 changes: 2 additions & 5 deletions Tetragrama/Components/InspectorViewUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#pragma once
#include <Message.h>
#include <UIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <Tetragrama/Messengers/Message.h>
#include <ZEngine/ZEngineDef.h>
#include <imgui.h>
#include <future>
#include <mutex>
#include <string>

namespace Tetragrama::Components
{
Expand Down
6 changes: 3 additions & 3 deletions Tetragrama/Components/LogUIComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <Helpers/MemoryOperations.h>
#include <LogUIComponent.h>
#include <SearchPatternAlgorithm.h>
#include <Tetragrama/Components/LogUIComponent.h>
#include <Tetragrama/Helpers/SearchPatternAlgorithm.h>
#include <ZEngine/Core/Containers/Array.h>
#include <ZEngine/Helpers/MemoryOperations.h>
#include <imgui.h>

using namespace ZEngine::Logging;
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/LogUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <UIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <ZEngine/Core/Memory/Allocator.h>
#include <ZEngine/Logging/Logger.h>
#include <atomic>
Expand Down
8 changes: 5 additions & 3 deletions Tetragrama/Components/ProjectViewUIComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include <Editor.h>
#include <Helpers/SearchPatternAlgorithm.h>
#include <ProjectViewUIComponent.h>
#include <Tetragrama/Components/ProjectViewUIComponent.h>
#include <Tetragrama/Editor.h>
#include <Tetragrama/Helpers/SearchPatternAlgorithm.h>
#include <ZEngine/Helpers/MemoryOperations.h>
#include <imgui.h>
#include <filesystem>
#include <fstream>

using namespace ZEngine::Helpers;

Expand Down
4 changes: 3 additions & 1 deletion Tetragrama/Components/ProjectViewUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once
#include <UIComponent.h>
#include <Tetragrama/Components/ProjectViewUIComponent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <ZEngine/Core/Memory/Allocator.h>
#include <ZEngine/Importers/AssetTypes.h>
#include <filesystem>

namespace Tetragrama::Components
{
Expand Down
12 changes: 7 additions & 5 deletions Tetragrama/Components/SceneViewportUIComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#include <Controllers/EditorCameraController.h>
#include <MessageToken.h>
#include <Messengers/Messenger.h>
#include <SceneViewportUIComponent.h>
#include <Tetragrama/Components/Events/UIComponentEvent.h>
#include <Tetragrama/Components/SceneViewportUIComponent.h>
#include <Tetragrama/Controllers/EditorCameraController.h>
#include <Tetragrama/MessageToken.h>
#include <Tetragrama/Messengers/Messenger.h>
#include <ZEngine/Logging/LoggerDefinition.h>
#include <ZEngine/Rendering/Renderers/GraphicRenderer.h>
#include <ZEngine/Windows/Inputs/KeyCodeDefinition.h>
/**/
#include <Editor.h>
#include <ImGuizmo/ImGuizmo.h>
#include <Tetragrama/Editor.h>
#include <filesystem>

using namespace Tetragrama::Components::Event;
using namespace ZEngine::Rendering::Renderers;
Expand Down
10 changes: 5 additions & 5 deletions Tetragrama/Components/SceneViewportUIComponent.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once
#include <Components/Events/SceneViewportFocusedEvent.h>
#include <Components/Events/SceneViewportResizedEvent.h>
#include <Components/Events/SceneViewportUnfocusedEvent.h>
#include <Messengers/Message.h>
#include <UIComponent.h>
#include <Tetragrama/Components/Events/SceneViewportFocusedEvent.h>
#include <Tetragrama/Components/Events/SceneViewportResizedEvent.h>
#include <Tetragrama/Components/Events/SceneViewportUnfocusedEvent.h>
#include <Tetragrama/Components/UIComponent.h>
#include <Tetragrama/Messengers/Message.h>
#include <imgui.h>
#include <vulkan/vulkan.h>

Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Components/UIComponent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <ImguiLayer.h>
#include <Tetragrama/Layers/ImguiLayer.h>
#include <ZEngine/Core/Containers/Array.h>
#include <ZEngine/Core/IRenderable.h>
#include <ZEngine/Core/IUpdatable.h>
Expand Down
2 changes: 1 addition & 1 deletion Tetragrama/Controllers/EditorCameraController.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <EditorCameraController.h>
#include <Tetragrama/Controllers/EditorCameraController.h>
#include <ZEngine/Core/Maths/MathUtils.h>

using namespace ZEngine::Rendering::Cameras;
Expand Down
9 changes: 5 additions & 4 deletions Tetragrama/Editor.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include <Controllers/EditorCameraController.h>
#include <Editor.h>
#include <MessageToken.h>
#include <Messengers/Messenger.h>
#include <Tetragrama/Controllers/EditorCameraController.h>
#include <Tetragrama/Editor.h>
#include <Tetragrama/MessageToken.h>
#include <Tetragrama/Messengers/Messenger.h>
#include <fmt/format.h>
#include <nlohmann/json.hpp>
#include <fstream>

using namespace ZEngine;
using namespace ZEngine::Core::Containers;
Expand Down
Loading