MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
mgdl-sprite.h
1#pragma once
2
3#include "mgdl-font.h"
4
5// This class is almost the same as the font class, but supports
6// combining sprites and doing animations on them
7
8struct Sprite
9{
10 Font* _font;
11};
12typedef struct Sprite Sprite;
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18 Sprite* Sprite_Load(Font* font);
19
20 short Sprite_GetWidth(Sprite* sprite);
21 short Sprite_GetHeight(Sprite* sprite);
22
23 void Sprite_Draw2D(Sprite* sprite, u16 spriteIndex, short x, short y, float scale, AlignmentModes alignX, AlignmentModes alignY, Color4f* tintColor);
24
25 void Sprite_Draw3D(Sprite* sprite, u16 spriteIndex, float scale, AlignmentModes alignX, AlignmentModes alignY, Color4f* tintColor);
26
27 V3f Sprite_AdjustDrawingPosition(Sprite* sprite, short x, short y, float scale, AlignmentModes alignX, AlignmentModes alignY);
28
29 // TODO u16 CreateAnimation(u16 start, u16 stop, float frameTime);
30 // TODO PlayAnimation(u16 index);
31 // TODO ResetAnimation(u16 index);
32 // TODO u16 CreateMegaSprite
33 // TODO DrawMegaSprite(u16 megaIndex)
34
35#ifdef __cplusplus
36}
37#endif
Class for loading fonts and drawing text with them.
AlignmentModes
Alignment modes.
Definition mgdl-types.h:112
Definition mgdl-color.h:54
Represents a font that can be used to draw text.
Definition mgdl-font.h:16
Definition mgdl-sprite.h:9