summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-05 21:01:02 +0000
committerrubidium <rubidium@openttd.org>2010-04-05 21:01:02 +0000
commitbc925c0016e98f09d2fcef582d68ab8e59060d73 (patch)
tree31ba11dafb1c6cc04165b7fcd3e5984a4fbcd2be
parentcf981c540129dcabd44104f95d6751c029ddc02f (diff)
downloadopenttd-bc925c0016e98f09d2fcef582d68ab8e59060d73.tar.xz
(svn r19565) -Fix: some NewGRF callbacks were named incorrectly
-rw-r--r--src/industry_cmd.cpp4
-rw-r--r--src/newgrf_callbacks.h4
-rw-r--r--src/newgrf_industrytiles.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index bbf000ba6..f25ada8c3 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -382,7 +382,7 @@ static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh)
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
const IndustryTileSpec *indts = GetIndustryTileSpec(gfx);
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;
}
}
@@ -2488,7 +2488,7 @@ static CommandCost TerraformTile_Industry(TileIndex tile, DoCommandFlag flags, u
/* Call callback 3C 'disable autosloping for industry tiles'. */
if (HasBit(itspec->callback_mask, CBM_INDT_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]);
} else {
/* allow autoslope */
diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h
index ed8cb1029..0513907a3 100644
--- a/src/newgrf_callbacks.h
+++ b/src/newgrf_callbacks.h
@@ -128,7 +128,7 @@ enum CallbackID {
CBID_INDTILE_SHAPE_CHECK = 0x2F, // 15 bit callback
/** 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
* used for preventing a vehicle from leaving the depot. */
@@ -166,7 +166,7 @@ enum CallbackID {
CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B, // 15 bit callback
/** 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 */
CBID_INDUSTRY_REFUSE_CARGO = 0x3D, // 15 bit callback
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 26905c004..bc07ed72a 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -214,7 +214,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
bool draw_old_one = true;
if (HasBit(inds->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) {
/* 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);
}