From bf76b6729b3f361b9aac549fbaa1fa2fecb85fa4 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 26 Mar 2021 12:13:30 -0400 Subject: map: Add framerate accessor --- diff --git a/src/map.c b/src/map.c index 0d57a09..0beb2d5 100644 --- a/src/map.c +++ b/src/map.c @@ -939,6 +939,12 @@ db_map_render(struct db_map *map, SDL_Renderer *renderer) return texture; } +int +db_map_get_framerate(struct db_map *map) +{ + return map->fr; +} + struct db_tileset * db_map_get_tilesets(struct db_map *map) { diff --git a/src/map.h b/src/map.h index 6eb9d16..bfd544d 100644 --- a/src/map.h +++ b/src/map.h @@ -27,6 +27,7 @@ struct db_map; struct db_map *db_map_new(const char *game_id, const char *level_id); SDL_Texture *db_map_render(struct db_map *map, SDL_Renderer *renderer); +int db_map_get_framerate(struct db_map *map) __attribute__((__pure__)); struct db_tileset *db_map_get_tilesets(struct db_map *map) __attribute__((__pure__)); void db_map_get_player(struct db_map *map, int *x, int *y, int *r, int *gid); -- cgit v0.9.1