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
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2026 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Handler that copies an asset into the built assets directory as is. Every
|
||||
# handler has the signature (SOURCE RELATIVE OUT_VAR) and must set OUT_VAR, in
|
||||
# the caller's scope, to the file it produces.
|
||||
function(dusk_asset_copy ASSET_SOURCE ASSET_RELATIVE OUT_VAR)
|
||||
set(ASSET_OUTPUT "${DUSK_BUILT_ASSETS_DIR}/${ASSET_RELATIVE}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${ASSET_OUTPUT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${ASSET_SOURCE}" "${ASSET_OUTPUT}"
|
||||
DEPENDS "${ASSET_SOURCE}"
|
||||
COMMENT "Copying asset ${ASSET_RELATIVE}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
set(${OUT_VAR} "${ASSET_OUTPUT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
Reference in new issue
Block a user