(svn r3992) -Fix: Rewrote the code to determine whether a rail-tile can be terraformed.

Fixes a bug where you could terraform a tunnel (fixed by r3228, but reverted that one)
Fixes a bug introduced by r3228 which allowed steep rail tiles resulting in ... unwanted effects such as display artifacts.
That means the terraform feature should not work as intended; it also uses _valid_tileh_slopes to determine valid configurations instead of hand-brewn stuff.
TODO: _terraform_err_tile and similar TileIndices should have INVALID_TILE as "unused", not 0. (0 is a valid tile).
This commit is contained in:
celestar
2006-03-20 16:43:48 +00:00
parent f91b027bea
commit b5b348bdce
5 changed files with 53 additions and 57 deletions

1
tile.h
View File

@@ -24,6 +24,7 @@ typedef enum TileTypes {
void SetMapExtraBits(TileIndex tile, byte flags);
uint GetMapExtraBits(TileIndex tile);
uint GetTileh(uint n, uint w, uint e, uint s, uint *h);
uint GetTileSlope(TileIndex tile, uint *h);
uint GetTileZ(TileIndex tile);