summaryrefslogtreecommitdiff
path: root/games/ularn/patches/patch-ae
blob: 824aa89efec44c31a0b7566d213a007ae4eaadde (plain)
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
$NetBSD: patch-ae,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $

--- data.c.orig	Fri Jun 19 13:55:29 1992
+++ data.c	Sun Jan 14 13:42:03 2001
@@ -114,27 +114,27 @@
 char logname[LOGNAMESIZE];	/* players name storage for scoring	*/
 char char_class[20];		/* character class */
 
-short hitp[MAXX][MAXY];		/*	monster hp on level	*/
-short iarg[MAXX][MAXY];		/*	arg for the item array	*/
-short lastnum=0;		/* the number of the monster last hitting player, or */
-						/* reason why dead */
+int hitp[MAXX][MAXY];		/*	monster hp on level	*/
+int iarg[MAXX][MAXY];		/*	arg for the item array	*/
+int lastnum=0;			/* number of monster last hitting player, or */
+				/* reason why dead */
 
-char compress
+int compress
 #ifdef DEF_COMPRESS
 	= 1;
 #else
 	= 0;
 #endif
-char item[MAXX][MAXY];		/*	objects in maze if any	*/
-char know[MAXX][MAXY];		/*	1 or 0 if here before	*/
-/*char mitem[MAXX][MAXY];		/*	monster item array 	*/
-char moved[MAXX][MAXY];		/*	monster movement flags  */
-char stealth[MAXX][MAXY];	/*  0=sleeping 1=awake monst    */
-char iven[IVENSIZE];		/*	inventory for player	*/
+int item[MAXX][MAXY];		/*	objects in maze if any	*/
+int know[MAXX][MAXY];		/*	1 or 0 if here before	*/
+/*char mitem[MAXX][MAXY];		*//*	monster item array 	*/
+int moved[MAXX][MAXY];		/*	monster movement flags  */
+int stealth[MAXX][MAXY];	/*  0=sleeping 1=awake monst    */
+int iven[IVENSIZE];		/*	inventory for player	*/
 short ivenarg[IVENSIZE];	/*	inventory args for player	*/
-char beenhere[NLEVELS]={0};	/*  1 if have been on this level */
-char nosignal=0;	/* set to 1 to disable the signals from doing anything*/
-char predostuff=0;	/*  
+int beenhere[NLEVELS]={0};	/*  1 if have been on this level */
+int nosignal=0;	/* set to 1 to disable the signals from doing anything*/
+int predostuff=0;	/*  
 			** 2 means that the trap handling routines must do a
 			** showplayer() after a trap.  0 means don't showplayer()
 			**		0 - we are in create player screen
@@ -142,27 +142,29 @@
 			**		2 - we are in the normal game	
 			*/
 
-char ramboflag=0;
-char do_fork=0;
-char sex=1;		/* default is man, 0=woman	*/
-char boldon=1;		/* 1=bold objects,  0=inverse objects	*/
-char mail=1;		/* 1=mail letters after win game */
-char ckpflag=0;		/* 1 if want checkpointing of game, 0 otherwise	*/
-char cheat=0;		/* 1 if the player has fudged save file	*/
-char level=0;		/* cavelevel player is on = c[CAVELEVEL]*/
-char wizard=0;		/* the wizard mode flag	*/
-char hitflag=0;		/* flag for if player has been hit when running */
-char hit2flag=0;	/* flag for if player has been hit when running */
-char hit3flag=0;	/* flag for if player has been hit flush input*/
-char playerx,playery;	/* the room on the present level of the player*/
-char lastpx,lastpy;	/* 0 --- MAXX-1  or  0 --- MAXY-1		*/
-char oldx,oldy;
-char lasthx=0,lasthy=0;/* location of monster last hit by player*/
-char nobeep=0;		/* true if program is not to beep*/
-char char_picked;	/* the character chosen */
-
-char enable_scroll=0;	/* constant for enabled/disabled scrolling regn */
-
+int ramboflag=0;
+int do_fork=0;
+int sex=1;		/* default is man, 0=woman	*/
+int boldon=1;		/* 1=bold objects,  0=inverse objects	*/
+int mail=1;		/* 1=mail letters after win game */
+int ckpflag=0;		/* 1 if want checkpointing of game, 0 otherwise	*/
+int cheat=0;		/* 1 if the player has fudged save file	*/
+int level=0;		/* cavelevel player is on = c[CAVELEVEL]*/
+int wizard=0;		/* the wizard mode flag	*/
+int hitflag=0;		/* flag for if player has been hit when running */
+int hit2flag=0;	/* flag for if player has been hit when running */
+int hit3flag=0;	/* flag for if player has been hit flush input*/
+int playerx,playery;	/* the room on the present level of the player*/
+int oldx,oldy;
+int nobeep=0;		/* true if program is not to beep*/
+int char_picked;	/* the character chosen */
+
+int enable_scroll=0;	/* constant for enabled/disabled scrolling regn */
+
+int lastpx;	/* 0 --- MAXX-1 */
+int lastpy;	/* 0 --- MAXY-1 */
+int lasthx = 0; /* location of monster last hit by player */
+int lasthy = 0;	/* location of monster last hit by player */
 
 long initialtime=0;		/* time playing began 	*/
 long gtime=0;			/* the clock for the game	*/
