diff -r d2a6acdbd665 -r 197cb8c6ae17 src/station_cmd.cpp --- a/src/station_cmd.cpp Sun Sep 23 07:37:38 2007 +0000 +++ b/src/station_cmd.cpp Sat Oct 06 22:30:24 2007 +0000 @@ -165,14 +165,14 @@ /* No industry */ if (!IsTileType(tile, MP_INDUSTRY)) return false; - const IndustrySpec *indsp = GetIndustrySpec(GetIndustryByTile(tile)->type); + const Industry *ind = GetIndustryByTile(tile); /* No extractive industry */ - if ((indsp->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false; - - for (uint i = 0; i < lengthof(indsp->produced_cargo); i++) { + if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false; + + for (uint i = 0; i < lengthof(ind->produced_cargo); i++) { /* The industry extracts something non-liquid, i.e. no oil or plastic, so it is a mine */ - if (indsp->produced_cargo[i] != CT_INVALID && (GetCargo(indsp->produced_cargo[i])->classes & CC_LIQUID) == 0) return true; + if (ind->produced_cargo[i] != CT_INVALID && (GetCargo(ind->produced_cargo[i])->classes & CC_LIQUID) == 0) return true; } return false; @@ -208,14 +208,14 @@ /* No industry */ if (!IsTileType(tile, MP_INDUSTRY)) return false; - const IndustrySpec *indsp = GetIndustrySpec(GetIndustryByTile(tile)->type); + const Industry *ind = GetIndustryByTile(tile); /* No extractive industry */ - if ((indsp->life_type & INDUSTRYLIFE_ORGANIC) == 0) return false; - - for (uint i = 0; i < lengthof(indsp->produced_cargo); i++) { + if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_ORGANIC) == 0) return false; + + for (uint i = 0; i < lengthof(ind->produced_cargo); i++) { /* The industry produces wood. */ - if (indsp->produced_cargo[i] != CT_INVALID && GetCargo(indsp->produced_cargo[i])->label == 'WOOD') return true; + if (ind->produced_cargo[i] != CT_INVALID && GetCargo(ind->produced_cargo[i])->label == 'WOOD') return true; } return false; @@ -1732,7 +1732,7 @@ } BEGIN_TILE_LOOP(tile_cur, w, h, tile) { - if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR; + if (!EnsureNoVehicleOnGround(tile_cur)) return CMD_ERROR; if (flags & DC_EXEC) { DeleteAnimatedTile(tile_cur); @@ -2054,7 +2054,7 @@ relocation = GetCustomStationRelocation(statspec, st, ti->tile); - if (HASBIT(statspec->callbackmask, CBM_CUSTOM_LAYOUT)) { + if (HASBIT(statspec->callbackmask, CBM_STATION_SPRITE_LAYOUT)) { uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, st, ti->tile); if (callback != CALLBACK_FAILED) tile = (callback & ~1) + GetRailStationAxis(ti->tile); } @@ -2115,7 +2115,7 @@ HASBIT(_transparent_opt, TO_BUILDINGS) ); } else { - AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y); + AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y, HASBIT(_transparent_opt, TO_BUILDINGS)); } } }