(svn r5173) Use map manipulation functions instead of SB()
authortron
Thu, 08 Jun 2006 19:27:20 +0000
changeset 3984 80b50f16d352
parent 3983 d2d6496238e4
child 3985 87cf4955787d
(svn r5173) Use map manipulation functions instead of SB()
openttd.c
--- a/openttd.c	Thu Jun 08 18:31:54 2006 +0000
+++ b/openttd.c	Thu Jun 08 19:27:20 2006 +0000
@@ -1382,12 +1382,12 @@
 	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);
 				}