Actually have matrixed cubes working

This commit is contained in:
2023-02-24 22:32:28 -08:00
parent 7b5bb990b0
commit cf222c469c
11 changed files with 132 additions and 53 deletions

View File

@ -100,39 +100,37 @@ endfunction()
# Scene Item Component Tool
function(tool_scenecomponent clazz hfile)
add_custom_target(${clazz}_scenecomponent
COMMENT "Registering component ${hfile}::${clazz}"
DEPENDS ${ARGN}
)
set(
DAWN_SCENE_ITEM_COMPONENT_LIST
${DAWN_SCENE_ITEM_COMPONENT_LIST}
${clazz}
${hfile}
CACHE INTERNAL ${DAWN_CACHE_TARGET}
)
file(CONFIGURE OUTPUT
"${DAWN_TEMP_DIR}/SceneItemComponents.txt"
CONTENT "${DAWN_SCENE_ITEM_COMPONENT_LIST}"
)
if(NOT TARGET sceneitemcomponentgen_cmd)
add_custom_target(sceneitemcomponentgen_cmd
COMMAND sceneitemcomponentgen --input="${DAWN_TEMP_DIR}/SceneItemComponents.txt" --output="${DAWN_GENERATED_DIR}/scene/SceneItemComponentListItems.cpp"
COMMENT "Generating scene item component ${hfile}::${clazz}"
DEPENDS sceneitemcomponentgen
)
target_sources(${DAWN_TARGET_NAME}
PRIVATE
${DAWN_GENERATED_DIR}/scene/SceneItemComponentListItems.cpp
)
endif()
add_dependencies(sceneitemcomponentgen ${clazz}_scenecomponent)
add_dependencies(${DAWN_TARGET_NAME} sceneitemcomponentgen_cmd)
# add_custom_target(${clazz}_scenecomponent
# COMMENT "Registering component ${hfile}::${clazz}"
# DEPENDS ${ARGN}
# )
# set(
# DAWN_SCENE_ITEM_COMPONENT_LIST
# ${DAWN_SCENE_ITEM_COMPONENT_LIST}
# ${clazz}
# ${hfile}
# CACHE INTERNAL ${DAWN_CACHE_TARGET}
# )
# file(CONFIGURE OUTPUT
# "${DAWN_TEMP_DIR}/SceneItemComponents.txt"
# CONTENT "${DAWN_SCENE_ITEM_COMPONENT_LIST}"
# )
# if(NOT TARGET sceneitemcomponentgen_cmd)
# add_custom_target(sceneitemcomponentgen_cmd
# COMMAND sceneitemcomponentgen --input="${DAWN_TEMP_DIR}/SceneItemComponents.txt" --output="${DAWN_GENERATED_DIR}/scene/SceneItemComponentListItems.cpp"
# COMMENT "Generating scene item component ${hfile}::${clazz}"
# DEPENDS sceneitemcomponentgen
# )
# # target_sources(${DAWN_TARGET_NAME}
# # PRIVATE
# # ${DAWN_GENERATED_DIR}/scene/SceneItemComponentListItems.cpp
# # )
# endif()
# add_dependencies(sceneitemcomponentgen ${clazz}_scenecomponent)
# add_dependencies(${DAWN_TARGET_NAME} ${clazz}_scenecomponent sceneitemcomponentgen sceneitemcomponentgen_cmd)
endfunction()
if(DAWN_VISUAL_NOVEL)
add_subdirectory(vnscenegen)

View File

@ -117,10 +117,11 @@ int32_t GeneratedLanguages::scanDir(
std::vector<std::string> *files
) {
DIR* handle = opendir(dir.c_str());
if(ENOENT == errno || !handle) {
if(ENOENT == errno) {
*error = "Input directory \"" + dir + "\" does not exist";
return 1;
return 0;
}
if(!handle) return 0;
struct dirent *entry;
while((entry=readdir(handle))) {