OpenTTD Source 20260218-master-g2123fca5ea
EffectProcs Struct Reference

Container holding functions to call for a specific effect vehicle type. More...

Public Types

using InitProc = void(EffectVehicle *v)
 Initialises effect vehicle for a specific type.
using TickProc = bool(EffectVehicle *v)
 Run the actions/perform the behaviour of an effect vehicle for a tick.

Public Member Functions

constexpr EffectProcs (InitProc *init_proc, TickProc *tick_proc, TransparencyOption transparency)

Data Fields

InitProcinit_proc
 Function to initialise an effect vehicle after construction.
TickProctick_proc
 Functions for controlling effect vehicles at each tick.
TransparencyOption transparency
 Transparency option affecting the effect.

Detailed Description

Container holding functions to call for a specific effect vehicle type.

Definition at line 551 of file effectvehicle.cpp.

Member Typedef Documentation

◆ InitProc

Initialises effect vehicle for a specific type.

Parameters
vThe vehicle to initialise.

Definition at line 556 of file effectvehicle.cpp.

◆ TickProc

Run the actions/perform the behaviour of an effect vehicle for a tick.

Parameters
vThe vehicle to work with.
Returns
true iff the vehicle is still valid, i.e. has not been removed yet.

Definition at line 563 of file effectvehicle.cpp.

Constructor & Destructor Documentation

◆ EffectProcs()

EffectProcs::EffectProcs ( InitProc * init_proc,
TickProc * tick_proc,
TransparencyOption transparency )
inlineconstexpr

Definition at line 569 of file effectvehicle.cpp.

Field Documentation

◆ init_proc

InitProc* EffectProcs::init_proc

Function to initialise an effect vehicle after construction.

Definition at line 565 of file effectvehicle.cpp.

◆ tick_proc

TickProc* EffectProcs::tick_proc

Functions for controlling effect vehicles at each tick.

Definition at line 566 of file effectvehicle.cpp.

◆ transparency

TransparencyOption EffectProcs::transparency

Transparency option affecting the effect.

Definition at line 567 of file effectvehicle.cpp.


The documentation for this struct was generated from the following file: