kettek2/wiki/games/newsboy/Newsboy_0x00/engine/sprite.h

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