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

#include "../system/vec.h"
#include "color.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_set_position(mgl_sprite *self, mgl_vec2f position);
void mgl_sprite_set_color(mgl_sprite *self, mgl_color color);
void mgl_sprite_draw(mgl_context *context, mgl_sprite *sprite);

#endif /* MGL_SPRITE_H */