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.39 by root, Sat Jul 3 01:49:18 2010 UTC vs.
Revision 1.40 by root, Sat Jul 3 02:19:10 2010 UTC

156 cell **data; 156 cell **data;
157 int w, h; 157 int w, h;
158 158
159 layout (int w, int h); 159 layout (int w, int h);
160 layout (layout &copy); 160 layout (layout &copy);
161 layout (layout &orig, int x1, int y1, int x2, int y2); // reference rect in other layout
161 ~layout (); 162 ~layout ();
162 163
163 operator cell **() const 164 operator cell **() const
164 { 165 {
165 return data; 166 return data;
166 } 167 }
167 168
168 void swap (layout &maze) 169 void swap (layout &maze)
169 { 170 {
170 ::swap (maze.data, data); 171 ::swap (maze.data, data);
171 ::swap (maze.w , w ); 172 ::swap (maze.w , w );
172 ::swap (maze.h , h ); 173 ::swap (maze.h , h );
174 ::swap (maze.size, size);
173 } 175 }
174 176
175 MTH void swap (layout *maze) { swap (*maze); } 177 MTH void swap (layout *maze) { swap (*maze); }
176 178
177 // for debugging, print maze to stdout 179 // for debugging, print maze to stdout
200 MTH void symmetrize (int symmetry); 202 MTH void symmetrize (int symmetry);
201 MTH void rotate (int rotation); // rotate by 1=90, 2=180, 3=270 degrees 203 MTH void rotate (int rotation); // rotate by 1=90, 2=180, 3=270 degrees
202 204
203 void generate (random_map_params *RP); 205 void generate (random_map_params *RP);
204private: 206private:
207 int size;
205 void alloc (int w, int h); 208 void alloc (int w, int h);
206}; 209};
207 210
208// utility functions, to use rmg_rndm instead of rndm. 211// utility functions, to use rmg_rndm instead of rndm.
209static inline int 212static inline int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines