Moved all files.
This commit is contained in:
@@ -1,67 +1,17 @@
|
|||||||
# Copyright (c) 2025 Dominic Masters
|
# Copyright (c) 2026 Dominic Masters
|
||||||
#
|
#
|
||||||
# This software is released under the MIT License.
|
# This software is released under the MIT License.
|
||||||
# https://opensource.org/licenses/MIT
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
# Required Libraries
|
add_subdirectory(dusk)
|
||||||
if(NOT cglm_FOUND)
|
|
||||||
find_package(cglm REQUIRED)
|
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC cglm)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT libzip_FOUND)
|
if(DUSK_TARGET_SYSTEM STREQUAL "linux")
|
||||||
find_package(libzip REQUIRED)
|
add_subdirectory(dusklinux)
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC zip)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT Lua_FOUND)
|
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
find_package(Lua REQUIRED)
|
add_subdirectory(duskpsp)
|
||||||
if(Lua_FOUND AND NOT TARGET Lua::Lua)
|
|
||||||
add_library(Lua::Lua INTERFACE IMPORTED)
|
|
||||||
set_target_properties(
|
|
||||||
Lua::Lua
|
|
||||||
PROPERTIES
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}"
|
|
||||||
INTERFACE_LINK_LIBRARIES "${LUA_LIBRARIES}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC Lua::Lua)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Includes
|
elseif(DUSK_TARGET_SYSTEM STREQUAL "gamecube" OR DUSK_TARGET_SYSTEM STREQUAL "wii")
|
||||||
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
|
add_subdirectory(duskdolphin)
|
||||||
PUBLIC
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
endif()
|
||||||
)
|
|
||||||
|
|
||||||
# Main Binary Source
|
|
||||||
target_sources(${DUSK_BINARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
main.c
|
|
||||||
)
|
|
||||||
|
|
||||||
# Defs
|
|
||||||
dusk_env_to_h(duskdefs.env duskdefs.h)
|
|
||||||
|
|
||||||
# Subdirs
|
|
||||||
add_subdirectory(assert)
|
|
||||||
add_subdirectory(asset)
|
|
||||||
add_subdirectory(debug)
|
|
||||||
add_subdirectory(display)
|
|
||||||
add_subdirectory(engine)
|
|
||||||
add_subdirectory(error)
|
|
||||||
add_subdirectory(event)
|
|
||||||
add_subdirectory(input)
|
|
||||||
add_subdirectory(item)
|
|
||||||
add_subdirectory(locale)
|
|
||||||
add_subdirectory(map)
|
|
||||||
add_subdirectory(scene)
|
|
||||||
add_subdirectory(script)
|
|
||||||
add_subdirectory(story)
|
|
||||||
add_subdirectory(time)
|
|
||||||
add_subdirectory(ui)
|
|
||||||
add_subdirectory(util)
|
|
||||||
|
|
||||||
# if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "psp")
|
|
||||||
# add_subdirectory(thread)
|
|
||||||
# endif()
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2025 Dominic Masters
|
|
||||||
*
|
|
||||||
* This software is released under the MIT License.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#if PSP
|
|
||||||
#include "platform/psp.h"
|
|
||||||
#elif DOLPHIN
|
|
||||||
#include "platform/dolphin.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void debugPrint(const char_t *message, ...) {
|
|
||||||
va_list args;
|
|
||||||
va_start(args, message);
|
|
||||||
vprintf(message, args);
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
#if PSP
|
|
||||||
debugPrintPSP(message, args);
|
|
||||||
#elif DOLPHIN
|
|
||||||
debugPrintDolphin(message, args);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void debugFlush() {
|
|
||||||
#if PSP
|
|
||||||
// No buffering, so nothing to flush
|
|
||||||
#elif DOLPHIN
|
|
||||||
debugFlushDolphin();
|
|
||||||
#else
|
|
||||||
fflush(stdout);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
67
src/dusk/CMakeLists.txt
Normal file
67
src/dusk/CMakeLists.txt
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Copyright (c) 2025 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
# Required Libraries
|
||||||
|
if(NOT cglm_FOUND)
|
||||||
|
find_package(cglm REQUIRED)
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC cglm)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT libzip_FOUND)
|
||||||
|
find_package(libzip REQUIRED)
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC zip)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Lua_FOUND)
|
||||||
|
find_package(Lua REQUIRED)
|
||||||
|
if(Lua_FOUND AND NOT TARGET Lua::Lua)
|
||||||
|
add_library(Lua::Lua INTERFACE IMPORTED)
|
||||||
|
set_target_properties(
|
||||||
|
Lua::Lua
|
||||||
|
PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${LUA_LIBRARIES}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC Lua::Lua)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Includes
|
||||||
|
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Main Binary Source
|
||||||
|
target_sources(${DUSK_BINARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
main.c
|
||||||
|
)
|
||||||
|
|
||||||
|
# Defs
|
||||||
|
dusk_env_to_h(duskdefs.env duskdefs.h)
|
||||||
|
|
||||||
|
# Subdirs
|
||||||
|
add_subdirectory(assert)
|
||||||
|
add_subdirectory(asset)
|
||||||
|
add_subdirectory(debug)
|
||||||
|
add_subdirectory(display)
|
||||||
|
add_subdirectory(engine)
|
||||||
|
add_subdirectory(error)
|
||||||
|
add_subdirectory(event)
|
||||||
|
add_subdirectory(input)
|
||||||
|
add_subdirectory(item)
|
||||||
|
add_subdirectory(locale)
|
||||||
|
add_subdirectory(map)
|
||||||
|
add_subdirectory(scene)
|
||||||
|
add_subdirectory(script)
|
||||||
|
add_subdirectory(story)
|
||||||
|
add_subdirectory(time)
|
||||||
|
add_subdirectory(ui)
|
||||||
|
add_subdirectory(util)
|
||||||
|
|
||||||
|
# if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
|
# add_subdirectory(thread)
|
||||||
|
# endif()
|
||||||
9
src/dusk/debug/CMakeLists.txt
Normal file
9
src/dusk/debug/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2025 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
# Sources
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
)
|
||||||
@@ -22,6 +22,8 @@
|
|||||||
#include <cglm/types.h>
|
#include <cglm/types.h>
|
||||||
#include <cglm/vec2.h>
|
#include <cglm/vec2.h>
|
||||||
|
|
||||||
|
#include "duskplatform.h"
|
||||||
|
|
||||||
#if PSP
|
#if PSP
|
||||||
#include "duskpsp.h"
|
#include "duskpsp.h"
|
||||||
#elif DOLPHIN
|
#elif DOLPHIN
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user