aboutsummaryrefslogtreecommitdiff
path: root/include/mgl/graphics/sprite.h
blob: 045da19a257bac0ada14be2f6328355bd27a25de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef MGL_SPRITE_H
#define MGL_SPRITE_H

#include "color.h"
#include "vec.h"

typedef struct mgl_context mgl_context;
typedef struct mgl_texture mgl_texture;

typedef struct {
    mgl_texture *texture;
    mgl_color color;
    mgl_vec2f position;
    mgl_vec2f scale;
} mgl_sprite;

void mgl_sprite_init(mgl_sprite *self, mgl_texture *texture, float x, float y);
void mgl_sprite_draw(mgl_context *context, mgl_sprite *sprite);
void mgl_sprite_set_color(mgl_sprite *self, float r, float g, float b, float a);

#endif /* MGL_SPRITE_H */