-
Notifications
You must be signed in to change notification settings - Fork 4
/
aws.h
executable file
·118 lines (102 loc) · 2.26 KB
/
aws.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#ifndef _AWS_H_
#define _AWS_H_
#include <stdio.h>
typedef unsigned char boolean;
#define true 1
#define false 0
typedef unsigned char word_type;
#define ADVERB 0
#define VERB 1
#define NAME 2
#define SEPARATOR 3
#define ACTOR 4
#define ADJECTIVE 5
typedef struct info_d {
char *version;
unsigned int textcolor;
unsigned int backcolor;
unsigned int textcolordark;
unsigned int backcolordark;
char *name;
char *author;
char *date;
char *description;
unsigned int code;
char *fontname;
unsigned int charsize;
unsigned int fontstyle;
unsigned int startroom;
boolean graphical;
unsigned int maxcarryingw;
unsigned int maxcarryings;
} info;
typedef struct word_d {
#ifdef DICTHASH
char c1,c2,c3;
#else
char *w;
#endif
unsigned int code;
word_type t;
} word;
#ifndef BYTEROOMCODE
typedef unsigned int room_code;
#else
typedef unsigned char room_code;
#endif
typedef struct room_d {
room_code code;
const char *long_d;
#ifndef AVOID_SDESC
const char *s;
#endif
const char *short_d;
#ifndef DIR_REDUCED
#define NDIR 10
// north, sud, east, west, up, down, north east, north west, south east,
// south west
room_code directions[NDIR];
#else
#define NDIR 6
// north, sud, east, west, up, down
room_code directions[NDIR];
#endif
} room;
typedef struct message_d {
unsigned int code;
char *txt;
} message;
#ifndef BYTEOBJCODE
typedef unsigned int obj_code;
#else
typedef unsigned char obj_code;
#endif
#define ISNOTMOVABLE 1
#define ISWEREABLE 2
typedef struct object_d {
obj_code code;
#ifndef NOLONGDESC
char *s;
#endif
const char *desc;
#ifndef NOSIZEWEIGHT // Don't consider size and weight.
unsigned int weight;
unsigned int size;
#endif
unsigned int position; // Always int, as carried =1500, worn=1600
unsigned char attributes;
} object;
typedef struct tree_d {
unsigned char c;
unsigned char son0idx;
unsigned char son1idx;
} tree;
void restart(void);
#ifdef ATARI_ST
#define NEWLINE "\r\n"
#define NEWLINE_PUTC() PUTC('\r'); PUTC('\n');
#else
#define NEWLINE "\n"
#define NEWLINE_PUTC() PUTC('\n');
#endif
#endif