OpenTTD Source 20250331-master-g3c15e0c889
newgrf_act0.cpp File Reference

NewGRF Action 0x00 handler. More...

#include "../stdafx.h"
#include "../debug.h"
#include "../newgrf_engine.h"
#include "../newgrf_badge.h"
#include "../newgrf_badge_type.h"
#include "../newgrf_cargo.h"
#include "../timer/timer_game_calendar.h"
#include "../error.h"
#include "../vehicle_base.h"
#include "newgrf_bytereader.h"
#include "newgrf_internal.h"
#include "../table/strings.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  InvokeGrfChangeInfoHandler
 Helper class to invoke a GrfChangeInfoHandler. More...
 

Functions

ChangeInfoResult CommonVehicleChangeInfo (EngineInfo *ei, int prop, ByteReader &buf)
 Define properties common to all vehicles.
 
void SkipBadgeList (ByteReader &buf)
 Skip a list of badges.
 
std::vector< BadgeIDReadBadgeList (ByteReader &buf, GrfSpecFeature feature)
 Read a list of badges.
 
bool HandleChangeInfoResult (const char *caller, ChangeInfoResult cir, uint8_t feature, uint8_t property)
 
static void FeatureChangeInfo (ByteReader &buf)
 
static void SafeChangeInfo (ByteReader &buf)
 
static void ReserveChangeInfo (ByteReader &buf)
 

Detailed Description

NewGRF Action 0x00 handler.

Definition in file newgrf_act0.cpp.

Function Documentation

◆ CommonVehicleChangeInfo()

ChangeInfoResult CommonVehicleChangeInfo ( EngineInfo ei,
int  prop,
ByteReader buf 
)

◆ FeatureChangeInfo()

static void FeatureChangeInfo ( ByteReader buf)
static

Definition at line 172 of file newgrf_act0.cpp.

◆ HandleChangeInfoResult()

bool HandleChangeInfoResult ( const char *  caller,
ChangeInfoResult  cir,
uint8_t  feature,
uint8_t  property 
)

Definition at line 112 of file newgrf_act0.cpp.

◆ ReadBadgeList()

std::vector< BadgeID > ReadBadgeList ( ByteReader buf,
GrfSpecFeature  feature 
)

◆ ReserveChangeInfo()

static void ReserveChangeInfo ( ByteReader buf)
static

Definition at line 252 of file newgrf_act0.cpp.

◆ SafeChangeInfo()

static void SafeChangeInfo ( ByteReader buf)
static

Definition at line 218 of file newgrf_act0.cpp.

◆ SkipBadgeList()

void SkipBadgeList ( ByteReader buf)

Skip a list of badges.

Parameters
bufBuffer reader containing list of badges to skip.

Definition at line 72 of file newgrf_act0.cpp.

References ByteReader::ReadWord().

Referenced by IgnoreIndustryProperty(), IgnoreObjectProperty(), and IgnoreRoadStopProperty().