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
57
58
59
60
61
62
63
64
65
|
#define HZ2MS(hz) (1000/(hz))
/*
* alloc
*/
void *emalloc(ulong);
void *erealloc(void*, ulong);
char *estrdup(char*);
Image *eallocimage(Display*, Rectangle, ulong, int, ulong);
/*
* util
*/
int isoob(Point2);
int cell2coords(char*, ulong, Point2);
Point2 coords2cell(char*);
int gettile(Map*, Point2);
void settile(Map*, Point2, int);
void settiles(Map*, Point2, int, int, int);
void fprintmap(int, Map*);
int countshipcells(Map*);
int shiplen(int);
char *shipname(int);
char *statename(int);
int min(int, int);
int max(int, int);
int bitpackmap(uchar*, ulong, Map*);
int bitunpackmap(Map*, uchar*, ulong);
int chanvprint(Channel*, char*, va_list);
ulong getrand(ulong);
/*
* menulist
*/
Menulist *newmenulist(int, char*);
void delmenulist(Menulist*);
/*
* sprite
*/
Sprite *newsprite(Image*, Point, Rectangle, int, ulong);
Sprite *readsprite(char*, Point, Rectangle, int, ulong);
Image *readpngimage(char*);
Sprite *readpngsprite(char*, Point, Rectangle, int, ulong);
void delsprite(Sprite*);
/*
* vfx
*/
Vfx *newvfx(Sprite*, Point, int);
void delvfx(Vfx*);
void addvfx(Vfx*, Vfx*);
void initvfxq(Vfx*);
/*
* parse
*/
Cmdbuf *parsecmd(char*, int);
Cmdtab *lookupcmd(Cmdbuf*, Cmdtab*, int);
/*
* andy
*/
Andy *newandy(Player*);
void freeandy(Andy*);
|