Fix missing sdl3game.pc for pkg-config, change sprite speed and character movement values to long int expressed in nanoseconds for better compatibility with SDL_Time and locking against game clock, still expressed as milliseconds in json

This commit is contained in:
2026-05-05 20:39:58 -04:00
parent 90cbf41d75
commit 284ffd7b4a
9 changed files with 24 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
#ifndef _SDL_GAMECONTROLLERDB_H_
#define _SDL_GAMECONTROLLERDB_H_
// Taken from https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt on Sun May 3 11:38:30 PM EDT 2026
// Taken from https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt on Tue May 5 08:39:19 PM EDT 2026
#define SDL_GAMECONTROLLER_DB_LEN 2225

View File

@@ -68,7 +68,7 @@ typedef struct actor {
bool movement_controls_face;
void *actorData;
bool visible;
int logictimer;
SDL_Time logictimer;
float x;
float y;
struct actor *children[ACTOR_MAX_CHILDREN];

View File

@@ -13,7 +13,7 @@ typedef struct character {
SDL_PropertiesID state_sprites;
akerr_ErrorContext AKERR_NOIGNORE *(*sprite_add)(struct character *, sprite *, int);
akerr_ErrorContext AKERR_NOIGNORE *(*sprite_get)(struct character *, int, sprite **);
int movementspeed;
long int movementspeed;
float vx;
float vy;
} character;

View File

@@ -29,7 +29,7 @@ typedef struct {
int frames; // how many frames are in this animation
int width;
int height;
int speed; // how many milliseconds a given sprite frame should be visible before cycling
long int speed; // how many milliseconds a given sprite frame should be visible before cycling
bool loop; // when this sprite is done playing, it should immediately start again
bool loopReverse; // when this sprite is done playing, it should go in reverse order through its frames
char name[SPRITE_MAX_NAME_LENGTH];