Mercurial > hg > early-roguelike
comparison xrogue/passages.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | f54901b9c39b |
children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
224:4d0f53998e8a | 225:4f6e056438eb |
---|---|
14 All rights reserved. | 14 All rights reserved. |
15 | 15 |
16 See the file LICENSE.TXT for full copyright and licensing information. | 16 See the file LICENSE.TXT for full copyright and licensing information. |
17 */ | 17 */ |
18 | 18 |
19 #include <stdlib.h> | |
19 #include <curses.h> | 20 #include <curses.h> |
20 #include "rogue.h" | 21 #include "rogue.h" |
22 | |
23 void conn(int r1, int r2); | |
24 void door(struct room *rm, coord *cp); | |
21 | 25 |
22 /* | 26 /* |
23 * do_passages: | 27 * do_passages: |
24 * Draw all the passages on a level. | 28 * Draw all the passages on a level. |
25 */ | 29 */ |
26 | 30 |
27 do_passages() | 31 void |
32 do_passages(void) | |
28 { | 33 { |
29 register struct rdes *r1, *r2 = NULL; | 34 register struct rdes *r1, *r2 = NULL; |
30 register int i, j; | 35 register int i, j; |
31 register int roomcount; | 36 register int roomcount; |
32 static struct rdes | 37 static struct rdes |
131 /* | 136 /* |
132 * conn: | 137 * conn: |
133 * Draw a corridor from a room in a certain direction. | 138 * Draw a corridor from a room in a certain direction. |
134 */ | 139 */ |
135 | 140 |
136 conn(r1, r2) | 141 void |
137 int r1, r2; | 142 conn(int r1, int r2) |
138 { | 143 { |
139 register struct room *rpf, *rpt = NULL; | 144 register struct room *rpf, *rpt = NULL; |
140 register char rmt; | 145 register char rmt; |
141 register int distance = 0, max_diag, offset = 0, i; | 146 register int distance = 0, max_diag, offset = 0, i; |
142 register int rm; | 147 register int rm; |
345 /* | 350 /* |
346 * Add a door or possibly a secret door | 351 * Add a door or possibly a secret door |
347 * also enters the door in the exits array of the room. | 352 * also enters the door in the exits array of the room. |
348 */ | 353 */ |
349 | 354 |
350 door(rm, cp) | 355 void |
351 register struct room *rm; | 356 door(struct room *rm, coord *cp) |
352 register coord *cp; | |
353 { | 357 { |
354 struct linked_list *newroom; | 358 struct linked_list *newroom; |
355 coord *exit; | 359 coord *exit; |
356 | 360 |
357 cmov(*cp); | 361 cmov(*cp); |