Changeset - r17767:38801289f9e3
[Not reviewed]
master
0 5 0
terkhen - 13 years ago 2011-06-12 20:37:26
terkhen@openttd.org
(svn r22562) -Codechange: Remove constness from TownGetVariable.
5 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/newgrf_house.cpp
Show inline comments
 
@@ -251,13 +251,13 @@ static uint32 GetDistanceFromNearbyHouse
 
 * HouseGetVariable():
 
 *
 
 * Used by the resolver to get values for feature 07 deterministic spritegroups.
 
 */
 
static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
 
{
 
	const Town *town = object->u.house.town;
 
	Town *town = object->u.house.town;
 
	TileIndex tile   = object->u.house.tile;
 
	HouseID house_id = object->u.house.house_id;
 

	
 
	if (object->scope == VSG_SCOPE_PARENT) {
 
		return TownGetVariable(variable, parameter, available, town);
 
	}
src/newgrf_industries.cpp
Show inline comments
 
@@ -177,13 +177,13 @@ uint32 IndustryGetVariable(const Resolve
 
	IndustryType type = object->u.industry.type;
 
	const IndustrySpec *indspec = GetIndustrySpec(type);
 

	
 
	/* Shall the variable get resolved in parent scope and are we not yet in parent scope? */
 
	if (object->u.industry.gfx == INVALID_INDUSTRYTILE && object->scope == VSG_SCOPE_PARENT) {
 
		/* Pass the request on to the town of the industry */
 
		const Town *t;
 
		Town *t;
 

	
 
		if (industry != NULL) {
 
			t = industry->town;
 
		} else if (tile != INVALID_TILE) {
 
			t = ClosestTownFromTile(tile, UINT_MAX);
 
		} else {
src/newgrf_station.cpp
Show inline comments
 
@@ -261,13 +261,13 @@ static uint32 StationGetVariable(const R
 
{
 
	const BaseStation *st = object->u.station.st;
 
	TileIndex tile = object->u.station.tile;
 

	
 
	if (object->scope == VSG_SCOPE_PARENT) {
 
		/* Pass the request on to the town of the station */
 
		const Town *t;
 
		Town *t;
 

	
 
		if (st != NULL) {
 
			t = st->town;
 
		} else if (tile != INVALID_TILE) {
 
			t = ClosestTownFromTile(tile, UINT_MAX);
 
		} else {
src/newgrf_town.cpp
Show inline comments
 
@@ -18,13 +18,13 @@
 
 * @param variable that is queried
 
 * @param parameter unused
 
 * @param available will return false if ever the variable asked for does not exist
 
 * @param t is of course the town we are inquiring
 
 * @return the value stored in the corresponding variable
 
 */
 
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t)
 
uint32 TownGetVariable(byte variable, byte parameter, bool *available, Town *t)
 
{
 
	switch (variable) {
 
		/* Larger towns */
 
		case 0x40:
 
			if (_settings_game.economy.larger_towns == 0) return 2;
 
			if (t->larger_town) return 1;
src/newgrf_town.h
Show inline comments
 
@@ -14,9 +14,9 @@
 

	
 
#include "town_type.h"
 

	
 
/* Currently there is no direct town resolver; we only need to get town
 
 * variable results from inside stations, house tiles and industry tiles. */
 

	
 
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t);
 
uint32 TownGetVariable(byte variable, byte parameter, bool *available, Town *t);
 

	
 
#endif /* NEWGRF_TOWN_H */
0 comments (0 inline, 0 general)