textures.c: remove by one offsetiing, use macro for validity checking
This commit is contained in:
@@ -11,10 +11,7 @@
|
||||
typedef struct { int id; } t_texture_key;
|
||||
|
||||
/* tests whether given key structure corresponds to any texture */
|
||||
#define m_texture_key_is_valid(p_key) ((p_key).id != 0)
|
||||
|
||||
/* tests whether given key corresponds to atlas texture or a loner */
|
||||
#define m_texture_is_atlas(p_key) ((p_key).id > 0)
|
||||
#define m_texture_key_is_valid(p_key) ((p_key).id != -1)
|
||||
|
||||
void textures_cache_init(struct texture_cache *cache, SDL_Window *window);
|
||||
void textures_cache_deinit(struct texture_cache *cache);
|
||||
|
Reference in New Issue
Block a user