@@ -289,7 +291,7 @@
  *
  *	array to do rnd() to create monsters <= a given level
  */
-char monstlevel[] = {5, 11, 17, 22, 27, 33, 39, 42, 46, 50, 53, 56};
+int monstlevel[] = {5, 11, 17, 22, 27, 33, 39, 42, 46, 50, 53, 56};
 
 struct monst monster[] = {
 
@@ -380,82 +382,85 @@
 
 /*	name array for scrolls		*/
 char *scrollname[MAXSCROLL] = {
-	"\0enchant armor",
-	"\0enchant weapon",
-	"\0enlightenment",
-	"\0blank paper",
-	"\0create monster",
-	"\0create artifact",
-	"\0aggravate monsters",
-	"\0time warp",
-	"\0teleportation",
-	"\0expanded awareness",
-	"\0haste monsters",
-	"\0monster healing",
-	"\0spirit protection",
-	"\0undead protection",
-	"\0stealth",
-	"\0magic mapping",
-	"\0hold monsters",
-	"\0gem perfection",
-	"\0spell extension",
-	"\0identify",
-	"\0remove curse",
-	"\0annihilation",
-	"\0pulverization",
-	"\0life protection",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 "
+	"enchant armor",
+	"enchant weapon",
+	"enlightenment",
+	"blank paper",
+	"create monster",
+	"create artifact",
+	"aggravate monsters",
+	"time warp",
+	"teleportation",
+	"expanded awareness",
+	"haste monsters",
+	"monster healing",
+	"spirit protection",
+	"undead protection",
+	"stealth",
+	"magic mapping",
+	"hold monsters",
+	"gem perfection",
+	"spell extension",
+	"identify",
+	"remove curse",
+	"annihilation",
+	"pulverization",
+	"life protection",
+	" ",
+	" ",
+	" ",
+	" "
 };
 
+int scrollknown[MAXSCROLL];
+
 /*	name array for magic potions	*/
 char *potionname[MAXPOTION] = {
-	"\0sleep",
-	"\0healing",
-	"\0raise level",
-	"\0increase ability",
-	"\0wisdom",
-	"\0strength",
-	"\0raise charisma",
-	"\0dizziness",
-	"\0learning",
-	"\0gold detection",
-	"\0monster detection",
-	"\0forgetfulness",
-	"\0water",
-	"\0blindness",
-	"\0confusion",
-	"\0heroism",
-	"\0sturdiness",
-	"\0giant strength",
-	"\0fire resistance",
-	"\0treasure finding",
-	"\0instant healing",
-	" cure dianthroritis",
-	"\0poison",
-	"\0see invisible",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 ",
-	"\0 "
+	"sleep",
+	"healing",
+	"raise level",
+	"increase ability",
+	"wisdom",
+	"strength",
+	"raise charisma",
+	"dizziness",
+	"learning",
+	"gold detection",
+	"monster detection",
+	"forgetfulness",
+	"water",
+	"blindness",
+	"confusion",
+	"heroism",
+	"sturdiness",
+	"giant strength",
+	"fire resistance",
+	"treasure finding",
+	"instant healing",
+	"cure dianthroritis",
+	"poison",
+	"see invisible",
+	" ",
+	" ",
+	" ",
+	" ",
+	" ",
+	" ",
+	" ",
+	" ",
+	" ",
+	" ",
+	" "
 };
 
+int potionknown[MAXPOTION];
 
 /*
 **	i = rund((tmp=splev[lev])?tmp:1); 
 **	i = rnd((tmp=splev[lev]-9) ?tmp:1 ) + 9;
  */
-char spelknow[SPNUM]={0};
-char splev[] = {
+int spelknow[SPNUM]={0};
+int splev[] = {
 	1,4,7,11,15,
 	20,24,28,30,32,
 	33,34,35,36,37,
@@ -762,7 +767,7 @@
  *	20 - remove curse	21 - annihilation			
  *	22 - pulverization	23 - life protection
  */
-char scprob[]= { 
+int scprob[]= { 
 	0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 
 	4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8,
 	9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 
@@ -800,15 +805,15 @@
  *  22 - poison		
  *  23 - see invisible
  */
-char potprob[] = { 
+int potprob[] = { 
 	0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 
 	5, 5, 6, 6, 7, 7, 8, 9, 9, 9, 
 	10, 10, 10, 11, 11, 12, 12, 13, 14, 15, 
 	16, 17, 18, 19, 19, 20, 20, 22, 22, 23, 
 	23 };	/* 41 total */
 
-char nlpts[] = { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7 };
-char nch[] = { 0, 0, 0, 1, 1, 1, 2, 2, 3, 4 };
-char nplt[] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 4 };
-char ndgg[] = { 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5 };
-char nsw[] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3 };
+int nlpts[] = { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7 };
+int nch[] = { 0, 0, 0, 1, 1, 1, 2, 2, 3, 4 };
+int nplt[] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 4 };
+int ndgg[] = { 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5 };
+int nsw[] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3 };