File diff r12233:9d0861714103 → r12234:fd1a494e7620
src/misc_gui.cpp
Show inline comments
 
@@ -99,47 +99,48 @@ public:
 

	
 
		if (!StrEmpty(this->landinfo_data[LAND_INFO_MULTICENTER_LINE])) {
 
			SetDParamStr(0, this->landinfo_data[LAND_INFO_MULTICENTER_LINE]);
 
			DrawStringMultiLine(this->widget[LIW_BACKGROUND].left + 2, this->widget[LIW_BACKGROUND].right - 2, y, y + 22, STR_JUST_RAW_STRING, TC_FROMSTRING, SA_CENTER);
 
		}
 
	}
 

	
 
	LandInfoWindow(TileIndex tile) : Window(&_land_info_desc) {
 
		Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
 

	
 
		/* Because build_date is not set yet in every TileDesc, we make sure it is empty */
 
		TileDesc td;
 
		AcceptedCargo ac;
 

	
 
		td.build_date = INVALID_DATE;
 

	
 
		/* Most tiles have only one owner, but
 
		 *  - drivethrough roadstops can be build on town owned roads (up to 2 owners) and
 
		 *  - roads can have up to four owners (railroad, road, tram, 3rd-roadtype "highway").
 
		 */
 
		td.owner_type[0] = STR_LAND_AREA_INFORMATION_OWNER; // At least one owner is displayed, though it might be "N/A".
 
		td.owner_type[1] = STR_NULL;       // STR_NULL results in skipping the owner
 
		td.owner_type[2] = STR_NULL;
 
		td.owner_type[3] = STR_NULL;
 
		td.owner[0] = OWNER_NONE;
 
		td.owner[1] = OWNER_NONE;
 
		td.owner[2] = OWNER_NONE;
 
		td.owner[3] = OWNER_NONE;
 

	
 
		td.station_class = STR_NULL;
 
		td.station_name = STR_NULL;
 

	
 
		td.grf = NULL;
 

	
 
		GetAcceptedCargo(tile, ac);
 
		AcceptedCargo ac;
 
		memset(ac, 0, sizeof(AcceptedCargo));
 
		AddAcceptedCargo(tile, ac);
 
		GetTileDesc(tile, &td);
 

	
 
		uint line_nr = 0;
 

	
 
		/* Tiletype */
 
		SetDParam(0, td.dparam[0]);
 
		GetString(this->landinfo_data[line_nr], td.str, lastof(this->landinfo_data[line_nr]));
 
		line_nr++;
 

	
 
		/* Up to four owners */
 
		for (uint i = 0; i < 4; i++) {
 
			if (td.owner_type[i] == STR_NULL) continue;