Mercurial > hg > early-roguelike
comparison srogue/passages.c @ 183:7f5f5f1ba09c
srogue: initialize some pointers.
MSVC complained that they might be used uninitialized.
author | John "Elwin" Edwards |
---|---|
date | Sat, 01 Aug 2015 21:23:55 -0400 |
parents | 2128c7dc8a40 |
children | 94a0d9dd5ce1 |
comparison
equal
deleted
inserted
replaced
182:1fe660009fd3 | 183:7f5f5f1ba09c |
---|---|
22 * Draw all the passages on a level. | 22 * Draw all the passages on a level. |
23 */ | 23 */ |
24 | 24 |
25 do_passages() | 25 do_passages() |
26 { | 26 { |
27 reg struct rdes *r1, *r2; | 27 reg struct rdes *r1, *r2 = NULL; |
28 reg int i, j; | 28 reg int i, j; |
29 reg int roomcount; | 29 reg int roomcount; |
30 static struct rdes { | 30 static struct rdes { |
31 bool conn[MAXROOMS]; /* possible to connect to room i */ | 31 bool conn[MAXROOMS]; /* possible to connect to room i */ |
32 bool isconn[MAXROOMS]; /* connection was made to room i */ | 32 bool isconn[MAXROOMS]; /* connection was made to room i */ |
124 */ | 124 */ |
125 | 125 |
126 conn(r1, r2) | 126 conn(r1, r2) |
127 int r1, r2; | 127 int r1, r2; |
128 { | 128 { |
129 reg struct room *rpf, *rpt; | 129 reg struct room *rpf, *rpt = NULL; |
130 reg char rmt, direc; | 130 reg char rmt, direc; |
131 reg int distance, turn_spot, turn_distance, rm; | 131 reg int distance, turn_spot, turn_distance, rm; |
132 struct coord curr, turn_delta, spos, epos; | 132 struct coord curr, turn_delta, spos, epos; |
133 | 133 |
134 if (r1 < r2) { | 134 if (r1 < r2) { |