(svn r12818) -Codechange: make callbacks 31 and 37 behave like they do in TTDP according to frosch's survey.

This commit is contained in:
rubidium
2008-04-21 13:45:03 +00:00
parent a40bba8bac
commit 22140d82c6
5 changed files with 10 additions and 16 deletions

View File

@@ -78,8 +78,8 @@ static StringID GetCargoSuffix(uint cargo, Industry *ind, IndustryType ind_type,
{
if (HasBit(indspec->callback_flags, CBM_IND_CARGO_SUFFIX)) {
bool fund = ind == NULL;
uint8 callback = GetIndustryCallback(CBID_INDUSTRY_CARGO_SUFFIX, 0, ((!fund) ? 1 << 8 : 0) | cargo, ind, ind_type, (!fund) ? ind->xy : INVALID_TILE);
if (callback != 0xFF) return GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback);
uint16 callback = GetIndustryCallback(CBID_INDUSTRY_CARGO_SUFFIX, 0, ((!fund) ? 1 << 8 : 0) | cargo, ind, ind_type, (!fund) ? ind->xy : INVALID_TILE);
if (GB(callback, 0, 8) != 0xFF) return GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback);
}
return STR_EMPTY;
}