Unify the library on an akgl_ namespace

This commit is contained in:
2026-05-06 23:18:42 -04:00
parent f416cb5dee
commit 359ae23414
46 changed files with 1327 additions and 1270 deletions

View File

@@ -4,8 +4,8 @@
#include <SDL3/SDL.h>
#include <akerror.h>
#define MAX_CONTROL_MAPS 8
#define MAX_CONTROLS 32
#define AKGL_MAX_CONTROL_MAPS 8
#define AKGL_MAX_CONTROLS 32
typedef struct {
Uint32 event_on;
@@ -15,30 +15,30 @@ typedef struct {
Uint8 axis;
Uint8 axis_range_min;
Uint8 axis_range_max;
akerr_ErrorContext AKERR_NOIGNORE *(*handler_on)(actor *obj, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *(*handler_off)(actor *obj, SDL_Event *event);
} SDL3GControl;
akerr_ErrorContext AKERR_NOIGNORE *(*handler_on)(akgl_Actor *obj, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *(*handler_off)(akgl_Actor *obj, SDL_Event *event);
} akgl_Control;
typedef struct {
actor *target;
akgl_Actor *target;
int nextMap;
SDL3GControl controls[MAX_CONTROLS];
akgl_Control controls[AKGL_MAX_CONTROLS];
SDL_KeyboardID kbid;
SDL_JoystickID jsid;
SDL_MouseID mouseid;
SDL_PenID penid;
} SDL3GControlMap;
} akgl_ControlMap;
extern SDL3GControlMap GAME_ControlMaps[MAX_CONTROL_MAPS];
extern akgl_ControlMap GAME_ControlMaps[AKGL_MAX_CONTROL_MAPS];
akerr_ErrorContext AKERR_NOIGNORE *controller_handle_event(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_handle_event(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *controller_handle_button_down(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *controller_handle_button_up(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *controller_handle_added(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *controller_handle_removed(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_handle_button_down(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_handle_button_up(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_handle_added(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_handle_removed(void *appstate, SDL_Event *event);
akerr_ErrorContext AKERR_NOIGNORE *SDL3G_controller_pushmap(int controlmapid, SDL3GControl *control);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_pushmap(int controlmapid, akgl_Control *control);
akerr_ErrorContext AKERR_NOIGNORE *SDL3G_controller_default(int controlmapid, char *actorname, int kbid, int jsid);
akerr_ErrorContext AKERR_NOIGNORE *akgl_controller_default(int controlmapid, char *actorname, int kbid, int jsid);
#endif // _CONTROLLER_H_