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

Comparing deliantra/server/random_maps/square_spiral.C (file contents):
Revision 1.12 by root, Fri Apr 11 21:09:53 2008 UTC vs.
Revision 1.13 by root, Mon Apr 14 22:41:17 2008 UTC

60 ++(*cx); 60 ++(*cx);
61 61
62 /* cx and cy should now be the top-right corner of the onion layer */ 62 /* cx and cy should now be the top-right corner of the onion layer */
63} 63}
64 64
65Maze 65void
66make_square_spiral_layout (int xsize, int ysize, int options) 66make_square_spiral_layout (Maze maze, int options)
67{ 67{
68 int i, j; 68 int i, j;
69 int cx, cy; 69 int cx, cy;
70 int tx, ty; 70 int tx, ty;
71 71
72 /* generate and allocate a doorless, centered onion */ 72 /* generate and allocate a doorless, centered onion */
73 Maze maze = map_gen_onion (xsize, ysize, RMOPT_CENTERED | RMOPT_NO_DOORS, 0); 73 map_gen_onion (maze, RMOPT_CENTERED | RMOPT_NO_DOORS, 0);
74
75 int xsize = maze->w;
76 int ysize = maze->h;
74 77
75 /* find the layout center. */ 78 /* find the layout center. */
76 cx = 0; 79 cx = 0;
77 cy = 0; 80 cy = 0;
78 for (i = 0; i < xsize; i++) 81 for (i = 0; i < xsize; i++)
127 else 130 else
128 { 131 {
129 maze[cx][cy] = '<'; 132 maze[cx][cy] = '<';
130 maze[xsize - 2][1] = '>'; 133 maze[xsize - 2][1] = '>';
131 } 134 }
132
133 return maze;
134} 135}
135 136

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines