equal
deleted
inserted
replaced
2131 DiagDirection dir = DirToDiagDir(v->direction); |
2131 DiagDirection dir = DirToDiagDir(v->direction); |
2132 |
2132 |
2133 x &= 0xF; |
2133 x &= 0xF; |
2134 y &= 0xF; |
2134 y &= 0xF; |
2135 |
2135 |
2136 if (DiagDirToAxis(dir) != AXIS_X) intswap(x, y); |
2136 if (DiagDirToAxis(dir) != AXIS_X) Swap(x, y); |
2137 if (y == TILE_SIZE / 2) { |
2137 if (y == TILE_SIZE / 2) { |
2138 if (dir != DIAGDIR_SE && dir != DIAGDIR_SW) x = TILE_SIZE - 1 - x; |
2138 if (dir != DIAGDIR_SE && dir != DIAGDIR_SW) x = TILE_SIZE - 1 - x; |
2139 if (x == 12) return VETSB_ENTERED_STATION | (station_id << VETS_STATION_ID_OFFSET); /* enter station */ |
2139 if (x == 12) return VETSB_ENTERED_STATION | (station_id << VETS_STATION_ID_OFFSET); /* enter station */ |
2140 if (x < 12) { |
2140 if (x < 12) { |
2141 uint16 spd; |
2141 uint16 spd; |
2816 // this means it's an oldstyle savegame without support for nonuniform stations |
2816 // this means it's an oldstyle savegame without support for nonuniform stations |
2817 if (st->train_tile != 0 && st->trainst_h == 0) { |
2817 if (st->train_tile != 0 && st->trainst_h == 0) { |
2818 uint w = GB(st->trainst_w, 4, 4); |
2818 uint w = GB(st->trainst_w, 4, 4); |
2819 uint h = GB(st->trainst_w, 0, 4); |
2819 uint h = GB(st->trainst_w, 0, 4); |
2820 |
2820 |
2821 if (GetRailStationAxis(st->train_tile) == AXIS_Y) uintswap(w, h); |
2821 if (GetRailStationAxis(st->train_tile) != AXIS_X) Swap(w, h); |
2822 st->trainst_w = w; |
2822 st->trainst_w = w; |
2823 st->trainst_h = h; |
2823 st->trainst_h = h; |
2824 } |
2824 } |
2825 } |
2825 } |
2826 |
2826 |