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

OpenTTD Source 15.0-RC2

Functions
newgrf_act0_houses.cpp File Reference

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

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../town.h"`
`#include "../newgrf_cargo.h"`
`#include "../newgrf_house.h"`
`#include "newgrf_bytereader.h"`
`#include "newgrf_internal.h"`
`#include "newgrf_stringmapping.h"`
`#include "table/strings.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
static ChangeInfoResult | IgnoreTownHouseProperty (int prop, ByteReader &buf)
| Ignore a house property.
static ChangeInfoResult | TownHouseChangeInfo (uint first, uint last, int prop, ByteReader &buf)
| Define properties for houses.

## Detailed Description

NewGRF Action 0x00 handler for houses.

Definition in file newgrf_act0_houses.cpp.

## Function Documentation

## ◆ IgnoreTownHouseProperty()

static ChangeInfoResult IgnoreTownHouseProperty | ( | int | prop,
|  | ByteReader & | buf
| ) |  |
| static

Ignore a house property.

Parameters

  prop | Property to read.
  buf | Property value.

Returns
  ChangeInfoResult.

Definition at line 29 of file newgrf_act0_houses.cpp.

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

Referenced by TownHouseChangeInfo().

## ◆ TownHouseChangeInfo()

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

Define properties for houses.

Parameters

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

Returns
  ChangeInfoResult.

Definition at line 96 of file newgrf_act0_houses.cpp.

References _settings_game, abs(), OverrideManagerBase::Add(), AddStringForMapping(), CIR_DISABLED, CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, Clamp(), CT_INVALID, DisableGrf(), HouseSpec::enabled, GameSettings::game_creation, GB(), HouseSpec::Get(), GetCargoTranslation(), GrfProcessingState::grffile, HasBit(), HOUSE_ORIGINAL_NUM_ACCEPTS, IgnoreTownHouseProperty(), IsValidCargoType(), GameCreationSettings::landscape, lengthof, Looping, TimerGameConst< struct Calendar >::MAX_YEAR, NEW_HOUSE_OFFSET, NonLooping, NUM_HOUSES_PER_GRF, TimerGameConst< struct Calendar >::ORIGINAL_BASE_YEAR, GRFError::param_value, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), SB(), and SetBit().