changeset 2436 | 7d5df545bd5d |
parent 2422 | 897a01f7c624 |
child 2478 | cd6a02ba3853 |
2435:9b9d43988058 | 2436:7d5df545bd5d |
---|---|
954 {1,15,17,0,19,5,6,7,21,9,10,11, 0,13,14}, |
954 {1,15,17,0,19,5,6,7,21,9,10,11, 0,13,14}, |
955 }; |
955 }; |
956 |
956 |
957 extern const byte _road_sloped_sprites[14]; |
957 extern const byte _road_sloped_sprites[14]; |
958 |
958 |
959 static void DrawBridgePillars(TileInfo *ti, int x, int y, int z) |
959 static void DrawBridgePillars(const TileInfo *ti, int x, int y, int z) |
960 { |
960 { |
961 const uint32 *b; |
961 const uint32 *b; |
962 uint32 image; |
962 uint32 image; |
963 int piece; |
963 int piece; |
964 |
964 |
1227 if (ti->map5 & 0x20) { |
1227 if (ti->map5 & 0x20) { |
1228 uint f = _bridge_foundations[ti->map5&1][ti->tileh]; |
1228 uint f = _bridge_foundations[ti->map5&1][ti->tileh]; |
1229 // make sure that the slope is not inclined foundation |
1229 // make sure that the slope is not inclined foundation |
1230 if (IS_BYTE_INSIDE(f, 1, 15)) return z; |
1230 if (IS_BYTE_INSIDE(f, 1, 15)) return z; |
1231 |
1231 |
1232 // change foundation type? |
1232 // change foundation type? XXX - should be const; accessor function! |
1233 if (f) ti->tileh = _inclined_tileh[f - 15]; |
1233 if (f) ti->tileh = _inclined_tileh[f - 15]; |
1234 } |
1234 } |
1235 |
1235 |
1236 // no transport route, fallback to default |
1236 // no transport route, fallback to default |
1237 } |
1237 } |
1250 // default case |
1250 // default case |
1251 z = ti->z; |
1251 z = ti->z; |
1252 return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + z; |
1252 return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + z; |
1253 } |
1253 } |
1254 |
1254 |
1255 static uint GetSlopeTileh_TunnelBridge(TileInfo *ti) { |
1255 static uint GetSlopeTileh_TunnelBridge(const TileInfo *ti) { |
1256 // not accurate, but good enough for slope graphics drawing |
1256 // not accurate, but good enough for slope graphics drawing |
1257 return 0; |
1257 return 0; |
1258 } |
1258 } |
1259 |
1259 |
1260 |
1260 |
1395 assert(0); /* This should never occur */ |
1395 assert(0); /* This should never occur */ |
1396 } |
1396 } |
1397 return 0; |
1397 return 0; |
1398 } |
1398 } |
1399 |
1399 |
1400 static void ChangeTileOwner_TunnelBridge(TileIndex tile, byte old_player, byte new_player) |
1400 static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, PlayerID new_player) |
1401 { |
1401 { |
1402 if (!IsTileOwner(tile, old_player)) return; |
1402 if (!IsTileOwner(tile, old_player)) return; |
1403 |
1403 |
1404 if (new_player != 255) { |
1404 if (new_player != 255) { |
1405 SetTileOwner(tile, new_player); |
1405 SetTileOwner(tile, new_player); |