Add asset, resource system, mesh formats, color, SDL3 display and example game
Asset directory with CMake add_asset (extension dispatched), plain file asset access, resource/resource manager with async load thread and text loader, URI utilities, mesh format helpers, generated color header, and example game hooks wired through the engine. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
65c4a9c051
commit
cad41e456b
47 files changed
+2335
-7
No files matched your search
@@ -11,6 +11,10 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
# Directories
|
||||
set(DUSK_ROOT_DIR "${CMAKE_SOURCE_DIR}")
|
||||
set(DUSK_SOURCES_DIR "${DUSK_ROOT_DIR}/src")
|
||||
set(DUSK_ASSETS_DIR "${DUSK_ROOT_DIR}/assets")
|
||||
set(DUSK_BUILT_ASSETS_DIR "${CMAKE_BINARY_DIR}/assets")
|
||||
set(DUSK_GENERATED_HEADERS_DIR "${CMAKE_BINARY_DIR}/generated")
|
||||
file(MAKE_DIRECTORY ${DUSK_GENERATED_HEADERS_DIR})
|
||||
|
||||
project(DuskCore VERSION 1.0.0 LANGUAGES C)
|
||||
|
||||
@@ -65,9 +69,25 @@ if(DUSK_BACKTRACE)
|
||||
target_link_options(${DUSK_LIBRARY_TARGET_NAME} PUBLIC -rdynamic)
|
||||
endif()
|
||||
|
||||
# Tools (run during the build to generate headers)
|
||||
add_subdirectory(tools)
|
||||
target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||
${DUSK_GENERATED_HEADERS_DIR}
|
||||
)
|
||||
|
||||
# Core engine code
|
||||
add_subdirectory(${DUSK_SOURCES_DIR}/dusk)
|
||||
|
||||
# Assets, copied into <build>/assets
|
||||
include(${DUSK_ROOT_DIR}/cmake/asset/asset.cmake)
|
||||
# Separate binary dir, so <build>/assets only contains built assets.
|
||||
add_subdirectory(${DUSK_ROOT_DIR}/assets ${CMAKE_BINARY_DIR}/assets_cmake)
|
||||
dusk_assets_finalize(DuskAssets)
|
||||
add_dependencies(${DUSK_LIBRARY_TARGET_NAME} DuskAssets)
|
||||
|
||||
# Game code
|
||||
add_subdirectory(${DUSK_SOURCES_DIR}/${DUSK_GAME})
|
||||
|
||||
# Platform code
|
||||
foreach(DIR ${DUSK_PLATFORM_DIRS})
|
||||
add_subdirectory(${DUSK_SOURCES_DIR}/${DIR})
|
||||
|
||||
Reference in new issue
Block a user