ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/random_map.h
(Generate patch)

Comparing deliantra/server/random_maps/random_map.h (file contents):
Revision 1.32 by root, Thu Jul 1 01:22:44 2010 UTC vs.
Revision 1.33 by root, Fri Jul 2 03:40:14 2010 UTC

163 int w, h; 163 int w, h;
164 164
165 Layout (int w, int h); 165 Layout (int w, int h);
166 ~Layout (); 166 ~Layout ();
167 167
168 operator char **() 168 operator char **() const
169 { 169 {
170 return col; 170 return col;
171 } 171 }
172 172
173 void swap (Layout &layout) 173 void swap (Layout &layout)
176 ::swap (layout.w , w ); 176 ::swap (layout.w , w );
177 ::swap (layout.h , h ); 177 ::swap (layout.h , h );
178 } 178 }
179 179
180 // for debugging, print layout to stdout 180 // for debugging, print layout to stdout
181 void print (); 181 void print () const;
182 182
183 // simple inpainting 183 // simple inpainting
184 void fill (char fill); 184 void fill (char fill);
185 void clear () { fill (0); } 185 void clear () { fill (0); }
186 void border (char fill = '#'); 186 void border (char fill = '#');
192 // more walls, dirty=false carves narrow corridors. 192 // more walls, dirty=false carves narrow corridors.
193 void isolation_remover (bool dirty = 0); 193 void isolation_remover (bool dirty = 0);
194 194
195 // generates a cave, subtype 0 is a rough cave, randomly open or closed 195 // generates a cave, subtype 0 is a rough cave, randomly open or closed
196 void gen_cave (int subtype); 196 void gen_cave (int subtype);
197
198 // helper functions to modify the layout
197 void erode_1_2 (int c1, int c2 = -1, int repeat = 1); 199 void erode_1_2 (int c1, int c2 = -1, int repeat = 1);
200 void doorify ();
201 void roomify (); // make some rooms in it, works best on onions
202 void expand2x ();
203 void symmetrize (int symmetry);
204 void rotate (int rotation); // rotate by 1=90, 2=180, 3=270 degrees
198 205
199 void generate (random_map_params *RP); 206 void generate (random_map_params *RP);
200}; 207};
201 208
202// utility functions, to use rmg_rndm instead of rndm. 209// utility functions, to use rmg_rndm instead of rndm.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines