12 #include "../stdafx.h" 
   13 #include "../waypoint_base.h" 
   14 #include "../newgrf_station.h" 
   15 #include "../vehicle_base.h" 
   17 #include "../newgrf.h" 
   19 #include "table/strings.h" 
   23 #include "../safeguards.h" 
   53   if (!o->
IsType(OT_GOTO_WAYPOINT)) 
return;
 
   75       if (wp->delete_ctr != 0) 
continue; 
 
   78       _m[wp->xy].
m2 = (StationID)wp->index;
 
  104     new_wp->
town       = wp->town;
 
  106     new_wp->
name       = wp->name;
 
  109     new_wp->
owner      = wp->owner;
 
  111     new_wp->
string_id = STR_SV_STNAME_WAYPOINT;
 
  125       if (wp->spec != NULL) {
 
  128       new_wp->
rect.BeforeAddTile(t, StationRect::ADD_FORCE);
 
  131     wp->new_index = new_wp->
index;
 
  136   FOR_ALL_ORDER_LISTS(ol) {
 
  149   _old_waypoints.
Reset();
 
  152 static const SaveLoad _old_waypoint_desc[] = {
 
  172 static void Load_WAYP()
 
  175   _old_waypoints.
Clear();
 
  181     memset(wp, 0, 
sizeof(*wp));
 
  188 static void Ptrs_WAYP()
 
  194       wp->town_cn = (wp->string_id & 0xC000) == 0xC000 ? (wp->string_id >> 8) & 0x3F : 0;
 
  204         _old_waypoints.
Clear();
 
  215 extern const ChunkHandler _waypoint_chunk_handlers[] = {
 
  216   { 
'CHKP', NULL, Load_WAYP, Ptrs_WAYP, NULL, CH_ARRAY | 
CH_LAST},