File diff r27798:d7f49906d8cf → r27799:ab7d36d10264
src/newgrf_object.cpp
Show inline comments
 
@@ -296,25 +296,25 @@ static uint32_t GetCountAndDistanceOfClo
 
				goto unhandled;
 
		}
 

	
 
		/* If there's an invalid tile, then we don't have enough information at all. */
 
		if (!IsValidTile(this->tile)) goto unhandled;
 
	} else {
 
		t = this->obj->town;
 
	}
 

	
 
	switch (variable) {
 
		/* Relative position. */
 
		case 0x40: {
 
			uint offset = this->tile - this->obj->location.tile;
 
			TileIndex offset = this->tile - this->obj->location.tile;
 
			uint offset_x = TileX(offset);
 
			uint offset_y = TileY(offset);
 
			return offset_y << 20 | offset_x << 16 | offset_y << 8 | offset_x;
 
		}
 

	
 
		/* Tile information. */
 
		case 0x41: return GetTileSlope(this->tile) << 8 | GetTerrainType(this->tile);
 

	
 
		/* Construction date */
 
		case 0x42: return static_cast<int32_t>(this->obj->build_date);
 

	
 
		/* Animation counter */