diff -r 5c98ae4cf541 -r 2ca6d1624e6d strings.c --- a/strings.c Thu Mar 24 15:15:06 2005 +0000 +++ b/strings.c Thu Mar 24 17:03:37 2005 +0000 @@ -9,6 +9,7 @@ #include "vehicle.h" #include "news.h" #include "screenshot.h" +#include "waypoint.h" static char *StationGetSpecialString(char *buff); static char *GetSpecialTownNameString(char *buff, int ind); @@ -545,14 +546,14 @@ } case 0x9D: { // {WAYPOINT} - Waypoint *cp = &_waypoints[GetDParam(0)]; + Waypoint *wp = GetWaypoint(GetDParam(0)); StringID str; int idx; - if (~cp->town_or_string & 0xC000) { + if (wp->string != STR_NULL) { GetParamInt32(); // skip it - str = cp->town_or_string; + str = wp->string; } else { - idx = (cp->town_or_string >> 8) & 0x3F; + idx = wp->town_cn; if (idx == 0) { str = STR_WAYPOINTNAME_CITY; } else { @@ -560,7 +561,7 @@ SetDParam(1, idx + 1); str = STR_WAYPOINTNAME_CITY_SERIAL; } - SetDParam(0, cp->town_or_string & 0xFF); + SetDParam(0, wp->town_index); } buff = GetString(buff, str);