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

Comparing deliantra/server/random_maps/style.C (file contents):
Revision 1.9 by root, Mon Dec 25 14:43:23 2006 UTC vs.
Revision 1.10 by root, Wed Dec 27 09:28:02 2006 UTC

117{ 117{
118 maptile *style_map; 118 maptile *style_map;
119 119
120 /* Given a file. See if its in memory */ 120 /* Given a file. See if its in memory */
121 for (style_map = styles; style_map != NULL; style_map = style_map->next) 121 for (style_map = styles; style_map != NULL; style_map = style_map->next)
122 {
123 if (!strcmp (style_name, style_map->path)) 122 if (!strcmp (style_name, style_map->path))
124 return style_map; 123 return style_map;
125 } 124
126 style_map = load_original_map (style_name, MAP_STYLE); 125 style_map = load_original_map (style_name, MAP_STYLE);
126
127 /* Remove it from global list, put it on our local list */ 127 /* Remove it from global list, put it on our local list */
128 if (style_map) 128 if (style_map)
129 { 129 {
130 maptile *tmp; 130 maptile *tmp;
131 131
135 { 135 {
136 for (tmp = first_map; tmp && tmp->next != style_map; tmp = tmp->next); 136 for (tmp = first_map; tmp && tmp->next != style_map; tmp = tmp->next);
137 if (tmp) 137 if (tmp)
138 tmp->next = style_map->next; 138 tmp->next = style_map->next;
139 } 139 }
140
140 style_map->next = styles; 141 style_map->next = styles;
141 styles = style_map; 142 styles = style_map;
142 } 143 }
144
143 return style_map; 145 return style_map;
144} 146}
145 147
146maptile * 148maptile *
147find_style (const char *dirname, const char *stylename, int difficulty) 149find_style (const char *dirname, const char *stylename, int difficulty)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines