28 lines
536 B
C
28 lines
536 B
C
#ifndef SPRITE_H
|
|
#define SPRITE_H
|
|
#include <SDL2/SDL.h>
|
|
#include <SDL2/SDL_image.h>
|
|
#include "opengl.h"
|
|
#include <SDL2/SDL_opengl.h>
|
|
|
|
struct SpriteManager {
|
|
// Table *sprite_names;
|
|
struct Sprite **sprites; // array of sprite pointers?
|
|
};
|
|
|
|
struct Sprite {
|
|
int width;
|
|
int height;
|
|
GLuint texture;
|
|
};
|
|
|
|
struct Sprite *createSpriteFromFile(char *name, char *file);
|
|
|
|
// TODO: move this
|
|
int renderSprite(struct Sprite *sprite, int x, int y);
|
|
int freeSprite(struct Sprite *sprite);
|
|
|
|
GLuint createTexture(SDL_Surface *surface);
|
|
|
|
#endif
|