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

Comparing deliantra/server/random_maps/expand2x.C (file contents):
Revision 1.4 by root, Thu Sep 14 22:34:02 2006 UTC vs.
Revision 1.5 by root, Sun Dec 31 19:02:24 2006 UTC

1
1/* 2/*
2 * Expands a layout by 2x in each dimension. 3 * Expands a layout by 2x in each dimension.
3 * H. S. Teoh 4 * H. S. Teoh
4 * -------------------------------------------------------------------------- 5 * --------------------------------------------------------------------------
5 * $Id: expand2x.C,v 1.4 2006/09/14 22:34:02 root Exp $ 6 * $Id: expand2x.C,v 1.5 2006/12/31 19:02:24 root Exp $
6 * 7 *
7 * ALGORITHM 8 * ALGORITHM
8 * 9 *
9 * ... (TBW) 10 * ... (TBW)
10 */ 11 */
41 { 42 {
42 for (j = 0; j < ysize; j++) 43 for (j = 0; j < ysize; j++)
43 { 44 {
44 switch (layout[i][j]) 45 switch (layout[i][j])
45 { 46 {
46 case '#': 47 case '#':
47 expand_wall (newlayout, i, j, layout, xsize, ysize); 48 expand_wall (newlayout, i, j, layout, xsize, ysize);
48 break; 49 break;
49 case 'D': 50 case 'D':
50 expand_door (newlayout, i, j, layout, xsize, ysize); 51 expand_door (newlayout, i, j, layout, xsize, ysize);
51 break; 52 break;
52 default: 53 default:
53 expand_misc (newlayout, i, j, layout, xsize, ysize); 54 expand_misc (newlayout, i, j, layout, xsize, ysize);
54 } 55 }
55 } 56 }
56 } 57 }
57 58
58 /* Dump old layout */ 59 /* Dump old layout */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines