Added basic game save function, doesn't save much yet, but implements version comparison of binary saves for compatibility

This commit is contained in:
2026-05-08 23:15:11 -04:00
parent 0bd1ae1df8
commit ff6b282112
5 changed files with 59 additions and 23 deletions

View File

@@ -35,6 +35,7 @@ add_custom_command(
# Add include directories
include_directories(${SDL3_INCLUDE_DIRS})
add_library(akgl SHARED
deps/semver/semver.c
src/actor.c
src/actor_state_string_names.c
src/text.c
@@ -55,7 +56,6 @@ add_library(akgl SHARED
add_executable(charviewer util/charviewer.c)
add_executable(test_actor tests/actor.c)
add_executable(test_bitmasks tests/bitmasks.c)
add_executable(test_character tests/character.c)
@@ -64,6 +64,7 @@ add_executable(test_sprite tests/sprite.c)
add_executable(test_staticstring tests/staticstring.c)
add_executable(test_tilemap tests/tilemap.c)
add_executable(test_util tests/util.c)
add_executable(test_semver_unit deps/semver/semver_unit.c)
add_test(NAME actor COMMAND test_actor)
add_test(NAME bitmasks COMMAND test_bitmasks)
add_test(NAME character COMMAND test_character)
@@ -72,10 +73,12 @@ add_test(NAME sprite COMMAND test_sprite)
add_test(NAME staticstring COMMAND test_staticstring)
add_test(NAME tilemap COMMAND test_tilemap)
add_test(NAME util COMMAND test_util)
add_test(NAME semver_unit COMMAND test_semver_unit)
# Specify include directories for the library's headers (if applicable)
target_include_directories(akgl PUBLIC
include/
include/
deps/semver/
)
target_link_libraries(akgl
@@ -100,6 +103,7 @@ target_link_libraries(charviewer PRIVATE akerror::akerror akgl SDL3::SDL3 SDL3_t
set(main_lib_dest "lib/akgl-${MY_LIBRARY_VERSION}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/akgl.pc DESTINATION "lib/pkgconfig/")
install(TARGETS akgl DESTINATION "lib/")
install(FILES "deps/semver/semver.h" DESTINATION "include/")
install(FILES "include/akgl/actor.h" DESTINATION "include/akgl/")
install(FILES "include/akgl/types.h" DESTINATION "include/akgl/")
install(FILES "include/akgl/text.h" DESTINATION "include/akgl/")