-
Notifications
You must be signed in to change notification settings - Fork 0
/
pascal.h
103 lines (89 loc) · 2.35 KB
/
pascal.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#define MAXEXIT 6
#define MAXTIMEDEVENTS 20
#define MAXHOLD 7
typedef struct string STRING;
struct string {
unsigned char low;
unsigned char high;
char string[80];
};
typedef struct {
unsigned char low, high;
char string[12];
} VERYSHORTSTRING;
typedef struct {
unsigned char low, high;
char string[20];
} SHORTSTRING;
typedef struct {
VERYSHORTSTRING realid, userid;
char privd, sysmaint, loggedact, ingame;
int lasthit;
STRING lasthitstring;
int location;
STRING name;
int maxrooms, maxobj, class, group, monstertype, slot, log;
int experience, mana, health;
char poisoned;
int movespeed, attackspeed, size, weaponuse, poisonchance;
int movesilent, steal, wealth, bank, kills, death, healspeed;
int control, lasthittime;
char done;
int universe, eventnum, alleventnum;
char brief, highlight, printed;
int alignment, memory, hidedelay, shadowdamagepercent;
} stattype;
typedef struct {
int holding[MAXHOLD], slot[MAXHOLD], charges[MAXHOLD], condition[MAXHOLD];
STRING weapon;
int basearmor, deflectarmor, spellarmor, spelldeflectarmor;
int basedamage, randomdamage, breakchanceleft, breakchanceright;
int breakmagnitudeleft, breakmagnituderight, maxmana, maxhealth;
} holdobj;
typedef struct {
int tkinvisible;
char invisible;
int tksee;
char seeinvisible;
int tkstrength, strength, tkspeed, mvspeed;
int attspeed, tkhealth, health, tkmana, mana;
int tkevent, tkallevent, tkrandmove, tkrandact, tkrandomevent;
} tktimetype;
typedef struct {
char notext;
int opcheckcomm;
char frozen, pinganswered;
} opstuff;
typedef struct {
STRING line[10];
int point, last;
} commandtype;
typedef struct {
int send, sendlog, action, targ, targlog, param[2];
STRING msg;
int loc;
SHORTSTRING emsg;
int eparam[5];
} anevent;
typedef char foundexittype[MAXEXIT];
typedef anevent timedeventtype[MAXTIMEDEVENTS];
typedef struct {
foundexittype foundexits, killedguardian;
char exithandled;
int blocking;
} exitstuff;
typedef struct {
char room;
} memorytype;
typedef struct {
stattype stats;
holdobj myhold;
tktimetype tick;
opstuff op;
exitstuff exit;
timedeventtype timedevents;
commandtype commands;
memorytype inmem;
} AllStats;
#define term_string(_string) _string->string[_string->low + _string->high*256] = 0;
#define set_length(_str, _len) _str->low = _len % 256; _str->high = _len >> 8;