1286 DoStartupNewPlayer(false); |
1286 DoStartupNewPlayer(false); |
1287 |
1287 |
1288 DoZoomInOutWindow(ZOOM_NONE, w); // update button status |
1288 DoZoomInOutWindow(ZOOM_NONE, w); // update button status |
1289 MarkWholeScreenDirty(); |
1289 MarkWholeScreenDirty(); |
1290 |
1290 |
1291 /* From this version on there can be multiple road stops of the same type per |
|
1292 * station. Convert the existing stops to the new internal data structure. |
|
1293 */ |
|
1294 for (TileIndex t = 0; t < map_size; t++) { |
1291 for (TileIndex t = 0; t < map_size; t++) { |
1295 switch (GetTileType(t)) { |
1292 switch (GetTileType(t)) { |
1296 case MP_STATION: |
1293 case MP_STATION: { |
|
1294 Station *st = GetStationByTile(t); |
|
1295 |
|
1296 st->rect.BeforeAddTile(t, StationRect::ADD_FORCE); |
|
1297 |
1297 switch (GetStationType(t)) { |
1298 switch (GetStationType(t)) { |
1298 case STATION_TRUCK: |
1299 case STATION_TRUCK: |
1299 case STATION_BUS: |
1300 case STATION_BUS: |
1300 if (CheckSavegameVersion(6)) { |
1301 if (CheckSavegameVersion(6)) { |
|
1302 /* From this version on there can be multiple road stops of the |
|
1303 * same type per station. Convert the existing stops to the new |
|
1304 * internal data structure. */ |
1301 RoadStop *rs = new RoadStop(t); |
1305 RoadStop *rs = new RoadStop(t); |
1302 if (rs == NULL) error("Too many road stops in savegame"); |
1306 if (rs == NULL) error("Too many road stops in savegame"); |
1303 |
1307 |
1304 Station *st = GetStationByTile(t); |
|
1305 RoadStop **head = |
1308 RoadStop **head = |
1306 IsTruckStop(t) ? &st->truck_stops : &st->bus_stops; |
1309 IsTruckStop(t) ? &st->truck_stops : &st->bus_stops; |
1307 *head = rs; |
1310 *head = rs; |
1308 } |
1311 } |
1309 break; |
1312 break; |