You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
686 B
32 lines
686 B
#ifndef TEXTURE_HANDLER_INCLUDED
|
|
#define TEXTURE_HANDLER_INCLUDED
|
|
|
|
#include <SDL2/SDL.h>
|
|
#include <stdio.h>
|
|
#include "engine/TextureLoader.h"
|
|
|
|
#define MACRO_FOR_ALL_TEXTURES(M) \
|
|
M(Island) \
|
|
M(Bridge) \
|
|
M(Piece) \
|
|
M(Water)
|
|
|
|
#define MACRO_IDENTITY_COMMA(E) TEXTURE_##E,
|
|
|
|
typedef enum
|
|
{
|
|
MACRO_FOR_ALL_TEXTURES(MACRO_IDENTITY_COMMA)
|
|
NB_TEXTURES_DEFINED
|
|
} EnumTextures;
|
|
|
|
|
|
typedef struct
|
|
{
|
|
SDL_Texture* textures[NB_TEXTURES_DEFINED];
|
|
} TextureHandler;
|
|
|
|
TextureHandler newTextureHandler(SDL_Renderer* renderer);
|
|
|
|
void freeTextureHandler(TextureHandler* textureHandler);
|
|
|
|
#endif // TEXTURE_HANDLER_INCLUDED
|