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

Comparing deliantra/server/random_maps/exit.C (file contents):
Revision 1.39 by root, Fri Mar 26 01:04:44 2010 UTC vs.
Revision 1.40 by root, Sun Mar 28 22:29:50 2010 UTC

117 6 means southward 117 6 means southward
118*/ 118*/
119void 119void
120place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP) 120place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP)
121{ 121{
122 char styledirname[1024];
123 maptile *style_map_down = 0; /* harder maze */ 122 maptile *style_map_down = 0; /* harder maze */
124 maptile *style_map_up = 0; /* easier maze */ 123 maptile *style_map_up = 0; /* easier maze */
125 object *the_exit_down; /* harder maze */ 124 object *the_exit_down; /* harder maze */
126 object *the_exit_up; /* easier maze */ 125 object *the_exit_up; /* easier maze */
127 int cx = -1, cy = -1; /* location of a map center */ 126 int cx = -1, cy = -1; /* location of a map center */
138 137
139 switch (orientation) 138 switch (orientation)
140 { 139 {
141 case 1: 140 case 1:
142 { 141 {
143 sprintf (styledirname, "/styles/exitstyles/up");
144 style_map_up = find_style (styledirname, exitstyle, -1); 142 style_map_up = find_style ("/styles/exitstyles/up" , exitstyle, -1);
145 sprintf (styledirname, "/styles/exitstyles/down");
146 style_map_down = find_style (styledirname, exitstyle, -1); 143 style_map_down = find_style ("/styles/exitstyles/down", exitstyle, -1);
147 break; 144 break;
148 } 145 }
149 146
150 case 2: 147 case 2:
151 { 148 {
152 sprintf (styledirname, "/styles/exitstyles/down");
153 style_map_up = find_style (styledirname, exitstyle, -1); 149 style_map_up = find_style ("/styles/exitstyles/down", exitstyle, -1);
154 sprintf (styledirname, "/styles/exitstyles/up");
155 style_map_down = find_style (styledirname, exitstyle, -1); 150 style_map_down = find_style ("/styles/exitstyles/up" , exitstyle, -1);
156 break; 151 break;
157 } 152 }
158 153
159 default: 154 default:
160 { 155 {
161 sprintf (styledirname, "/styles/exitstyles/generic"); 156 style_map_up =
162 style_map_up = find_style (styledirname, exitstyle, -1); 157 style_map_down = find_style ("/styles/exitstyles/generic", exitstyle, -1);
163 style_map_down = style_map_up;
164 break; 158 break;
165 } 159 }
166 } 160 }
167 161
168 the_exit_up = style_map_up 162 the_exit_up = style_map_up

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines