Commit | Line | Data |
---|---|---|
520d5775 EA |
1 | # include "trek.h" |
2 | ||
3 | /* | |
4 | ** RETRIEVE THE STARSYSTEM NAME | |
5 | ** | |
6 | ** Very straightforward, this routine just gets the starsystem | |
7 | ** name. It returns zero if none in the specified quadrant | |
8 | ** (which, by the way, is passed it). | |
9 | ** | |
10 | ** This routine knows all about such things as distressed | |
11 | ** starsystems, etc. | |
12 | */ | |
13 | ||
14 | char *systemname(q1) | |
15 | struct quad *q1; | |
16 | { | |
17 | register struct quad *q; | |
18 | register int i; | |
19 | ||
20 | q = q1; | |
21 | ||
22 | i = q->systemname; | |
23 | if (i & Q_DISTRESSED) | |
24 | i = Event[i & Q_SYSTEM].systemname; | |
25 | ||
26 | i =& Q_SYSTEM; | |
27 | if (i == 0) | |
28 | return (0); | |
29 | return (Systemname[i]); | |
30 | } |