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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ Build/
intermediate/
Engine/Workspace
submodules
Engine/.vs
Engine/.vs
/Engine/vcpkg_installed
/.vs
/out
12 changes: 0 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
[submodule "submodules/FX11"]
path = submodules/FX11
url = https://github.com/Microsoft/FX11
[submodule "submodules/DXTK"]
path = submodules/DXTK
url = https://github.com/Microsoft/DirectXTK
[submodule "submodules/imgui"]
path = submodules/imgui
url = https://github.com/ocornut/imgui.git
[submodule "submodules/SOL2"]
path = submodules/SOL2
url = https://github.com/ThePhD/sol2
[submodule "submodules/SelfLogger"]
path = submodules/SelfLogger
url = https://github.com/DecisionSolver/SelfLogger
32 changes: 32 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 3.21)

project(DS)

add_compile_definitions(
DEBUG
_ENABLE_EXTENDED_ALIGNED_STORAGE
SOL_STRINGS_ARE_NUMBERS
WIN32_LEAN_AND_MEAN
_WIN32_WINNT=0x0601
_WIN7_PLATFORM_UPDATE
WIN32
XINPUT_USE_9_1_0
IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ZLIB_WINAPI
PX_PHYSX_STATIC_LIB
PX_PHYSX_GPU_STATIC
ASIO_STANDALONE
ASIO_HAS_IOCP
_WIN32_WINDOWS
ASIO_HAS_BOOST_DATE_TIME
_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
_LIB
IMGUI_DEFINE_MATH_OPERATORS
CRYPTOPP_ENABLE_NAMESPACE_WEAK
RENDER_SYSTEM_DIRECTX_11
without_multiplayer

)
add_subdirectory(Engine/Common)
add_subdirectory(submodules)
add_subdirectory(Engine)
59 changes: 59 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"version": 3,
"configurePresets": [
{
"name": "windows-base",
"description": "Target Windows with the Visual Studio development environment.",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "C:/Users/HackMan/source/repos/vcpkg/scripts/buildsystems/vcpkg.cmake",
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)",
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "x64-release",
"displayName": "x64 Release",
"description": "Target Windows (64-bit) with the Visual Studio development environment. (RelWithDebInfo)",
"inherits": "x64-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"description": "Target Windows (32-bit) with the Visual Studio development environment. (Debug)",
"inherits": "windows-base",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "x86-release",
"displayName": "x86 Release",
"description": "Target Windows (32-bit) with the Visual Studio development environment. (RelWithDebInfo)",
"inherits": "x86-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
}
]
}
10 changes: 10 additions & 0 deletions Engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(CMAKE_CXX_STANDARD 17)

add_subdirectory(Core)

add_executable(Launcher)
target_link_libraries(Launcher
#ProjectSystem
Core
)

97 changes: 97 additions & 0 deletions Engine/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "base-ninja",
"hidden": true,
"displayName": "Base Config",
"description": "Sets Ninja Multi-Config generator, compilers, x64 architecture, build and install directory, debug build type",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/Solutions/${presetName}",
"warnings": { "dev": false },
"errors": { "dev": false },
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "C:/Users/HackMan/source/repos/vcpkg/scripts/buildsystems/vcpkg.cmake",
"OPTION_RUNTIME_CVAR_OVERRIDES": "ON",
"OPTION_REMOTE_CONSOLE": "ON",
"OPTION_DX_RENDERER": "ON",
"OPTION_VK_RENDERER": "OFF",
"OPTION_BUILD_DOCS": "ON",
"USE_STEAM": "OFF",
"OPTION_DEDICATED_SERVER": "OFF",

"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/Tools/CMake/toolchain/windows/WindowsPC-MSVC.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_INSTALLER": "ON",
"DOWNLOAD_VCPKG": "ON",
"VCPKG_ROOT": {
"value": "${sourceDir}/vcpkg",
"type": "FILEPATH"
},

"ADD_PACKAGE_DEP_MODE": "OFF",

