Mercurial > hg > early-roguelike
comparison rogue4/new_level.c @ 215:1b73a8641b37
rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of
the change. This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
author | John "Elwin" Edwards |
---|---|
date | Wed, 27 Jan 2016 19:41:05 -0500 |
parents | 9535a08ddc39 |
children | 3d4252fa2ed3 |
comparison
equal
deleted
inserted
replaced
214:e5a15b09ce1d | 215:1b73a8641b37 |
---|---|
9 * All rights reserved. | 9 * All rights reserved. |
10 * | 10 * |
11 * See the file LICENSE.TXT for full copyright and licensing information. | 11 * See the file LICENSE.TXT for full copyright and licensing information. |
12 */ | 12 */ |
13 | 13 |
14 #include <stdlib.h> | |
14 #include <time.h> | 15 #include <time.h> |
15 #include <curses.h> | 16 #include <curses.h> |
16 #include <string.h> | 17 #include <string.h> |
17 #include "rogue.h" | 18 #include "rogue.h" |
18 | 19 |
19 #define TREAS_ROOM 20 /* one chance in TREAS_ROOM for a treasure room */ | 20 #define TREAS_ROOM 20 /* one chance in TREAS_ROOM for a treasure room */ |
20 #define MAXTREAS 10 /* maximum number of treasures in a treasure room */ | 21 #define MAXTREAS 10 /* maximum number of treasures in a treasure room */ |
21 #define MINTREAS 2 /* minimum number of treasures in a treasure room */ | 22 #define MINTREAS 2 /* minimum number of treasures in a treasure room */ |
22 | 23 |
23 new_level() | 24 void put_things(void); |
25 void treas_room(void); | |
26 | |
27 void | |
28 new_level(void) | |
24 { | 29 { |
25 register int rm, i; | 30 register int rm, i; |
26 register THING *tp; | 31 register THING *tp; |
27 register char *sp; | 32 register char *sp; |
28 register THING **mp; | 33 register THING **mp; |
110 | 115 |
111 /* | 116 /* |
112 * rnd_room: | 117 * rnd_room: |
113 * Pick a room that is really there | 118 * Pick a room that is really there |
114 */ | 119 */ |
115 rnd_room() | 120 int |
121 rnd_room(void) | |
116 { | 122 { |
117 register int rm; | 123 register int rm; |
118 | 124 |
119 do | 125 do |
120 { | 126 { |
125 | 131 |
126 /* | 132 /* |
127 * put_things: | 133 * put_things: |
128 * Put potions and scrolls on this level | 134 * Put potions and scrolls on this level |
129 */ | 135 */ |
130 put_things() | 136 void |
137 put_things(void) | |
131 { | 138 { |
132 register int i; | 139 register int i; |
133 register THING *cur; | 140 register THING *cur; |
134 register int rm; | 141 register int rm; |
135 coord tp; | 142 coord tp; |
195 * treas_room: | 202 * treas_room: |
196 * Add a treasure room | 203 * Add a treasure room |
197 */ | 204 */ |
198 #define MAXTRIES 10 /* max number of tries to put down a monster */ | 205 #define MAXTRIES 10 /* max number of tries to put down a monster */ |
199 | 206 |
200 treas_room() | 207 void |
208 treas_room(void) | |
201 { | 209 { |
202 register int nm, index; | 210 register int nm, index; |
203 register THING *tp; | 211 register THING *tp; |
204 register struct room *rp; | 212 register struct room *rp; |
205 register int spots, num_monst; | 213 register int spots, num_monst; |