From 9f80beabe8ebda6c2da8c19f556a6b398959453e Mon Sep 17 00:00:00 2001 From: lveyou <1339484752@qq.com> Date: Sat, 5 Dec 2026 23:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 8 ++++- CMakeLists.txt | 2 +- dl/CMakeLists.txt | 2 +- dl/dl.h | 3 +- dl/io/dl_json.h | 1 - dl/misc/dl_component_use.h | 62 ++++++++++++++++++++++++---------- project/dl_test/CMakeLists.txt | 5 ++- project/hs | 2 +- 8 files changed, 61 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index ddac28a6..a9a3fffa 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,12 @@ log/ project/dl_test/res/dl_test project/dl_console/res/dl_console /project/dl_unit_test/res/dl_unit_test.pdb -/hs_build.log project/dl_unit_test/res/dl_unit_test + compile_commands.json + +*.log +*.ilk +*.pdb +*.user +*.idea diff --git a/CMakeLists.txt b/CMakeLists.txt index 815d608a..14ea09aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.16) # 使MT设置生效 if (POLICY CMP0091) diff --git a/dl/CMakeLists.txt b/dl/CMakeLists.txt index 950e760a..fce06d3e 100644 --- a/dl/CMakeLists.txt +++ b/dl/CMakeLists.txt @@ -38,7 +38,7 @@ endif() file(GLOB_RECURSE SRC_LIST ${CMAKE_SOURCE_DIR}/dl/*.cpp - ${CMAKE_SOURCE_DIR}/dl/*.h + #${CMAKE_SOURCE_DIR}/dl/*.h ) # 第三方库源文件 diff --git a/dl/dl.h b/dl/dl.h index d99b20db..5a458596 100644 --- a/dl/dl.h +++ b/dl/dl.h @@ -18,7 +18,8 @@ #include #include #include - +#include +#include #include #include #include diff --git a/dl/io/dl_json.h b/dl/io/dl_json.h index f1e4921d..d82e1d5d 100644 --- a/dl/io/dl_json.h +++ b/dl/io/dl_json.h @@ -14,7 +14,6 @@ #include using json = nlohmann::json; -#include "io/dl_log.h" #include "base/dl_array.h" #include "memory/dl_buffer.h" #include "base/dl_pimpl.h" diff --git a/dl/misc/dl_component_use.h b/dl/misc/dl_component_use.h index 9561377e..9686ba93 100644 --- a/dl/misc/dl_component_use.h +++ b/dl/misc/dl_component_use.h @@ -20,23 +20,51 @@ namespace dl namespace Cpt { //! ------------------------------具体组件------------------------------------- - using IsPickup = Function, str_uid("IsPickup")>;//!< 拾取 - using IsSelect = Function, str_uid("IsSelect")>;//!< 选择 - using IsClick = Function, str_uid("IsClick")>;//!< 点击 - using IsDown = Function, str_uid("IsDown")>;//!< 按下状态 - using GetCoor = Function, str_uid("GetCoor")>;//!< 返回坐标系 - using GetOrder = Function, str_uid("GetOrder")>;//!< 返回order - using Update = Function, str_uid("Update")>;//!< 逻辑 - using Render = Function, str_uid("Render")>;//!< 绘制 - using SetOrder = Function, str_uid("SetOrder")>;//!< 设置order - using SetSelect = Function, str_uid("SetSelect")>;//!< 设置是否选择 - using DeleteThis = Function, str_uid("DeleteThis")>;//!< 删除自身 - using Clone = Function, str_uid("Clone")>;//!< 克隆 - using RenderDebug = Function, str_uid("RenderD")>;//!< 调试绘图 - using SetSize = Function, str_uid("SetSize")>;//!< 设置大小 - using GetSize = Function, str_uid("GetSize")>;//!< 获取大小 - using CustomTag = Variable; - using CustomName = Variable; + //using IsPickup = Function, str_uid("IsPickup")>;//!< 拾取 + //using IsSelect = Function, str_uid("IsSelect")>;//!< 选择 + //using IsClick = Function, str_uid("IsClick")>;//!< 点击 + //using IsDown = Function, str_uid("IsDown")>;//!< 按下状态 + //using GetCoor = Function, str_uid("GetCoor")>;//!< 返回坐标系 + //using GetOrder = Function, str_uid("GetOrder")>;//!< 返回order + //using Update = Function, str_uid("Update")>;//!< 逻辑 + //using Render = Function, str_uid("Render")>;//!< 绘制 + //using SetOrder = Function, str_uid("SetOrder")>;//!< 设置order + //using SetSelect = Function, str_uid("SetSelect")>;//!< 设置是否选择 + //using DeleteThis = Function, str_uid("DeleteThis")>;//!< 删除自身 + //using Clone = Function, str_uid("Clone")>;//!< 克隆 + //using RenderDebug = Function, str_uid("RenderD")>;//!< 调试绘图 + //using SetSize = Function, str_uid("SetSize")>;//!< 设置大小 + //using GetSize = Function, str_uid("GetSize")>;//!< 获取大小 + //using CustomTag = Variable; + //using CustomName = Variable; + + using Update = Function, 0>;//!< 逻辑 + using Render = Function, 1>;//!< 绘制 + using DeleteThis = Function, 3>;//!< 删除自身 + using RenderDebug = Function, 4>;//!< 调试绘图 + + using IsPickup = Function, 0>;//!< 拾取 + using IsSelect = Function, 1>;//!< 选择 + using IsClick = Function, 2>;//!< 点击 + using IsDown = Function, 3>;//!< 按下状态 + + using GetOrder = Function, 0>;//!< 返回order + + using GetCoor = Function, 0>;//!< 返回坐标系 + using Clone = Function, 0>;//!< 克隆 + using GetSize = Function, 0>;//!< 获取大小 + + using SetOrder = Function, 0>;//!< 设置order + + using SetSelect = Function, 0>;//!< 设置是否选择 + + using SetSize = Function, 0>;//!< 设置大小 + + + using CustomTag = Variable; + using CustomName = Variable; + + //! 语言本地化 class Lang diff --git a/project/dl_test/CMakeLists.txt b/project/dl_test/CMakeLists.txt index a5bb6c1f..8bedcf64 100644 --- a/project/dl_test/CMakeLists.txt +++ b/project/dl_test/CMakeLists.txt @@ -4,4 +4,7 @@ project ("dl_test") set (PATH_SRC ${PROJECT_SOURCE_DIR}) set (PATH_RES ${PROJECT_SOURCE_DIR}/res) set (USE_RENDER ON) -include ("../project.cmake") \ No newline at end of file +include ("../project.cmake") + +# 直接的命令似乎不得行,以后再研究 +target_precompile_headers(${PROJECT_NAME} PRIVATE head.h) \ No newline at end of file diff --git a/project/hs b/project/hs index 0324b58a..0c5cab90 160000 --- a/project/hs +++ b/project/hs @@ -1 +1 @@ -Subproject commit 0324b58a3b555406307855d3fc0f33345c4c3127 +Subproject commit 0c5cab90ef30e44e2cb87c7b2ea127da4a86b835