diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-26 12:13:30 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-26 12:13:30 (EDT) |
commit | bf76b6729b3f361b9aac549fbaa1fa2fecb85fa4 (patch) | |
tree | 38033f0f14f71002dcf71171d02153a82179d20c | |
parent | 604f1fa4f9f2ebfbfc1e8175a914073c0fa974b7 (diff) | |
download | dodge-balls-bf76b6729b3f361b9aac549fbaa1fa2fecb85fa4.zip dodge-balls-bf76b6729b3f361b9aac549fbaa1fa2fecb85fa4.tar.gz dodge-balls-bf76b6729b3f361b9aac549fbaa1fa2fecb85fa4.tar.bz2 |
map: Add framerate accessor
-rw-r--r-- | src/map.c | 6 | ||||
-rw-r--r-- | src/map.h | 1 |
2 files changed, 7 insertions, 0 deletions
@@ -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) { @@ -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); |