Implementation of the class OverrideManagerBase and its descendance, present and futur. More...
#include "stdafx.h"
#include "landscape.h"
#include "house.h"
#include "industrytype.h"
#include "newgrf.h"
#include "clear_map.h"
#include "station_map.h"
#include "tree_map.h"
#include "tunnelbridge_map.h"
#include "newgrf_object.h"
#include "genworld.h"
#include "newgrf_spritegroup.h"
Go to the source code of this file.
Functions | |
uint32 | GetTerrainType (TileIndex tile, TileContext context) |
Function used by houses (and soon industries) to get information on type of "terrain" the tile it is queries sits on. | |
TileIndex | GetNearbyTile (byte parameter, TileIndex tile, bool signed_offsets) |
Get the tile at the given offset. | |
uint32 | GetNearbyTileInformation (TileIndex tile) |
Common part of station var 0x67, house var 0x62, indtile var 0x60, industry var 0x62. |
Implementation of the class OverrideManagerBase and its descendance, present and futur.
Definition in file newgrf_commons.cpp.
Get the tile at the given offset.
parameter | The NewGRF "encoded" offset. | |
tile | The tile to base the offset from. | |
signed_offsets | Whether the offsets are to be interpreted as signed or not. |
Definition at line 405 of file newgrf_commons.cpp.
References AXIS_Y, GB(), GetRailStationAxis(), HasStationTileRail(), Swap(), TILE_MASK, and TileDiffXY().
Referenced by GetNearbyAirportTileInformation(), GetNearbyIndustryTileInformation(), GetNearbyObjectTileInformation(), HouseGetVariable(), IndustryGetVariable(), and ObjectGetVariable().
uint32 GetNearbyTileInformation | ( | TileIndex | tile | ) |
Common part of station var 0x67, house var 0x62, indtile var 0x60, industry var 0x62.
tile | the tile of interest. |
Definition at line 426 of file newgrf_commons.cpp.
References GetTerrainType(), GetTileSlope(), GetTileType(), GetTreeGround(), IsTileType(), MP_TREES, MP_WATER, and TREE_GROUND_SHORE.
Referenced by GetNearbyAirportTileInformation(), GetNearbyIndustryTileInformation(), GetNearbyObjectTileInformation(), and HouseGetVariable().
uint32 GetTerrainType | ( | TileIndex | tile, | |
TileContext | context | |||
) |
Function used by houses (and soon industries) to get information on type of "terrain" the tile it is queries sits on.
tile | TileIndex of the tile been queried | |
context | The context of the tile. |
Definition at line 331 of file newgrf_commons.cpp.
References _generating_world, _settings_game, GameSettings::game_creation, GetBridgeHeight(), GetClearDensity(), GetSnowLine(), GetTileMaxZ(), GetTileType(), GetTileZ(), GetTreeDensity(), GetTreeGround(), GetTropicZone(), HasTunnelBridgeSnowOrDesert(), IsOnSnow(), IsSnowTile(), GameCreationSettings::landscape, MP_CLEAR, MP_HOUSE, MP_INDUSTRY, MP_OBJECT, MP_RAILWAY, MP_ROAD, MP_STATION, MP_TREES, MP_TUNNELBRIDGE, MP_VOID, MP_WATER, RAIL_GROUND_HALF_SNOW, RAIL_GROUND_ICE_DESERT, TCX_ON_BRIDGE, TCX_UPPER_HALFTILE, TREE_GROUND_ROUGH_SNOW, and TREE_GROUND_SNOW_DESERT.
Referenced by GetNearbyTileInformation(), HouseGetVariable(), and ObjectGetVariable().