src/rail_cmd.cpp
changeset 7158 ca0084d96dbd
parent 7043 842b2bc47729
child 7163 99ef91ad6415
equal deleted inserted replaced
7157:ff42326d2fde 7158:ca0084d96dbd
  1639 			} while ((offs = link->next) != 0xFFFF);
  1639 			} while ((offs = link->next) != 0xFFFF);
  1640 		}
  1640 		}
  1641 	}
  1641 	}
  1642 }
  1642 }
  1643 
  1643 
  1644 static const DiagDirection _dir_from_track[14] = {
       
  1645 	DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_SW, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_NE,
       
  1646 	DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NE,
       
  1647 };
       
  1648 
       
  1649 
       
  1650 static void ChangeSignalStates(SetSignalsData *ssd)
  1644 static void ChangeSignalStates(SetSignalsData *ssd)
  1651 {
  1645 {
  1652 	int i;
  1646 	int i;
  1653 
  1647 
  1654 	/* thinking about presignals...
  1648 	/* thinking about presignals...
  1690 
  1684 
  1691 		/* Update signals on the other side of this exit-combo signal; it changed. */
  1685 		/* Update signals on the other side of this exit-combo signal; it changed. */
  1692 		if (IsPresignalExit(tile, track)) {
  1686 		if (IsPresignalExit(tile, track)) {
  1693 			if (ssd->cur_stack != NUM_SSD_STACK) {
  1687 			if (ssd->cur_stack != NUM_SSD_STACK) {
  1694 				ssd->next_tile[ssd->cur_stack] = tile;
  1688 				ssd->next_tile[ssd->cur_stack] = tile;
  1695 				ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]];
  1689 				ssd->next_dir[ssd->cur_stack] = TrackdirToExitdir(ssd->bit[i]);
  1696 				ssd->cur_stack++;
  1690 				ssd->cur_stack++;
  1697 			} else {
  1691 			} else {
  1698 				DEBUG(misc, 0, "NUM_SSD_STACK too small"); /// @todo WTF is this???
  1692 				DEBUG(misc, 0, "NUM_SSD_STACK too small"); /// @todo WTF is this???
  1699 			}
  1693 			}
  1700 		}
  1694 		}