-
Notifications
You must be signed in to change notification settings - Fork 4
/
faction.h
63 lines (54 loc) · 1.61 KB
/
faction.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
57
58
59
60
61
62
63
/*
* Atlantis v1.0 13 September 1993
* Copyright 1993 by Russell Wallace
*
* This program may be freely used, modified and distributed. It may not be
* sold or used commercially without prior written permission from the author.
*/
#ifndef ATL_FACTION_H
#define ATL_FACTION_H
#include "settings.h"
#include "spells.h"
#include "bool.h"
struct quicklist;
struct battle;
typedef union {
struct quicklist *factions; // a set
int *fnos;
} rfaction;
typedef struct faction {
int no, origin_x, origin_y;
char * name_;
char * addr_;
char * pwhash_;
int lastorders;
bool seendata[MAXSPELLS];
bool showdata[MAXSPELLS];
struct quicklist *accept;
struct quicklist *admit;
rfaction allies;
struct quicklist *mistakes;
struct quicklist *messages;
struct quicklist *battles;
struct quicklist *events;
bool alive;
bool attacking;
struct battle *thisbattle;
char dh;
int nunits;
int number;
int money;
} faction;
extern struct quicklist *factions;
struct faction * create_faction(int no);
void free_faction(struct faction *f);
struct faction * findfaction(int no);
void faction_setname(struct faction *f, const char * name);
const char * faction_getname(const struct faction *f);
void faction_setaddr(struct faction *f, const char * addr);
const char * faction_getaddr(const struct faction *f);
void faction_setpassword(struct faction *f, const char * password);
bool faction_checkpassword(struct faction *f, const char * password);
void faction_setpwhash(struct faction *f, const char * pwhash);
const char * faction_getpwhash(const struct faction *f);
#endif