1 | /* |
1 | /* |
2 | * static char *rcsid_map_c = |
2 | * static char *rcsid_map_c = |
3 | * "$Id: map.c,v 1.7 2006/03/07 13:44:42 root Exp $"; |
3 | * "$Id: map.c,v 1.8 2006/03/20 23:07:50 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
679 | |
679 | |
680 | if(m->spaces==NULL) |
680 | if(m->spaces==NULL) |
681 | fatal(OUT_OF_MEMORY); |
681 | fatal(OUT_OF_MEMORY); |
682 | } |
682 | } |
683 | |
683 | |
684 | /* Creatures and returns a map of the specific size. Used |
684 | /* Create and returns a map of the specific size. Used |
685 | * in random map code and the editor. |
685 | * in random map code and the editor. |
686 | */ |
686 | */ |
687 | mapstruct *get_empty_map(int sizex, int sizey) { |
687 | mapstruct *get_empty_map(int sizex, int sizey) { |
688 | mapstruct *m = get_linked_map(); |
688 | mapstruct *m = get_linked_map(); |
689 | m->width = sizex; |
689 | m->width = sizex; |
… | |
… | |
1150 | *****************************************************************************/ |
1150 | *****************************************************************************/ |
1151 | |
1151 | |
1152 | /* This goes through map 'm' and removed any unique items on the map. */ |
1152 | /* This goes through map 'm' and removed any unique items on the map. */ |
1153 | static void delete_unique_items(mapstruct *m) |
1153 | static void delete_unique_items(mapstruct *m) |
1154 | { |
1154 | { |
1155 | int i,j,unique=0; |
1155 | int i,j,unique; |
1156 | object *op, *next; |
1156 | object *op, *next; |
1157 | |
1157 | |
1158 | for(i=0; i<MAP_WIDTH(m); i++) |
1158 | for(i=0; i<MAP_WIDTH(m); i++) |
1159 | for(j=0; j<MAP_HEIGHT(m); j++) { |
1159 | for(j=0; j<MAP_HEIGHT(m); j++) { |
1160 | unique=0; |
1160 | unique=0; |