-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdungeon_obj.h
241 lines (227 loc) · 5.89 KB
/
dungeon_obj.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
/* =============================================================================
* PROGRAM: ularn
* FILENAME: dungeon_obj.h
*
* DESCRIPTION:
* This module contains functions for handling the effects of static objects
* in the dungeon.
* (ie. Objects that cannot be picked up such as stairs, fountains etc.)
*
* =============================================================================
* EXPORTED VARIABLES
*
* None
*
* =============================================================================
* EXPORTED FUNCTIONS
*
* oopendoor - processes the player opening a closed door
* oaltar - processes player stepping onto an alter
* othrone - processes player stepping onto a throne
* odeadthrone - processes player stepping onto a dead throne
* ofountain - processes player stepping onto a fountain
* ostairs - processes player stepping onto the stairs (up or down)
* oteleport - processes player stepping onto a teleport trap, and all other
* reasons for teleporting the player
* opit - processes player stepping onto a pit
* oelevator - processes player stepping onto an elevator
* ostatue - processes player stepping onto a statue
* omirror - processes player stepping onto a mirror
*
* =============================================================================
*/
#ifndef __DUNGEON_OBJ_H
# define __DUNGEON_OBJ_H
# define ALTAR_PRO_BOOST 3
/* =============================================================================
* FUNCTION: oopendoor
*
* DESCRIPTION:
* Process the player opening the door at the specified location.
*
* PARAMETERS:
*
* x : The x coordinate of the door to open
*
* y : The y coordinate of the door to open
*
* RETURN VALUE:
*
* None.
*/
void oopendoor(int x, int y);
/* =============================================================================
* FUNCTION: oalter
*
* DESCRIPTION:
* Asks if player wants to pray, desecrate or ignore an alter and
* performs effects based on the selection.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* None.
*/
void oaltar(void);
/* =============================================================================
* FUNCTION: othrone
*
* DESCRIPTION:
* Asks if the player wants to pry jewels, sit on or ignore a throne and
* performs effects based on the selection.
* If a jewel is successfully pried from the throne then the throne is
* changed to a dead throne.
* If the gnome king is summoned to defend his throne from vandals or usurpers
* then the throne is transformed to an OTHRONE2 to indicate that the king
* of this throne has been summoned.
*
* PARAMETERS:
*
* arg : This flag indicates if a gnome king has already been summoned for
* the throne.
* arg == 0 => king not summoned
* arg == 1 => king has already been summoned.
*
* RETURN VALUE:
*
* None.
*/
void othrone(int arg);
/* =============================================================================
* FUNCTION: odeadthrone
*
* DESCRIPTION:
* Asks if the player wants to sit on or ignore a dead throne (already had a
* jewel removed) and performs effects based on the selection.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* None.
*/
void odeadthrone(void);
/* =============================================================================
* FUNCTION: ofountain
*
* DESCRIPTION:
* Asks if the player wants to drink, wash or ignore the fountain and performs
* effects based on the selection.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* None.
*/
void ofountain(void);
/* =============================================================================
* FUNCTION: ostairs
*
* DESCRIPTION:
* This functions process the stair cases.
* Asks if the player wants to stay here, or go up or down as appropriate.
* If the player changes dungeon level then the level change is processed.
*
* PARAMETERS:
*
* dir : Indicates the direction the staircase leads.
* dir > 0 => up
* dir < 0 => down
*
* RETURN VALUE:
*
* None.
*/
void ostairs(int dir);
/* =============================================================================
* FUNCTION: oteleport
*
* DESCRIPTION:
* Handles teleporting the player for teleport traps, scrolls and innate
* teleport capability.
*
* PARAMETERS:
*
* err : Indicates if the teleport may land the player in an untenable
* position.
* err == 0 => teleport without error (always safe)
* err != 0 => teleport may level player stuck in rock.
*
* RETURN VALUE:
*
* None.
*/
void oteleport(int err);
/* =============================================================================
* FUNCTION: opit
*
* DESCRIPTION:
* Handles the processing of a player stepping onto a pit.
* If the player changes dunction level the the level change is processed.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* None.
*/
void opit(void);
/* =============================================================================
* FUNCTION: oelevator
*
* DESCRIPTION:
* Performs the processing for a player stepping onto an elevator.
* If the player changes dungron level the the level change is processed.
*
* PARAMETERS:
*
* dir : The direction of the elevator.
* dir == 1 => up
* dir != 1 => down
*
* RETURN VALUE:
*
* None.
*/
void oelevator(int dir);
/* =============================================================================
* FUNCTION: ostatue
*
* DESCRIPTION:
* Performs the processing for when a player steps onto a statue.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* None.
*/
void ostatue(void);
/* =============================================================================
* FUNCTION: omirror
*
* DESCRIPTION:
* Performs the processing for when a player steps onto a mirror.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* None.
*/
void omirror(void);
#endif