src/newgrf.cpp
changeset 10042 b77001494a91
parent 10041 9b8ed66c3cf4
child 10043 7f8f7df729d3
equal deleted inserted replaced
10041:9b8ed66c3cf4 10042:b77001494a91
  3066 		for (uint i = 0; i < idcount; i++) {
  3066 		for (uint i = 0; i < idcount; i++) {
  3067 			StationSpec *statspec = _cur_grffile->stations[stations[i]];
  3067 			StationSpec *statspec = _cur_grffile->stations[stations[i]];
  3068 
  3068 
  3069 			if (statspec == NULL) {
  3069 			if (statspec == NULL) {
  3070 				grfmsg(1, "StationMapSpriteGroup: Station with ID 0x%02X does not exist, skipping", stations[i]);
  3070 				grfmsg(1, "StationMapSpriteGroup: Station with ID 0x%02X does not exist, skipping", stations[i]);
  3071 				return;
  3071 				continue;
  3072 			}
  3072 			}
  3073 
  3073 
  3074 			statspec->spritegroup[ctype] = _cur_grffile->spritegroups[groupid];
  3074 			statspec->spritegroup[ctype] = _cur_grffile->spritegroups[groupid];
  3075 		}
  3075 		}
  3076 	}
  3076 	}
  3110 
  3110 
  3111 	for (uint i = 0; i < idcount; i++) {
  3111 	for (uint i = 0; i < idcount; i++) {
  3112 		HouseSpec *hs = _cur_grffile->housespec[houses[i]];
  3112 		HouseSpec *hs = _cur_grffile->housespec[houses[i]];
  3113 
  3113 
  3114 		if (hs == NULL) {
  3114 		if (hs == NULL) {
  3115 			grfmsg(1, "TownHouseMapSpriteGroup: Too many houses defined, skipping");
  3115 			grfmsg(1, "TownHouseMapSpriteGroup: House %d undefined, skipping.", houses[i]);
  3116 			return;
  3116 			continue;
  3117 		}
  3117 		}
  3118 
  3118 
  3119 		hs->spritegroup = _cur_grffile->spritegroups[groupid];
  3119 		hs->spritegroup = _cur_grffile->spritegroups[groupid];
  3120 	}
  3120 	}
  3121 }
  3121 }
  3136 
  3136 
  3137 	for (uint i = 0; i < idcount; i++) {
  3137 	for (uint i = 0; i < idcount; i++) {
  3138 		IndustrySpec *indsp = _cur_grffile->industryspec[industries[i]];
  3138 		IndustrySpec *indsp = _cur_grffile->industryspec[industries[i]];
  3139 
  3139 
  3140 		if (indsp == NULL) {
  3140 		if (indsp == NULL) {
  3141 			grfmsg(1, "IndustryMapSpriteGroup: Too many industries defined, skipping");
  3141 			grfmsg(1, "IndustryMapSpriteGroup: Industry %d undefined, skipping", industries[i]);
  3142 			return;
  3142 			continue;
  3143 		}
  3143 		}
  3144 
  3144 
  3145 		indsp->grf_prop.spritegroup = _cur_grffile->spritegroups[groupid];
  3145 		indsp->grf_prop.spritegroup = _cur_grffile->spritegroups[groupid];
  3146 	}
  3146 	}
  3147 }
  3147 }
  3162 
  3162 
  3163 	for (uint i = 0; i < idcount; i++) {
  3163 	for (uint i = 0; i < idcount; i++) {
  3164 		IndustryTileSpec *indtsp = _cur_grffile->indtspec[indtiles[i]];
  3164 		IndustryTileSpec *indtsp = _cur_grffile->indtspec[indtiles[i]];
  3165 
  3165 
  3166 		if (indtsp == NULL) {
  3166 		if (indtsp == NULL) {
  3167 			grfmsg(1, "IndustrytileMapSpriteGroup: Too many industry tiles defined, skipping");
  3167 			grfmsg(1, "IndustrytileMapSpriteGroup: Industry tile %d undefined, skipping", indtiles[i]);
  3168 			return;
  3168 			continue;
  3169 		}
  3169 		}
  3170 
  3170 
  3171 		indtsp->grf_prop.spritegroup = _cur_grffile->spritegroups[groupid];
  3171 		indtsp->grf_prop.spritegroup = _cur_grffile->spritegroups[groupid];
  3172 	}
  3172 	}
  3173 }
  3173 }