timesynk/engine/sdl/spritesheets.h

24 lines
702 B
C

#ifndef SPRITESHEETS_H
#define SPRITESHEETS_H
struct Spritesheet {
unsigned int texture;
int width;
int height;
int s_width;
int s_height;
int columns;
float scale_x;
float scale_y;
SDL_Surface *surface;
SDL_Surface *s_surface;
};
struct Spritesheet *newSpritesheet();
int loadSpritesheetFromFile(struct Spritesheet *spritesheet, char *file_name, int width, int height, int columns);
int loadSpritesheetFromMemory(struct Spritesheet *spritesheet, unsigned char *memory, unsigned int length, int width, int height, int columns);
void freeSpritesheet(struct Spritesheet *spritesheet);
void setSpritesheetScale(struct Spritesheet *spritesheet, float scale_x, float scale_y);
#endif