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

OpenTTD Source 15.0-RC2

Functions
newgrf_act0_railtypes.cpp File Reference

NewGRF Action 0x00 handler for railtypes. More...

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../rail.h"`
`#include "newgrf_bytereader.h"`
`#include "newgrf_internal.h"`
`#include "newgrf_stringmapping.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
static ChangeInfoResult | RailTypeChangeInfo (uint first, uint last, int prop, ByteReader &buf)
| Define properties for railtypes.
static ChangeInfoResult | RailTypeReserveInfo (uint first, uint last, int prop, ByteReader &buf)

## Detailed Description

NewGRF Action 0x00 handler for railtypes.

Definition in file newgrf_act0_railtypes.cpp.

## Function Documentation

## ◆ RailTypeChangeInfo()

static ChangeInfoResult RailTypeChangeInfo | ( | uint | first,
|  | uint | last,
|  | int | prop,
|  | ByteReader & | buf
| ) |  |
| static

Define properties for railtypes.

Parameters

  first | Local ID of the first railtype.
  last | Local ID of the last railtype.
  prop | The property to change.
  buf | The property value.

Returns
  ChangeInfoResult.

Definition at line 27 of file newgrf_act0_railtypes.cpp.

References RailTypeInfo::acceleration_type, AddStringForMapping(), RailTypeInfo::build_caption, CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, Clamp(), RailTypeInfo::compatible_railtypes, RailTypeInfo::cost_multiplier, RailTypeInfo::curve_speed, RailTypeInfo::fallback_railtype, RailTypeInfo::flags, GetRailTypeByLabel(), GrfProcessingState::grffile, RailTypeInfo::introduces_railtypes, RailTypeInfo::introduction_date, RailTypeInfo::introduction_required_railtypes, INVALID_RAILTYPE, RailTypeInfo::maintenance_multiplier, RailTypeInfo::map_colour, RailTypeInfo::max_speed, RailTypeInfo::menu_text, RailTypeInfo::name, RailTypeInfo::new_loco, RailTypeInfo::powered_railtypes, RAILTYPE_END, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), RailTypeInfo::replace_text, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), RailTypeInfo::sorting_order, RailTypeInfo::strings, and RailTypeInfo::toolbar_caption.

## ◆ RailTypeReserveInfo()

static ChangeInfoResult RailTypeReserveInfo | ( | uint | first,
|  | uint | last,
|  | int | prop,
|  | ByteReader & | buf
| ) |  |
| static

Definition at line 162 of file newgrf_act0_railtypes.cpp.