mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r19565) -Fix: some NewGRF callbacks were named incorrectly
This commit is contained in:
parent
cf981c5401
commit
bc925c0016
@ -382,7 +382,7 @@ static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh)
|
|||||||
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
|
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
|
||||||
const IndustryTileSpec *indts = GetIndustryTileSpec(gfx);
|
const IndustryTileSpec *indts = GetIndustryTileSpec(gfx);
|
||||||
if (indts->grf_prop.spritegroup != NULL && HasBit(indts->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) {
|
if (indts->grf_prop.spritegroup != NULL && HasBit(indts->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) {
|
||||||
uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
uint32 callback_res = GetIndustryTileCallback(CBID_INDTILE_DRAW_FOUNDATIONS, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
||||||
if (callback_res == 0) return FOUNDATION_NONE;
|
if (callback_res == 0) return FOUNDATION_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2488,7 +2488,7 @@ static CommandCost TerraformTile_Industry(TileIndex tile, DoCommandFlag flags, u
|
|||||||
/* Call callback 3C 'disable autosloping for industry tiles'. */
|
/* Call callback 3C 'disable autosloping for industry tiles'. */
|
||||||
if (HasBit(itspec->callback_mask, CBM_INDT_AUTOSLOPE)) {
|
if (HasBit(itspec->callback_mask, CBM_INDT_AUTOSLOPE)) {
|
||||||
/* If the callback fails, allow autoslope. */
|
/* If the callback fails, allow autoslope. */
|
||||||
uint16 res = GetIndustryTileCallback(CBID_INDUSTRY_AUTOSLOPE, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
uint16 res = GetIndustryTileCallback(CBID_INDTILE_AUTOSLOPE, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
||||||
if ((res == 0) || (res == CALLBACK_FAILED)) return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
|
if ((res == 0) || (res == CALLBACK_FAILED)) return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
|
||||||
} else {
|
} else {
|
||||||
/* allow autoslope */
|
/* allow autoslope */
|
||||||
|
@ -128,7 +128,7 @@ enum CallbackID {
|
|||||||
CBID_INDTILE_SHAPE_CHECK = 0x2F, // 15 bit callback
|
CBID_INDTILE_SHAPE_CHECK = 0x2F, // 15 bit callback
|
||||||
|
|
||||||
/** Called to determine the type (if any) of foundation to draw for industry tile. */
|
/** Called to determine the type (if any) of foundation to draw for industry tile. */
|
||||||
CBID_INDUSTRY_DRAW_FOUNDATIONS = 0x30, // 15 bit callback
|
CBID_INDTILE_DRAW_FOUNDATIONS = 0x30, // 15 bit callback
|
||||||
|
|
||||||
/** Called when the company (or AI) tries to start or stop a vehicle. Mainly
|
/** Called when the company (or AI) tries to start or stop a vehicle. Mainly
|
||||||
* used for preventing a vehicle from leaving the depot. */
|
* used for preventing a vehicle from leaving the depot. */
|
||||||
@ -166,7 +166,7 @@ enum CallbackID {
|
|||||||
CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B, // 15 bit callback
|
CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B, // 15 bit callback
|
||||||
|
|
||||||
/** Called to determine if industry can alter the ground below industry tile */
|
/** Called to determine if industry can alter the ground below industry tile */
|
||||||
CBID_INDUSTRY_AUTOSLOPE = 0x3C, // 15 bit callback
|
CBID_INDTILE_AUTOSLOPE = 0x3C, // 15 bit callback
|
||||||
|
|
||||||
/** Called to determine if the industry can still accept or refuse more cargo arrival */
|
/** Called to determine if the industry can still accept or refuse more cargo arrival */
|
||||||
CBID_INDUSTRY_REFUSE_CARGO = 0x3D, // 15 bit callback
|
CBID_INDUSTRY_REFUSE_CARGO = 0x3D, // 15 bit callback
|
||||||
|
@ -214,7 +214,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
|
|||||||
bool draw_old_one = true;
|
bool draw_old_one = true;
|
||||||
if (HasBit(inds->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) {
|
if (HasBit(inds->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) {
|
||||||
/* Called to determine the type (if any) of foundation to draw for industry tile */
|
/* Called to determine the type (if any) of foundation to draw for industry tile */
|
||||||
uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile);
|
uint32 callback_res = GetIndustryTileCallback(CBID_INDTILE_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile);
|
||||||
draw_old_one = (callback_res != 0);
|
draw_old_one = (callback_res != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user