--- freeciv/server/maphand.h Sat Jun 12 12:44:52 1999 +++ freeciv-jk/server/maphand.h Fri Aug 27 12:32:34 1999 @@ -34,6 +34,7 @@ void map_save(struct section_file *file); void map_startpos_load(struct section_file *file); void map_tiles_load(struct section_file *file); +void map_specials_next_load(struct section_file *file); void map_load(struct section_file *file); #endif /* FC__MAPHAND_H */ --- freeciv/server/maphand.c Sat Aug 14 12:47:37 1999 +++ freeciv-jk/server/maphand.c Fri Aug 27 13:16:16 1999 @@ -449,6 +449,34 @@ } } } + +/*************************************************************** +load the "next" bits of specials of map from a savegame file +***************************************************************/ +void map_specials_next_load(struct section_file *file) +{ + int x, y; + + /* get "next" 4 bits of special flags */ + for(y=0; yspecial|=(ch-(isdigit(ch) ? '0' : 'a'-10))<<8; + } else if(ch!=' ') { + freelog(LOG_FATAL, "unknown special flag(next) (map.n) in map " + "at position(%d,%d): %d '%c'", x, y, ch, ch); + exit(1); + } + } + } + } +} + /*************************************************************** load a complete map from a savegame file ***************************************************************/ @@ -501,23 +529,7 @@ } /* get "next" 4 bits of special flags */ - for(y=0; yspecial|=(ch-(isdigit(ch) ? '0' : 'a'-10))<<8; - } else if(ch!=' ') { - freelog(LOG_FATAL, "unknown special flag(next) (map.n) in map " - "at position(%d,%d): %d '%c'", x, y, ch, ch); - exit(1); - } - } - } - } + map_specials_next_load(file); /* get bits 0-3 of known flags */ for(y=0; y