OpenTTD Source 20250331-master-g3c15e0c889
|
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< BadgeID > | ReadBadgeList (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) |
NewGRF Action 0x00 handler.
Definition in file newgrf_act0.cpp.
ChangeInfoResult CommonVehicleChangeInfo | ( | EngineInfo * | ei, |
int | prop, | ||
ByteReader & | buf | ||
) |
Define properties common to all vehicles.
ei | Engine info. |
prop | The property to change. |
buf | The property value. |
Definition at line 33 of file newgrf_act0.cpp.
References EngineInfo::base_intro, EngineInfo::base_life, CIR_SUCCESS, CIR_UNKNOWN, EngineInfo::climates, TimerGameConst< struct Calendar >::DAYS_TILL_ORIGINAL_BASE_YEAR, EngineInfo::lifelength, PROP_VEHICLE_LOAD_AMOUNT, ByteReader::ReadByte(), and ByteReader::ReadWord().
Referenced by AircraftVehicleChangeInfo(), RailVehicleChangeInfo(), RoadVehicleChangeInfo(), and ShipVehicleChangeInfo().
|
static |
Definition at line 172 of file newgrf_act0.cpp.
bool HandleChangeInfoResult | ( | const char * | caller, |
ChangeInfoResult | cir, | ||
uint8_t | feature, | ||
uint8_t | property | ||
) |
Definition at line 112 of file newgrf_act0.cpp.
std::vector< BadgeID > ReadBadgeList | ( | ByteReader & | buf, |
GrfSpecFeature | feature | ||
) |
Read a list of badges.
buf | Buffer reader containing list of badges to read. |
feature | The feature of the badge list. |
Definition at line 86 of file newgrf_act0.cpp.
References GRFFile::badge_list, GrfProcessingState::grffile, MarkBadgeSeen(), and ByteReader::ReadWord().
Referenced by AircraftVehicleChangeInfo(), AirportChangeInfo(), IndustriesChangeInfo(), IndustrytilesChangeInfo(), ObjectChangeInfo(), RailTypeChangeInfo(), RailVehicleChangeInfo(), RoadTypeChangeInfo(), RoadVehicleChangeInfo(), ShipVehicleChangeInfo(), StationChangeInfo(), and TownHouseChangeInfo().
|
static |
Definition at line 252 of file newgrf_act0.cpp.
|
static |
Definition at line 218 of file newgrf_act0.cpp.
void SkipBadgeList | ( | ByteReader & | buf | ) |
Skip a list of badges.
buf | Buffer 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().