station_cmd.c
changeset 2642 1d79b44ccbc9
parent 2640 86da958243fd
child 2643 f1fec6d1559a
equal deleted inserted replaced
2641:c94c811ffcc6 2642:1d79b44ccbc9
  3014 		st = GetStation(index);
  3014 		st = GetStation(index);
  3015 		SaveLoad_STNS(st);
  3015 		SaveLoad_STNS(st);
  3016 
  3016 
  3017 		// this means it's an oldstyle savegame without support for nonuniform stations
  3017 		// this means it's an oldstyle savegame without support for nonuniform stations
  3018 		if (st->train_tile != 0 && st->trainst_h == 0) {
  3018 		if (st->train_tile != 0 && st->trainst_h == 0) {
  3019 			int w = st->trainst_w >> 4;
  3019 			int w = GB(st->trainst_w, 4, 4);
  3020 			int h = st->trainst_w & 0xF;
  3020 			int h = GB(st->trainst_w, 0, 4);
  3021 
  3021 
  3022 			if (_m[st->train_tile].m5 & 1) intswap(w, h);
  3022 			if (_m[st->train_tile].m5 & 1) intswap(w, h);
  3023 			st->trainst_w = w;
  3023 			st->trainst_w = w;
  3024 			st->trainst_h = h;
  3024 			st->trainst_h = h;
  3025 		}
  3025 		}