changeset 17775:692e9a02529c draft

(svn r22560) -Codechange: Remove constness from House in ResolverObject.
author terkhen <terkhen@openttd.org>
date Sun, 12 Jun 2011 20:35:37 +0000
parents 16793b6aa177
children 8ca285b0b8e6
files src/newgrf_house.cpp src/newgrf_house.h src/newgrf_spritegroup.h
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -365,7 +365,7 @@
  *
  * Returns a resolver object to be used with feature 07 spritegroups.
  */
-static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex tile, const Town *town)
+static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex tile, Town *town)
 {
 	res->GetRandomBits = HouseGetRandomBits;
 	res->GetTriggers   = HouseGetTriggers;
@@ -390,7 +390,7 @@
 	res->grffile         = (hs != NULL ? hs->grf_prop.grffile : NULL);
 }
 
-uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, const Town *town, TileIndex tile, bool not_yet_constructed, uint8 initial_random_bits)
+uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile, bool not_yet_constructed, uint8 initial_random_bits)
 {
 	ResolverObject object;
 	const SpriteGroup *group;
--- a/src/newgrf_house.h
+++ b/src/newgrf_house.h
@@ -44,7 +44,7 @@
 void AnimateNewHouseTile(TileIndex tile);
 void AnimateNewHouseConstruction(TileIndex tile);
 
-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);
+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);
 
 bool CanDeleteHouse(TileIndex tile);
 
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -336,7 +336,7 @@
 		} station;
 		struct {
 			TileIndex tile;
-			const Town *town;
+			Town *town;                    ///< Town of this house
 			HouseID house_id;
 			uint16 initial_random_bits;    ///< Random bits during construction checks
 			bool not_yet_constructed;      ///< True for construction check