Move from 'libsdlerror' to 'libakerror'

This commit is contained in:
2026-01-05 08:58:06 -05:00
parent 7cff27f035
commit f475dfb6ee
30 changed files with 40 additions and 40 deletions

View File

@@ -7,7 +7,7 @@ find_package(PkgConfig REQUIRED)
find_package(SDL3 REQUIRED)
find_package(SDL3_image REQUIRED)
find_package(SDL3_mixer REQUIRED)
find_package(sdlerror REQUIRED)
find_package(akerror REQUIRED)
find_package(jansson REQUIRED)
find_package(box2d REQUIRED)
@@ -16,7 +16,7 @@ pkg_check_modules(SDL3 REQUIRED sdl3)
pkg_check_modules(SDL3_image REQUIRED sdl3-image)
pkg_check_modules(SDL3_mixer REQUIRED sdl3-mixer)
pkg_check_modules(jansson REQUIRED jansson)
pkg_check_modules(sdlerror REQUIRED sdlerror)
pkg_check_modules(akerror REQUIRED akerror)
set(GAMECONTROLLERDB_H "include/sdl3game/SDL_GameControllerDB.h")
@@ -71,16 +71,16 @@ target_include_directories(sdl3game PUBLIC
include/
)
target_link_libraries(test_actor PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_bitmasks PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_character PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_registry PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_sprite PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_staticstring PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_tilemap PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_util PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_actor PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_bitmasks PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_character PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_registry PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_sprite PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_staticstring PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_tilemap PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(test_util PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(charviewer PRIVATE sdlerror::sdlerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
target_link_libraries(charviewer PRIVATE akerror::akerror sdl3game SDL3::SDL3 SDL3_image::SDL3_image SDL3_mixer::SDL3_mixer box2d::box2d jansson::jansson -lm)
set(main_lib_dest "lib/sdl3game-${MY_LIBRARY_VERSION}")
install(TARGETS sdl3game DESTINATION "lib/")

View File

@@ -2,7 +2,7 @@
#define _GAMEPAD_H_
#include <SDL3/SDL.h>
#include <sdlerror.h>
#include <akerror.h>
ErrorContext ERROR_NOIGNORE *gamepad_handle_button_down(void *appstate, SDL_Event *event);
ErrorContext ERROR_NOIGNORE *gamepad_handle_button_up(void *appstate, SDL_Event *event);

View File

@@ -1,7 +1,7 @@
#ifndef _ASSETS_H_
#define _ASSETS_H_
#include <sdlerror.h>
#include <akerror.h>
ErrorContext ERROR_NOIGNORE *load_start_bgm(char *fname);

View File

@@ -2,7 +2,7 @@
#define _CONTROLLER_H_
#include <SDL3/SDL.h>
#include <sdlerror.h>
#include <akerror.h>
#define MAX_CONTROL_MAPS 8
#define MAX_CONTROLS 32

View File

@@ -5,7 +5,7 @@
#include "actor.h"
#include "character.h"
#include "staticstring.h"
#include <sdlerror.h>
#include <akerror.h>
#define MAX_HEAP_ACTOR 64
#define MAX_HEAP_SPRITE (MAX_HEAP_ACTOR * 16)

View File

@@ -1,7 +1,7 @@
#ifndef _JSON_HELPERS_H_
#define _JSON_HELPERS_H_
#include <sdlerror.h>
#include <akerror.h>
#include "staticstring.h"
ErrorContext ERROR_NOIGNORE *get_json_object_value(json_t *obj, char *key, json_t **dest);

View File

@@ -2,7 +2,7 @@
#define _SPRITE_H_
#include <SDL3/SDL_properties.h>
#include <sdlerror.h>
#include <akerror.h>
#define SPRITE_MAX_FRAMES 16

View File

@@ -2,7 +2,7 @@
#define _STRING_H_
#include "string.h"
#include <sdlerror.h>
#include <akerror.h>
#define MAX_STRING_LENGTH 256

View File

@@ -1,7 +1,7 @@
#ifndef _UTIL_H_
#define _UTIL_H_
#include <sdlerror.h>
#include <akerror.h>
typedef struct point {
int x;

View File

@@ -1,7 +1,7 @@
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <string.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/game.h>
#include <sdl3game/sprite.h>

View File

@@ -1,7 +1,7 @@
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/game.h>
#include <sdl3game/staticstring.h>
#include <sdl3game/heap.h>

View File

@@ -1,6 +1,6 @@
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <sdlerror.h>
#include <akerror.h>
#include <string.h>
#include <jansson.h>

View File

@@ -1,5 +1,5 @@
#include <SDL3/SDL.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/heap.h>
#include <sdl3game/registry.h>
#include <sdl3game/game.h>

View File

@@ -2,7 +2,7 @@
#include <SDL3_image/SDL_image.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <stdio.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/game.h>
#include <sdl3game/controller.h>

View File

@@ -1,5 +1,5 @@
#include <stdlib.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/game.h>
#include <sdl3game/sprite.h>

View File

@@ -1,6 +1,6 @@
#include <jansson.h>
#include <string.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/json_helpers.h>
#include <sdl3game/game.h>

View File

@@ -1,5 +1,5 @@
#include <SDL3/SDL.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/sprite.h>
#include <sdl3game/registry.h>

View File

@@ -2,7 +2,7 @@
#include <SDL3_image/SDL_image.h>
#include <string.h>
#include <jansson.h>
#include <sdlerror.h>
#include <akerror.h>
#include <libgen.h>
#include <sdl3game/game.h>

View File

@@ -1,4 +1,4 @@
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/staticstring.h>
ErrorContext *string_initialize(string *obj, char *init)

View File

@@ -3,7 +3,7 @@
#include <SDL3_mixer/SDL_mixer.h>
#include <string.h>
#include <jansson.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/tilemap.h>
#include <sdl3game/actor.h>

View File

@@ -3,7 +3,7 @@
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/util.h>
#include <sdl3game/heap.h>

View File

@@ -1,7 +1,7 @@
#define UNHANDLED_ERROR_TERMINATION_BEHAVIOR \
handle_unhandled_error(errctx);
#include <sdlerror.h>
#include <akerror.h>
#define UNHANDLED_ERROR_EXIT 0
#define UNHANDLED_ERROR_SET 1

View File

@@ -1,5 +1,5 @@
#include <SDL3/SDL.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/character.h>
#include <sdl3game/actor.h>

View File

@@ -4,7 +4,7 @@
#include <SDL3_image/SDL_image.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/assets.h>
#include <sdl3game/iterator.h>
#include <sdl3game/tilemap.h>

View File

@@ -1,6 +1,6 @@
#include <SDL3/SDL.h>
#include <stdlib.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/registry.h>
typedef ErrorContext *(*RegistryFuncPtr)(void);

View File

@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/registry.h>
#include <sdl3game/sprite.h>

View File

@@ -1,5 +1,5 @@
#include <string.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/heap.h>
#include <sdl3game/staticstring.h>

View File

@@ -2,7 +2,7 @@
#include <SDL3_image/SDL_image.h>
#include <jansson.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/util.h>
#include <sdl3game/heap.h>
#include <sdl3game/registry.h>

View File

@@ -1,5 +1,5 @@
#include <SDL3/SDL.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/util.h>
ErrorContext *test_rectangle_points_nullpointers(void)

View File

@@ -5,7 +5,7 @@
#include <SDL3_image/SDL_image.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <sdlerror.h>
#include <akerror.h>
#include <sdl3game/assets.h>
#include <sdl3game/iterator.h>
#include <sdl3game/tilemap.h>