OpenTTD Source: src/newgrf/newgrf_act3.cpp File Reference

OpenTTD Source 15.0-RC2

Data Structures | Functions
newgrf_act3.cpp File Reference

NewGRF Action 0x03 handler. More...

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../house.h"`
`#include "../newgrf_engine.h"`
`#include "../newgrf_badge.h"`
`#include "../newgrf_badge_type.h"`
`#include "../newgrf_cargo.h"`
`#include "../newgrf_house.h"`
`#include "../newgrf_station.h"`
`#include "../industrytype.h"`
`#include "../newgrf_canal.h"`
`#include "../newgrf_airporttiles.h"`
`#include "../newgrf_airport.h"`
`#include "../newgrf_object.h"`
`#include "../error.h"`
`#include "../vehicle_base.h"`
`#include "../road.h"`
`#include "../newgrf_roadstop.h"`
`#include "newgrf_bytereader.h"`
`#include "newgrf_internal_vehicle.h"`
`#include "newgrf_internal.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | MapSpriteGroupHandler
| Handler interface for mapping sprite groups. More...
struct | PurchaseDefaultMapSpriteGroupHandler< T >
| Common handler for mapping sprite groups for features which only support "Purchase" and "Default" sprites. More...
struct | CargoTypeMapSpriteGroupHandler< T, Tclass >
| Common handler for mapping sprite groups for features which support cargo-type specific sprites. More...
struct | CanalMapSpriteGroupHandler
struct | StationMapSpriteGroupHandler
struct | TownHouseMapSpriteGroupHandler
struct | IndustryMapSpriteGroupHandler
struct | IndustryTileMapSpriteGroupHandler
struct | CargoMapSpriteGroupHandler
struct | ObjectMapSpriteGroupHandler
struct | RailTypeMapSpriteGroupHandler
struct | RoadTypeMapSpriteGroupHandler< TRoadTramType >
struct | AirportMapSpriteGroupHandler
struct | AirportTileMapSpriteGroupHandler
struct | RoadStopMapSpriteGroupHandler
struct | BadgeMapSpriteGroupHandler

## Functions
static CargoType | TranslateCargo (GrfSpecFeature feature, uint8_t ctype)
static bool | IsValidGroupID (uint16_t groupid, std::string_view function)
static void | VehicleMapSpriteGroup (ByteReader &buf, GrfSpecFeature feature, uint8_t idcount)
template<typename T >
static auto * | GetSpec (GRFFile *, uint16_t)
| Specializable function to retrieve a NewGRF spec of a particular type.
template<>
auto * | GetSpec< StationSpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< HouseSpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< IndustrySpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< IndustryTileSpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< ObjectSpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< AirportSpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< AirportTileSpec > (GRFFile *grffile, uint16_t local_id)
template<>
auto * | GetSpec< RoadStopSpec > (GRFFile *grffile, uint16_t local_id)
static void | MapSpriteGroup (ByteReader &buf, uint8_t idcount, MapSpriteGroupHandler &&handler)
static void | FeatureMapSpriteGroup (ByteReader &buf)

## Detailed Description

NewGRF Action 0x03 handler.

Definition in file newgrf_act3.cpp.

## Function Documentation

## ◆ FeatureMapSpriteGroup()

static void FeatureMapSpriteGroup | ( | ByteReader & | buf | ) |
| static

Definition at line 369 of file newgrf_act3.cpp.

## ◆ GetSpec< AirportSpec >()

template<>

auto * GetSpec< AirportSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 303 of file newgrf_act3.cpp.

## ◆ GetSpec< AirportTileSpec >()

template<>

auto * GetSpec< AirportTileSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 306 of file newgrf_act3.cpp.

## ◆ GetSpec< HouseSpec >()

template<>

auto * GetSpec< HouseSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 239 of file newgrf_act3.cpp.

## ◆ GetSpec< IndustrySpec >()

template<>

auto * GetSpec< IndustrySpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 242 of file newgrf_act3.cpp.

## ◆ GetSpec< IndustryTileSpec >()

template<>

auto * GetSpec< IndustryTileSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 245 of file newgrf_act3.cpp.

## ◆ GetSpec< ObjectSpec >()

template<>

auto * GetSpec< ObjectSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 263 of file newgrf_act3.cpp.

## ◆ GetSpec< RoadStopSpec >()

template<>

auto * GetSpec< RoadStopSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 309 of file newgrf_act3.cpp.

## ◆ GetSpec< StationSpec >()

template<>

auto * GetSpec< StationSpec > | ( | GRFFile * | grffile,
|  | uint16_t | local_id
| ) |  |

Definition at line 236 of file newgrf_act3.cpp.

## ◆ IsValidGroupID()

static bool IsValidGroupID | ( | uint16_t | groupid,
|  | std::string_view | function
| ) |  |
| static

Definition at line 68 of file newgrf_act3.cpp.

## ◆ MapSpriteGroup()

static void MapSpriteGroup | ( | ByteReader & | buf,
|  | uint8_t | idcount,
|  | MapSpriteGroupHandler && | handler
| ) |  |
| static

Definition at line 340 of file newgrf_act3.cpp.

## ◆ TranslateCargo()

static CargoType TranslateCargo | ( | GrfSpecFeature | feature,
|  | uint8_t | ctype
| ) |  |
| static

Definition at line 36 of file newgrf_act3.cpp.

## ◆ VehicleMapSpriteGroup()

static void VehicleMapSpriteGroup | ( | ByteReader & | buf,
|  | GrfSpecFeature | feature,
|  | uint8_t | idcount
| ) |  |
| static

Definition at line 78 of file newgrf_act3.cpp.