comparison pped/intfdesc.h @ 2:2719a89505ba

First entry of Paradise Server 2.9 patch 10 Beta
author darius
date Sat, 06 Dec 1997 04:37:01 +0000
parents
children
comparison
equal deleted inserted replaced
1:4d6502ffaa5e 2:2719a89505ba
1 /*
2 * interface.h
3 */
4
5
6 enum desc_type {
7 DT_INT, /* plain int */
8 DT_FLOAT, /* plain float */
9 DT_CHAR16, /* name/passwd */
10 DT_TICKS, /* (int) seconds/10 */
11 DT_RANK, /* (int) rank */
12 DT_ROYAL /* (int) royalty */
13 };
14
15 struct inter_desc {
16 int num;
17 char *name;
18 enum desc_type type;
19 int offset;
20 };
21
22 #define OFFSET(field) ((char *)(&((struct statentry*)0)->field) - (char *)0)
23
24 struct inter_desc idesc_tab[] = {
25 { 0, "Name", DT_CHAR16, OFFSET(name[0]) },
26 { 1, "Password", DT_CHAR16, OFFSET(password[0]) },
27 { 2, "Rank", DT_RANK, OFFSET(stats.st_rank) },
28 { 3, "Royalty", DT_ROYAL, OFFSET(stats.st_royal) },
29 { 4, "Genocides", DT_INT, OFFSET(stats.st_genocides) },
30 { 5, "Max kills", DT_FLOAT, OFFSET(stats.st_tmaxkills) },
31 { 6, "DI", DT_FLOAT, OFFSET(stats.st_di) },
32 { 7, "Kills", DT_INT, OFFSET(stats.st_tkills) },
33 { 8, "Losses", DT_INT, OFFSET(stats.st_tlosses) },
34 { 9, "Armies bombed", DT_INT, OFFSET(stats.st_tarmsbomb) },
35 { 10, "Resources bombed", DT_INT, OFFSET(stats.st_tresbomb) },
36 { 11, "Dooshes", DT_INT, OFFSET(stats.st_tdooshes) },
37 { 12, "Ticks", DT_TICKS, OFFSET(stats.st_tticks) },
38 { 13, "SB kills", DT_INT, OFFSET(stats.st_sbkills) },
39 { 14, "SB losses", DT_INT, OFFSET(stats.st_sblosses) },
40 { 15, "SB ticks", DT_TICKS, OFFSET(stats.st_sbticks) },
41 { 16, "SB maxkills", DT_FLOAT, OFFSET(stats.st_sbmaxkills) },
42 { 17, "WB kills", DT_INT, OFFSET(stats.st_wbkills) },
43 { 18, "WB losses", DT_INT, OFFSET(stats.st_wblosses) },
44 { 19, "WB ticks", DT_TICKS, OFFSET(stats.st_wbticks) },
45 { 20, "WB maxkills", DT_FLOAT, OFFSET(stats.st_wbmaxkills) },
46 { 21, "JS planets", DT_INT, OFFSET(stats.st_jsplanets) },
47 { 22, "JS ticks", DT_TICKS, OFFSET(stats.st_jsticks) },
48 };
49
50 #define NUMDESC 23
51