add tests.
Some checks failed
Build Dusk / build-linux (push) Successful in 2m5s
Build Dusk / build-psp (push) Failing after 1m44s

This commit is contained in:
2026-01-05 13:25:39 -06:00
parent 726233e55f
commit 8ee46fd204
32 changed files with 133 additions and 88 deletions

View File

@@ -18,7 +18,7 @@ if(Lua_FOUND AND NOT TARGET Lua::Lua)
endif()
# Libs
target_link_libraries(${DUSK_TARGET_NAME}
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
m
cglm
@@ -28,21 +28,23 @@ target_link_libraries(${DUSK_TARGET_NAME}
)
# Includes
target_include_directories(${DUSK_TARGET_NAME}
PRIVATE
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
# Main Binary Source
target_sources(${DUSK_BINARY_TARGET_NAME}
PUBLIC
main.c
)
# Defs
add_defs(duskdefs.env duskdefs.h)
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
DUSK_TARGET_SYSTEM="${DUSK_TARGET_SYSTEM}"
)

View File

@@ -4,7 +4,7 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
assert.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
asset.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
assetalphaimage.c
assetpaletteimage.c
assetlanguage.c

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
debug.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
display.c
framebuffer.c
camera.c
@@ -20,16 +20,16 @@ add_subdirectory(palette)
add_subdirectory(tileset)
if(DUSK_TARGET_SYSTEM STREQUAL "linux")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
DISPLAY_SDL2=1
DISPLAY_WINDOW_WIDTH_DEFAULT=1080
DISPLAY_WINDOW_HEIGHT_DEFAULT=810
DISPLAY_SCREEN_HEIGHT_DEFAULT=270
)
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
DISPLAY_SDL2=1
DISPLAY_WINDOW_WIDTH_DEFAULT=480
DISPLAY_WINDOW_HEIGHT_DEFAULT=272

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
mesh.c
quad.c
)

View File

@@ -4,6 +4,6 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
)

View File

@@ -4,7 +4,7 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
tileset.c
)

View File

@@ -4,7 +4,7 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
engine.c
)

View File

@@ -6,7 +6,9 @@
*/
#pragma once
#include "display/display.h"// Important to be included first.
// Important to be included first:
#include "display/display.h"
#include "error/error.h"
typedef struct {

View File

@@ -4,7 +4,7 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
error.c
)

View File

@@ -4,24 +4,24 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
input.c
inputbutton.c
inputaction.c
)
if(DUSK_TARGET_SYSTEM STREQUAL "linux")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
INPUT_SDL2=1
INPUT_KEYBOARD=1
INPUT_MOUSE=1
INPUT_GAMEPAD=1
)
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
INPUT_SDL2=1
INPUT_GAMEPAD=1
)

View File

@@ -4,7 +4,7 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
localemanager.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
rpg.c
rpgcamera.c
rpgtextbox.c

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
cutscenesystem.c
cutscenemode.c
)

View File

@@ -4,7 +4,7 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
cutsceneitem.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
entity.c
entityanim.c
npc.c

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
chunk.c
map.c
worldpos.c

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
scenemanager.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
scenetest.c
scenemap.c
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
scriptmanager.c
scriptcontext.c
scriptmodule.c

View File

@@ -4,21 +4,21 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
thread.c
threadmutex.c
)
# Compiler flags.
if(DUSK_TARGET_SYSTEM STREQUAL "linux")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
THREAD_PTHREAD=1
)
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
THREAD_PTHREAD=1
)
endif()

View File

@@ -4,21 +4,21 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
time.c
)
# Compiler defs
if(DUSK_TARGET_SYSTEM STREQUAL "linux")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
TIME_SDL2=1
TIME_FIXED=0
)
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
target_compile_definitions(${DUSK_TARGET_NAME}
PRIVATE
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
TIME_FIXED=1
)
endif()

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
ui.c
uitext.c
uidebug.c

View File

@@ -4,6 +4,6 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
)

View File

@@ -4,8 +4,8 @@
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
memory.c
string.c
math.c