Unify the library on an akgl_ namespace
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
#ifndef _CHARACTER_H_
|
||||
#define _CHARACTER_H_
|
||||
#ifndef _AKGL_CHARACTER_H_
|
||||
#define _AKGL_CHARACTER_H_
|
||||
|
||||
#include <SDL3/SDL_properties.h>
|
||||
#include "sprite.h"
|
||||
|
||||
#define SPRITE_MAX_CHARACTER_NAME_LENGTH 128
|
||||
#define MAX_HEAP_CHARACTER 256
|
||||
#define AKGL_SPRITE_MAX_CHARACTER_NAME_LENGTH 128
|
||||
#define AKGL_MAX_HEAP_CHARACTER 256
|
||||
|
||||
typedef struct character {
|
||||
typedef struct akgl_Character {
|
||||
int refcount;
|
||||
char name[SPRITE_MAX_CHARACTER_NAME_LENGTH];
|
||||
char name[AKGL_SPRITE_MAX_CHARACTER_NAME_LENGTH];
|
||||
SDL_PropertiesID state_sprites;
|
||||
akerr_ErrorContext AKERR_NOIGNORE *(*sprite_add)(struct character *, sprite *, int);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *(*sprite_get)(struct character *, int, sprite **);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *(*sprite_add)(struct akgl_Character *, akgl_Sprite *, int);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *(*sprite_get)(struct akgl_Character *, int, akgl_Sprite **);
|
||||
long int movementspeed;
|
||||
float vx;
|
||||
float vy;
|
||||
} character;
|
||||
} akgl_Character;
|
||||
|
||||
|
||||
akerr_ErrorContext AKERR_NOIGNORE *character_initialize(character *basechar, char *name);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *character_sprite_add(character *basechar, sprite *ref, int state);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *character_sprite_get(character *basechar, int state, sprite **dest);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_character_initialize(akgl_Character *basechar, char *name);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_character_sprite_add(akgl_Character *basechar, akgl_Sprite *ref, int state);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_character_sprite_get(akgl_Character *basechar, int state, akgl_Sprite **dest);
|
||||
|
||||
// This is an SDL iterator so we can't return our error state from it.
|
||||
void character_state_sprites_iterate(void *userdata, SDL_PropertiesID props, const char *name);
|
||||
void akgl_character_state_sprites_iterate(void *userdata, SDL_PropertiesID props, const char *name);
|
||||
|
||||
akerr_ErrorContext AKERR_NOIGNORE *character_load_json(char *filename);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_character_load_json(char *filename);
|
||||
|
||||
#endif // _CHARACTER_H_
|
||||
#endif // _AKGL_CHARACTER_H_
|
||||
|
||||
Reference in New Issue
Block a user