-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSprite.h
45 lines (34 loc) · 788 Bytes
/
Sprite.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
/**********************************************
* *
* AGE v 0.4 *
* Amiga Game Engine *
* Copyright 2011-2018 *
* by Pedro Gil Guirado - Balrog Soft *
* www.amigaskool.net *
* *
**********************************************/
#ifndef _SPRITE_H
#define _SPRITE_H
#include <proto/graphics.h>
#include <graphics/sprite.h>
#include "Bitmap.h"
typedef struct {
Bitmap* bm;
Bitmap* rest_bm;
int px[2];
int py[2];
BOOL restore[2];
int width;
int height;
int depth;
int sheight;
int frameOffset;
int frame;
int x;
int y;
} Sprite;
Sprite* sp_load(char* file);
Sprite* sp_loadSheet(char* file, int spriteHeight);
void sp_setFrame(Sprite* spr, int frame);
void sp_dealloc(Sprite* spr);
#endif