Mercurial > hg > early-roguelike
comparison arogue7/passages.c @ 219:f9ef86cf22b2
Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
| author | John "Elwin" Edwards |
|---|---|
| date | Fri, 19 Feb 2016 21:02:28 -0500 |
| parents | 1cd604c827a3 |
| children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
| 218:56e748983fa8 | 219:f9ef86cf22b2 |
|---|---|
| 16 * Draw the connecting passages | 16 * Draw the connecting passages |
| 17 * | 17 * |
| 18 * @(#)passages.c 3.4 (Berkeley) 6/15/81 | 18 * @(#)passages.c 3.4 (Berkeley) 6/15/81 |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include <stdlib.h> | |
| 21 #include "curses.h" | 22 #include "curses.h" |
| 22 #include "rogue.h" | 23 #include "rogue.h" |
| 23 | 24 |
| 25 void conn(int r1, int r2); | |
| 26 void door(struct room *rm, coord *cp); | |
| 27 | |
| 24 /* | 28 /* |
| 25 * do_passages: | 29 * do_passages: |
| 26 * Draw all the passages on a level. | 30 * Draw all the passages on a level. |
| 27 */ | 31 */ |
| 28 | 32 |
| 29 do_passages() | 33 void |
| 34 do_passages(void) | |
| 30 { | 35 { |
| 31 register struct rdes *r1, *r2 = NULL; | 36 register struct rdes *r1, *r2 = NULL; |
| 32 register int i, j; | 37 register int i, j; |
| 33 register int roomcount; | 38 register int roomcount; |
| 34 static struct rdes | 39 static struct rdes |
| 132 /* | 137 /* |
| 133 * conn: | 138 * conn: |
| 134 * Draw a corridor from a room in a certain direction. | 139 * Draw a corridor from a room in a certain direction. |
| 135 */ | 140 */ |
| 136 | 141 |
| 137 conn(r1, r2) | 142 void |
| 138 int r1, r2; | 143 conn(int r1, int r2) |
| 139 { | 144 { |
| 140 register struct room *rpf, *rpt = NULL; | 145 register struct room *rpf, *rpt = NULL; |
| 141 register char rmt; | 146 register char rmt; |
| 142 register int distance, max_diag, offset, i; | 147 register int distance, max_diag, offset, i; |
| 143 register int rm; | 148 register int rm; |
| 346 /* | 351 /* |
| 347 * Add a door or possibly a secret door | 352 * Add a door or possibly a secret door |
| 348 * also enters the door in the exits array of the room. | 353 * also enters the door in the exits array of the room. |
| 349 */ | 354 */ |
| 350 | 355 |
| 351 door(rm, cp) | 356 void |
| 352 register struct room *rm; | 357 door(struct room *rm, coord *cp) |
| 353 register coord *cp; | |
| 354 { | 358 { |
| 355 struct linked_list *newroom; | 359 struct linked_list *newroom; |
| 356 coord *exit; | 360 coord *exit; |
| 357 | 361 |
| 358 cmov(*cp); | 362 cmov(*cp); |
