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

OpenTTD Source 15.0-RC2

Functions
newgrf_act0_roadtypes.cpp File Reference

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

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../road.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 | RoadTypeChangeInfo (uint first, uint last, int prop, ByteReader &buf, RoadTramType rtt)
| Define properties for roadtypes.
static ChangeInfoResult | RoadTypeReserveInfo (uint first, uint last, int prop, ByteReader &buf, RoadTramType rtt)

## Detailed Description

NewGRF Action 0x00 handler for roadtypes.

Definition in file newgrf_act0_roadtypes.cpp.

## Function Documentation

## ◆ RoadTypeChangeInfo()

static ChangeInfoResult RoadTypeChangeInfo | ( | uint | first,
|  | uint | last,
|  | int | prop,
|  | ByteReader & | buf,
|  | RoadTramType | rtt
| ) |  |
| static

Define properties for roadtypes.

Parameters

  first | Local ID of the first roadtype.
  last | Local ID of the last roadtype.
  prop | The property to change.
  buf | The property value.
  rtt | Road/tram type.

Returns
  ChangeInfoResult.

Definition at line 28 of file newgrf_act0_roadtypes.cpp.

References AddStringForMapping(), RoadTypeInfo::build_caption, CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, RoadTypeInfo::cost_multiplier, RoadTypeInfo::flags, GetRoadTypeByLabel(), GrfProcessingState::grffile, RoadTypeInfo::introduces_roadtypes, RoadTypeInfo::introduction_date, RoadTypeInfo::introduction_required_roadtypes, INVALID_ROADTYPE, RoadTypeInfo::maintenance_multiplier, RoadTypeInfo::map_colour, RoadTypeInfo::max_speed, RoadTypeInfo::menu_text, RoadTypeInfo::name, RoadTypeInfo::new_engine, RoadTypeInfo::powered_roadtypes, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), RoadTypeInfo::replace_text, ROADTYPE_END, RTT_TRAM, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), RoadTypeInfo::sorting_order, RoadTypeInfo::strings, and RoadTypeInfo::toolbar_caption.

## ◆ RoadTypeReserveInfo()

static ChangeInfoResult RoadTypeReserveInfo | ( | uint | first,
|  | uint | last,
|  | int | prop,
|  | ByteReader & | buf,
|  | RoadTramType | rtt
| ) |  |
| static

Definition at line 149 of file newgrf_act0_roadtypes.cpp.