… | … | ||
---|---|---|---|
158 | 158 | ||
159 | // use this in new code | 159 | // use this in new code |
160 | INTERFACE_CLASS(layout) | 160 | INTERFACE_CLASS(layout) |
161 | struct layout | 161 | struct 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 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |