From 9982b5fd00620345b3d905407acf6ad21ec5c6c9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 26 Aug 2010 16:48:32 +0000 Subject: (svn r20624) -Codechange: some constifying for NewGRF house --- src/newgrf_house.cpp | 4 ++-- src/newgrf_house.h | 2 +- src/newgrf_spritegroup.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 94fc02d1e..4509cbeac 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -369,7 +369,7 @@ static const SpriteGroup *HouseResolveReal(const ResolverObject *object, const R * * Returns a resolver object to be used with feature 07 spritegroups. */ -static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex tile, Town *town) +static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex tile, const Town *town) { res->GetRandomBits = HouseGetRandomBits; res->GetTriggers = HouseGetTriggers; @@ -394,7 +394,7 @@ static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex ti res->grffile = (hs != NULL ? hs->grf_prop.grffile : NULL); } -uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile, bool not_yet_constructed, uint8 initial_random_bits) +uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, const Town *town, TileIndex tile, bool not_yet_constructed, uint8 initial_random_bits) { ResolverObject object; const SpriteGroup *group; diff --git a/src/newgrf_house.h b/src/newgrf_house.h index 7a5fc05b8..7a2b00acf 100644 --- a/src/newgrf_house.h +++ b/src/newgrf_house.h @@ -44,7 +44,7 @@ void DrawNewHouseTile(TileInfo *ti, HouseID house_id); void AnimateNewHouseTile(TileIndex tile); void ChangeHouseAnimationFrame(const struct GRFFile *file, TileIndex tile, uint16 callback_result); -uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile, bool not_yet_constructed = false, uint8 initial_random_bits = 0); +uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, const Town *town, TileIndex tile, bool not_yet_constructed = false, uint8 initial_random_bits = 0); bool CanDeleteHouse(TileIndex tile); diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index 7f220f7c5..d61917acf 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -321,7 +321,7 @@ struct ResolverObject { } station; struct { TileIndex tile; - Town *town; + const Town *town; HouseID house_id; uint16 initial_random_bits; ///< Random bits during construction checks bool not_yet_constructed; ///< True for construction check -- cgit v1.2.3-54-g00ecf