aboutsummaryrefslogtreecommitdiff
path: root/include/mgl/graphics/sprite.h
blob: ea40b21f404c06df420618f030630292325afebe (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 "../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_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 */