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

Comparing deliantra/server/random_maps/layout.C (file contents):
Revision 1.3 by root, Thu Jul 1 01:22:44 2010 UTC vs.
Revision 1.4 by root, Thu Jul 1 01:27:14 2010 UTC

90 { 90 {
91 int n1 = 0, n2 = 0; 91 int n1 = 0, n2 = 0;
92 92
93 // a 5x5 area, dx, dy, distance (1 == <= 1, 0 <= 2) 93 // a 5x5 area, dx, dy, distance (1 == <= 1, 0 <= 2)
94 static I8 dds[][3] = { 94 static I8 dds[][3] = {
95 { -2, -1, 0 }, 95 { -2, -1, 0 }, { -2, 0, 0 }, { -2, 1, 0 },
96 { -2, 0, 0 }, 96 { -1, -2, 0 }, { -1, -1, 1 }, { -1, 0, 1 }, { -1, 1, 1 }, { -1, 2, 0 },
97 { -2, 1, 0 }, 97 { 0, -2, 0 }, { 0, -1, 1 }, { 0, 0, 1 }, { 0, 1, 1 }, { 0, 2, 0 },
98 98 { 1, -2, 0 }, { 1, -1, 1 }, { 1, 0, 1 }, { 1, 1, 1 }, { 1, 2, 0 },
99 { -1, -2, 0 }, 99 { 2, -1, 0 }, { 2, 0, 0 }, { 2, 1, 0 },
100 { -1, -1, 1 },
101 { -1, 0, 1 },
102 { -1, 1, 1 },
103 { -1, 2, 0 },
104
105 { 0, -2, 0 },
106 { 0, -1, 1 },
107 { 0, 0, 1 },
108 { 0, 1, 1 },
109 { 0, 2, 0 },
110
111 { 1, -2, 0 },
112 { 1, -1, 1 },
113 { 1, 0, 1 },
114 { 1, 1, 1 },
115 { 1, 2, 0 },
116
117 { 2, -1, 0 },
118 { 2, 0, 0 },
119 { 2, 1, 0 },
120 }; 100 };
121 101
122 for (int i = array_length (dds); i--; ) 102 for (int i = array_length (dds); i--; )
123 { 103 {
124 int nx = x + dds [i][0]; 104 int nx = x + dds [i][0];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines