aboutsummaryrefslogtreecommitdiff
path: root/fns.h
blob: 565b52cc759e1128ce9248ec07c93d4fa28985d8 (plain)
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
#define HZ2MS(hz)	(1000/(hz))

/*
 * alloc
 */
void *emalloc(ulong);
void *erealloc(void*, ulong);
//Image *eallocimage(Display*, Rectangle, ulong, int, ulong);

/*
 * physics
 */
void integrate(Universe*, double, double);

/*
 * nanosec
 */
uvlong nanosec(void);

/*
 * pack
 */
int pack(uchar*, int, char*, ...);
int unpack(uchar*, int, char*, ...);

/*
 * lobby
 */
Lobby *newlobby(void);
void dellobby(Lobby*);

/*
 * party
 */
void inittheparty(void);
Party *newparty(Player[2]);
void delparty(Party*);
void addparty(Party*);

/*
 * universe
 */
Universe *newuniverse(void);
void deluniverse(Universe*);
void inituniverse(Universe*);

/*
 *	sprite
 */
Sprite *newsprite(Image*, Point, Rectangle, int, ulong);
Sprite *readsprite(char*, Point, Rectangle, int, ulong);
void delsprite(Sprite*);