station_cmd.c
changeset 2140 d708eb80ab8b
parent 2133 098c9da8292e
child 2148 47ba4a1b1c3b
--- a/station_cmd.c	Wed Jul 20 09:49:04 2005 +0000
+++ b/station_cmd.c	Wed Jul 20 15:29:28 2005 +0000
@@ -933,8 +933,8 @@
  * @param x,y starting position of station dragging/placement
  * @param p1 various bitstuffed elements
  * - p1 = (bit  0)    - orientation (p1 & 1)
- * - p1 = (bit  8-15) - number of tracks (p1 >> 8) & 0xFF)
- * - p1 = (bit 16-23) - platform length (p1 >> 16) & 0xFF)
+ * - p1 = (bit  8-15) - number of tracks
+ * - p1 = (bit 16-23) - platform length
  * @param p2 various bitstuffed elements
  * - p2 = (bit  0- 3) - railtype (p2 & 0xF)
  * - p2 = (bit  4)    - set for custom station (p2 & 0x10)
@@ -961,8 +961,8 @@
 
 	/* unpack parameters */
 	direction = p1 & 1;
-	numtracks = (p1 >> 8) & 0xFF;
-	plat_len = (p1 >> 16) & 0xFF;
+	numtracks = GB(p1,  8, 8);
+	plat_len  = GB(p1, 16, 8);
 	/* w = length, h = num_tracks */
 	if (direction) {
 		h_org = plat_len;