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

OpenTTD Source 15.0-RC2

Functions
newgrf_act0_objects.cpp File Reference

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

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../newgrf_object.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 | IgnoreObjectProperty (uint prop, ByteReader &buf)
| Ignore properties for objects.
static ChangeInfoResult | ObjectChangeInfo (uint first, uint last, int prop, ByteReader &buf)
| Define properties for objects.

## Detailed Description

NewGRF Action 0x00 handler for objects.

Definition in file newgrf_act0_objects.cpp.

## Function Documentation

## ◆ IgnoreObjectProperty()

static ChangeInfoResult IgnoreObjectProperty | ( | uint | prop,
|  | ByteReader & | buf
| ) |  |
| static

Ignore properties for objects.

Parameters

  prop | The property to ignore.
  buf | The property value.

Returns
  ChangeInfoResult.

Definition at line 25 of file newgrf_act0_objects.cpp.

References CIR_SUCCESS, CIR_UNKNOWN, ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), and SkipBadgeList().

Referenced by ObjectChangeInfo().

## ◆ ObjectChangeInfo()

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

Define properties for objects.

Parameters

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

Returns
  ChangeInfoResult.

Definition at line 76 of file newgrf_act0_objects.cpp.

References _loaded_newgrf_features, AddStringForMapping(), NewGRFClass< Tspec, Tindex, Tmax >::Allocate(), CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, GB(), NewGRFClass< Tspec, Tindex, Tmax >::Get(), GrfProcessingState::grffile, GRFLoadedFeatures::has_2CC, IgnoreObjectProperty(), NewGRFClass< Tspec, Tindex, Tmax >::name, NUM_OBJECTS_PER_GRF, OBJECT_SIZE_1X1, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), and Uses2CC.