"CMAKE_CONFIGURATION_TYPES": "Release;Debug;Profile"
},
"environment": {
"solutionDir": "${sourceDir}/Solutions"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [ "Windows" ]
}
}
}
],
"buildPresets": [
{
"name": "windows-ninja-debug",
"configurePreset": "windows-ninja",
"configuration": "Debug"
},
{
"name": "windows-ninja-release",
"configurePreset": "windows-ninja",
"configuration": "Release"
},
{
"name": "vs2022-msvc-debug",
"configurePreset": "vs2022-msvc",
"configuration": "Debug"
},
{
"name": "vs2022-msvc-release",
"configurePreset": "vs2022-msvc",
"configuration": "Release"
},
{
"name": "vs2022-clang-debug",
"configurePreset": "vs2022-clang",
"configuration": "Debug"
},
{
"name": "vs2022-clang-release",
"configurePreset": "vs2022-clang",
"configuration": "Release"
},
{
"name": "vs2019-msvc-debug",
"configurePreset": "vs2019-msvc",
"configuration": "Debug"
},
{
"name": "vs2019-msvc-release",
"configurePreset": "vs2019-msvc",
"configuration": "Release"
}
]
}
39 changes: 39 additions & 0 deletions Engine/CMakeUserPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "ninja",
"inherits": "base-ninja",
"displayName": "Windows x64 Ninja Multi-Config",
"cacheVariables": {
"CMAKE_SYSTEM_VERSION": "10",
//"OPTION_SANDBOX": "ON",
"OPTION_STATIC_LINKING": "ON",
"OPTION_STATIC_LINKING_WITH_GAME_AS_DLL": "ON",

"QT_SDK_ROOT": "C:",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/Tools/CMake/toolchain/windows/WindowsPC-MSVC.cmake",
"USE_MSVC": "ON"

//"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/Tools/CMake/toolchain/windows/WindowsPC-Clang.cmake"
}
}
],
"buildPresets": [
{
"name": "ninja-debug",
"configurePreset": "ninja",
"configuration": "Debug"
},
{
"name": "ninja-release",
"configurePreset": "ninja",
"configuration": "Release"
}
]
}
File renamed without changes.
73 changes: 73 additions & 0 deletions Engine/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
add_library(CoreInterface INTERFACE)

find_package(assimp CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE assimp::assimp)

find_package(Boost COMPONENTS system filesystem REQUIRED)
target_link_libraries(CoreInterface INTERFACE Boost::boost Boost::filesystem)

find_package(directxtk CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE Microsoft::DirectXTK)

find_package(dxsdk-d3dx CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE Microsoft::D3DX9 Microsoft::D3DX10 Microsoft::D3DX11)

find_package(effects11 CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE Microsoft::Effects11)

find_package(Lua REQUIRED)
target_include_directories(CoreInterface INTERFACE ${LUA_INCLUDE_DIR})
target_link_libraries(CoreInterface INTERFACE ${LUA_LIBRARIES})

find_package(imgui CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE imgui::imgui)

find_package(tinyxml2 CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE tinyxml2::tinyxml2)

find_package(sol2 CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE sol2::sol2)

find_package(nlohmann_json CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE nlohmann_json::nlohmann_json)

find_package(dxut CONFIG REQUIRED)
target_link_libraries(CoreInterface INTERFACE Microsoft::DXUT Microsoft::DXUTOpt)

target_link_libraries(CoreInterface INTERFACE Winmm)
target_link_libraries(CoreInterface INTERFACE SelfLogger)

target_precompile_headers(CoreInterface
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/../Core/pch.h
)

target_include_directories(CoreInterface
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../Core/Include
)

add_compile_definitions(
DEBUG
_ENABLE_EXTENDED_ALIGNED_STORAGE
SOL_STRINGS_ARE_NUMBERS
WIN32_LEAN_AND_MEAN
_WIN32_WINNT=0x0601
_WIN7_PLATFORM_UPDATE
WIN32
XINPUT_USE_9_1_0
IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ZLIB_WINAPI
PX_PHYSX_STATIC_LIB
PX_PHYSX_GPU_STATIC
ASIO_STANDALONE
ASIO_HAS_IOCP
_WIN32_WINDOWS
ASIO_HAS_BOOST_DATE_TIME
_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
_LIB
IMGUI_DEFINE_MATH_OPERATORS
CRYPTOPP_ENABLE_NAMESPACE_WEAK
RENDER_SYSTEM_DIRECTX_11
without_multiplayer
)
7 changes: 3 additions & 4 deletions Engine/Core/Engine.h → Engine/Common/Engine.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#pragma once
#if !defined(__ENGINE_H__)
#define __ENGINE_H__
#include "pch.h"

#include <Inc/Keyboard.h>
#include <Inc/Mouse.h>
#include <Inc/GamePad.h>
#include <Keyboard.h>
#include <Mouse.h>
#include <GamePad.h>

#include "../resource.h"
#include "Timer.h"
Expand Down
Loading