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.34 by root, Fri Jul 2 15:03:57 2010 UTC vs.
Revision 1.35 by root, Fri Jul 2 15:43:37 2010 UTC

158 158
159// use this in new code 159// use this in new code
160INTERFACE_CLASS(layout) 160INTERFACE_CLASS(layout)
161struct layout 161struct layout
162{ 162{
163 char **col; 163 typedef char cell;
164
165 cell **data;
164 int w, h; 166 int w, h;
165 167
166 layout (int w, int h); 168 layout (int w, int h);
167 ~layout (); 169 ~layout ();
168 170
169 operator char **() const 171 operator cell **() const
170 { 172 {
171 return col; 173 return data;
172 } 174 }
173 175
174 void swap (layout &maze) 176 void swap (layout &maze)
175 { 177 {
176 ::swap (maze.col, col); 178 ::swap (maze.data, data);
177 ::swap (maze.w , w ); 179 ::swap (maze.w , w );
178 ::swap (maze.h , h ); 180 ::swap (maze.h , h );
179 } 181 }
182
183 MTH void swap (layout *maze) { swap (*maze); }
180 184
181 // for debugging, print maze to stdout 185 // for debugging, print maze to stdout
182 MTH void print () const; 186 MTH void print () const;
183 187
184 // simple inpainting 188 // simple inpainting

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines