-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnge.h
56 lines (40 loc) · 1.14 KB
/
snge.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef SNGE_H
#define SNGE_H
#include "graphics.h"
#include "sprites.h"
typedef enum {GAUGE_NONE, GAUGE_LR, GAUGE_RL, GAUGE_UD, GAUGE_DU} GaugeType;
typedef int SpriteId;
typedef struct
{
SpriteClassId sclass;
float x;
float y;
float sx;
float sy;
float angle;
float frame;
int layer;
float opacity;
char hflip;
char vflip;
float animdir;
bool destroy; /* destroy on spriteCleanup */
bool aended;
bool relative; /* position relative to screen */
char text[256];
float gaugeFill;
GaugeType gaugeType;
} Sprite;
void snge_Init();
Sprite *snge_AddSprite(SpriteClassId sprclass, Point pos, int layer);
Sprite *snge_AddFontSprite(SpriteClassId fontclass, Point pos, int layer, char *string);
Sprite *snge_AddGaugeSprite(SpriteClassId sprclass, Point pos, int layer, GaugeType gaugeType);
void snge_FreeSprites();
void snge_UpdateAnim(float lag);
void snge_Draw();
IntPoint snge_GetTextSize(Sprite *psprite);
void snge_MoveViewport(Point newpos);
void snge_RelativizeSprite(Sprite *sprite);
void snge_CleanupSprites();
void snge_SwitchAnim(Sprite *pSprite, SpriteClassId scid);
#endif