(svn r23152) -Change: [NewGRF v8] Snow line height table uses values between 0x00 and 0xFF independent of number of height levels.

This commit is contained in:
frosch 2011-11-08 17:28:42 +00:00
parent 4301936fb1
commit e40dabc868

View File

@ -2429,7 +2429,16 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, By
for (uint i = 0; i < SNOW_LINE_MONTHS; i++) {
for (uint j = 0; j < SNOW_LINE_DAYS; j++) {
table[i][j] = buf->ReadByte();
if (table[i][j] != 0xFF) table[i][j] /= TILE_HEIGHT;
if (_cur.grffile->grf_version >= 8) {
if (table[i][j] != 0xFF) table[i][j] = table[i][j] * (1 + MAX_TILE_HEIGHT) / 256;
} else {
if (table[i][j] >= 128) {
/* no snow */
table[i][j] = 0xFF;
} else {
table[i][j] = table[i][j] * (1 + MAX_TILE_HEIGHT) / 128;
}
}
}
}
SetSnowLine(table);