summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-08 19:27:20 +0000
committertron <tron@openttd.org>2006-06-08 19:27:20 +0000
commit5ab592667fb5f5eae62b0b7f7c7d3c7997606dea (patch)
treec60f815a593061f2cb836357b0d3ec6db0ecbd4e /openttd.c
parent7c1f1d823f059e3e8c8a336b6acb819c0ee5a03c (diff)
downloadopenttd-5ab592667fb5f5eae62b0b7f7c7d3c7997606dea.tar.xz
(svn r5173) Use map manipulation functions instead of SB()
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openttd.c b/openttd.c
index d3f831fca..e5fb8d0c0 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1382,12 +1382,12 @@ bool AfterLoadGame(void)
if (CheckSavegameVersion(21) && !CheckSavegameVersion(15)) {
BEGIN_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0) {
if (IsTileType(tile, MP_RAILWAY)) {
- // Clear PBS signals, move back sempahore bit to 2
if (HasSignals(tile)) {
// convert PBS signals to combo-signals
- if (HASBIT(_m[tile].m4, 2)) SB(_m[tile].m4, 0, 2, 3);
+ if (HASBIT(_m[tile].m4, 2)) SetSignalType(tile, SIGTYPE_COMBO);
- SB(_m[tile].m4, 2, 2, HASBIT(_m[tile].m4, 3));
+ // move the signal variant back
+ SetSignalVariant(tile, HASBIT(_m[tile].m4, 3) ? SIG_SEMAPHORE : SIG_ELECTRIC);
CLRBIT(_m[tile].m4, 3);
}