|
OpenTTD Source
1.10.0-RC1
|
Handling of NewGRF canals. More...
Go to the source code of this file.
Data Structures | |
| struct | WaterFeature |
| Information about a water feature. More... | |
Enumerations | |
| enum | CanalFeatureFlag { CFF_HAS_FLAT_SPRITE = 0 } |
| Flags controlling the display of canals. More... | |
Functions | |
| SpriteID | GetCanalSprite (CanalFeature feature, TileIndex tile) |
| Lookup the base sprite to use for a canal. More... | |
| uint | GetCanalSpriteOffset (CanalFeature feature, TileIndex tile, uint cur_offset) |
| Get the new sprite offset for a water tile. More... | |
Variables | |
| WaterFeature | _water_feature [CF_END] |
| Table of canal 'feature' sprite groups. | |
Handling of NewGRF canals.
Definition in file newgrf_canal.h.
| enum CanalFeatureFlag |
Flags controlling the display of canals.
| Enumerator | |
|---|---|
| CFF_HAS_FLAT_SPRITE | Additional flat ground sprite in the beginning. |
Definition at line 17 of file newgrf_canal.h.
| SpriteID GetCanalSprite | ( | CanalFeature | feature, |
| TileIndex | tile | ||
| ) |
Lookup the base sprite to use for a canal.
| feature | Which canal feature we want. |
| tile | Tile index of canal, if appropriate. |
0 if none. Definition at line 150 of file newgrf_canal.cpp.
References SpriteGroup::Resolve().
| uint GetCanalSpriteOffset | ( | CanalFeature | feature, |
| TileIndex | tile, | ||
| uint | cur_offset | ||
| ) |
Get the new sprite offset for a water tile.
| tile | Tile index of the canal/water tile. |
| feature | For which feature to get the new sprite offset. |
| cur_offset | Current sprite offset. |
Definition at line 181 of file newgrf_canal.cpp.
References CALLBACK_FAILED, CBID_CANALS_SPRITE_OFFSET, CBM_CANAL_SPRITE_OFFSET, GetCanalCallback(), and HasBit().