version 1.112 | | version 1.113 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.112 2006/07/19 09:58:58 gros Exp $"; | | * "$Id: map.c,v 1.113 2006/08/12 14:52:15 gros Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/*set part to -1 indicating conversion to weather map not yet done*/ | | /*set part to -1 indicating conversion to weather map not yet done*/ |
MAP_WORLDPARTX(map)=-1; | | MAP_WORLDPARTX(map)=-1; |
MAP_WORLDPARTY(map)=-1; | | MAP_WORLDPARTY(map)=-1; |
| | map->last_reset_time.tv_sec = 0; |
return map; | | return map; |
} | | } |
| | |
| | |
} else if (!strcmp(key, "nosmooth")) { | | } else if (!strcmp(key, "nosmooth")) { |
m->nosmooth = atoi(value); | | m->nosmooth = atoi(value); |
} | | } |
| | else if (!strcmp(key, "first_load")) { |
| | m->last_reset_time.tv_sec = atoi(value); |
| | } |
else if (!strncmp(key,"tile_path_", 10)) { | | else if (!strncmp(key,"tile_path_", 10)) { |
int tile=atoi(key+10); | | int tile=atoi(key+10); |
| | |
| | |
if (m->winddir) fprintf(fp, "winddir %d\n", m->winddir); | | if (m->winddir) fprintf(fp, "winddir %d\n", m->winddir); |
if (m->sky) fprintf(fp, "sky %d\n", m->sky); | | if (m->sky) fprintf(fp, "sky %d\n", m->sky); |
if (m->nosmooth) fprintf(fp, "nosmooth %d\n", m->nosmooth); | | if (m->nosmooth) fprintf(fp, "nosmooth %d\n", m->nosmooth); |
| | if (m->last_reset_time.tv_sec) fprintf(fp, "first_load %d\n", m->last_reset_time.tv_sec); |
| | |
/* Save any tiling information, except on overlays */ | | /* Save any tiling information, except on overlays */ |
if (flag != 2) | | if (flag != 2) |
| | |
set_darkness_map(m); | | set_darkness_map(m); |
/* run the weather over this map */ | | /* run the weather over this map */ |
weather_effect(name); | | weather_effect(name); |
| | if (!(flags & (MAP_FLUSH))) |
| | { |
| | if (m->last_reset_time.tv_sec==0) |
| | gettimeofday(&(m->last_reset_time),NULL); |
| | } |
return m; | | return m; |
} | | } |
| | |