version 1.34 | | version 1.35 |
---|
| | |
/* | | /* |
* static char *rcsid_weather_c = | | * static char *rcsid_weather_c = |
* "$Id: weather.c,v 1.34 2003/09/13 05:02:13 mwedel Exp $"; | | * "$Id: weather.c,v 1.35 2003/09/26 06:12:07 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
sint32 min[10], max[10], avgrain, avgwind, realmaxwind; | | sint32 min[10], max[10], avgrain, avgwind, realmaxwind; |
double scale[10], realscalewind; | | double scale[10], realscalewind; |
uint8 pixels[3 * 3 * WEATHERMAPTILESX]; | | uint8 pixels[3 * 3 * WEATHERMAPTILESX]; |
long long total_rainfall = 0; | | sint64 total_rainfall = 0; |
long long total_wind = 0; | | sint64 total_wind = 0; |
| | |
min[0] = 0; max[0] = 100; | | min[0] = 0; max[0] = 100; |
min[1] = 0; max[1] = 0; | | min[1] = 0; max[1] = 0; |
| | |
} | | } |
} | | } |
avgrain = total_rainfall / (WEATHERMAPTILESX * WEATHERMAPTILESY); | | avgrain = total_rainfall / (WEATHERMAPTILESX * WEATHERMAPTILESY); |
avgwind = (total_wind / (WEATHERMAPTILESX * WEATHERMAPTILESY) * 1.5); | | avgwind = (total_wind / ((WEATHERMAPTILESX * WEATHERMAPTILESY) * 3 / 2)); |
max[2] = avgrain - 1; | | max[2] = avgrain - 1; |
realscalewind = 255.0l / (max[4] - min[4]); | | realscalewind = 255.0l / (max[4] - min[4]); |
realmaxwind = max[4]; | | realmaxwind = max[4]; |