#include "core/bitmath_func.hpp"
#include "table/sprites.h"
Go to the source code of this file.
Data Structures | |
struct | EntityIDMapping |
Maps an entity id stored on the map to a GRF file. More... | |
class | OverrideManagerBase |
class | HouseOverrideManager |
class | IndustryOverrideManager |
class | IndustryTileOverrideManager |
Functions | |
uint32 | GetTerrainType (TileIndex tile) |
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) |
uint32 | GetNearbyTileInformation (TileIndex tile) |
Common part of station var 0x67 , house var 0x62, indtile var 0x60, industry var 0x62. | |
static SpriteID | SpriteLayoutPaletteTransform (SpriteID image, SpriteID pal, SpriteID default_pal) |
Applies PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOUR to a palette entry of a sprite layout entry for ground sprites use GroundSpritePaletteTransform Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set when to use the default palette. | |
static SpriteID | GroundSpritePaletteTransform (SpriteID image, SpriteID pal, SpriteID default_pal) |
Applies PALETTE_MODIFIER_COLOUR to a palette entry of a ground sprite Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set when to use the default palette. | |
Variables | |
HouseOverrideManager | _house_mngr |
IndustryOverrideManager | _industry_mngr |
IndustryTileOverrideManager | _industile_mngr |
Definition in file newgrf_commons.h.
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 305 of file newgrf_commons.cpp.
References GetTerrainType(), GetTileSlope(), GetTileType(), GetTreeGround(), IsTileType(), MP_TREES, MP_WATER, and TREE_GROUND_SHORE.
Referenced by GetNearbyIndustryTileInformation(), and HouseGetVariable().
uint32 GetTerrainType | ( | TileIndex | tile | ) |
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 |
Definition at line 275 of file newgrf_commons.cpp.
References _settings_game, GameSettings::game_creation, GetSnowLine(), GetTileZ(), GetTropicZone(), and GameCreationSettings::landscape.
Referenced by GetNearbyTileInformation(), and HouseGetVariable().
static SpriteID GroundSpritePaletteTransform | ( | SpriteID | image, | |
SpriteID | pal, | |||
SpriteID | default_pal | |||
) | [inline, static] |
Applies PALETTE_MODIFIER_COLOUR to a palette entry of a ground sprite Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set when to use the default palette.
image | The sprite to draw | |
pal | The palette from the sprite layout | |
default_pal | The default recolour sprite to use (typically company colour resp. random industry/house colour) |
Definition at line 133 of file newgrf_commons.h.
References HasBit(), and PALETTE_MODIFIER_COLOUR.
Referenced by DrawStationTile().
static SpriteID SpriteLayoutPaletteTransform | ( | SpriteID | image, | |
SpriteID | pal, | |||
SpriteID | default_pal | |||
) | [inline, static] |
Applies PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOUR to a palette entry of a sprite layout entry for ground sprites use GroundSpritePaletteTransform Not useable for OTTD internal spritelayouts from table/xxx_land.h as PALETTE_MODIFIER_TRANSPARENT is only set when to use the default palette.
image | The sprite to draw | |
pal | The palette from the sprite layout | |
default_pal | The default recolour sprite to use (typically company colour resp. random industry/house colour) |
Definition at line 114 of file newgrf_commons.h.
References HasBit(), PALETTE_MODIFIER_COLOUR, and PALETTE_MODIFIER_TRANSPARENT.
Referenced by DrawStationTile().