ttd.c
changeset 959 e6a3bbda610f
parent 950 165341d74973
child 961 e9abf6f087f8
equal deleted inserted replaced
958:a6217005ff41 959:e6a3bbda610f
   265 	} else {
   265 	} else {
   266 		// Extract the driver name and put parameter list in parm
   266 		// Extract the driver name and put parameter list in parm
   267 		ttd_strlcpy(buffer, name, sizeof(buffer));
   267 		ttd_strlcpy(buffer, name, sizeof(buffer));
   268 		parm = strchr(buffer, ':');
   268 		parm = strchr(buffer, ':');
   269 		if (parm) {
   269 		if (parm) {
   270 			int np = 0;
   270 			uint np = 0;
   271 			// Tokenize the parm.
   271 			// Tokenize the parm.
   272 			do {
   272 			do {
   273 				*parm++ = 0;
   273 				*parm++ = 0;
   274 				if (np < lengthof(parms) - 1)
   274 				if (np < lengthof(parms) - 1)
   275 					parms[np++] = parm;
   275 					parms[np++] = parm;
  1241 
  1241 
  1242 // up to revision 1413, the invisible tiles at the southern border have not been MP_VOID
  1242 // up to revision 1413, the invisible tiles at the southern border have not been MP_VOID
  1243 // even though they should have. This is fixed by this function
  1243 // even though they should have. This is fixed by this function
  1244 void UpdateVoidTiles()
  1244 void UpdateVoidTiles()
  1245 {
  1245 {
  1246 	int i;
  1246 	uint i;
  1247 	// create void tiles on the border
  1247 	// create void tiles on the border
  1248 	for (i = 0; i != MapMaxY(); i++)
  1248 	for (i = 0; i != MapMaxY(); i++)
  1249 		_map_type_and_height[ i * MapSizeX() + MapMaxY() ] = MP_VOID << 4;
  1249 		_map_type_and_height[ i * MapSizeX() + MapMaxY() ] = MP_VOID << 4;
  1250 	memset(_map_type_and_height + MapMaxY() * MapSizeX(), MP_VOID << 4, MapSizeX());
  1250 	memset(_map_type_and_height + MapMaxY() * MapSizeX(), MP_VOID << 4, MapSizeX());
  1251 }
  1251 }