mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(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:
parent
4301936fb1
commit
e40dabc868
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user