OpenTTD
|
Implementation of everything generic to vehicles. More...
#include "stdafx.h"
#include "landscape.h"
#include "core/random_func.hpp"
#include "industry_map.h"
#include "vehicle_func.h"
#include "sound_func.h"
#include "animated_tile_func.h"
#include "effectvehicle_func.h"
#include "effectvehicle_base.h"
#include "safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | BulldozerMovement |
struct | BubbleMovement |
Macros | |
#define | MK(x, y, z, i) { x, y, z, i } |
#define | ME(i) { i, 4, 0, 0 } |
Typedefs | |
typedef void | EffectInitProc(EffectVehicle *v) |
typedef bool | EffectTickProc(EffectVehicle *v) |
Functions | |
static bool | IncrementSprite (EffectVehicle *v, SpriteID last) |
Increment the sprite unless it has reached the end of the animation. More... | |
static void | ChimneySmokeInit (EffectVehicle *v) |
static bool | ChimneySmokeTick (EffectVehicle *v) |
static void | SteamSmokeInit (EffectVehicle *v) |
static bool | SteamSmokeTick (EffectVehicle *v) |
static void | DieselSmokeInit (EffectVehicle *v) |
static bool | DieselSmokeTick (EffectVehicle *v) |
static void | ElectricSparkInit (EffectVehicle *v) |
static bool | ElectricSparkTick (EffectVehicle *v) |
static void | SmokeInit (EffectVehicle *v) |
static bool | SmokeTick (EffectVehicle *v) |
static void | ExplosionLargeInit (EffectVehicle *v) |
static bool | ExplosionLargeTick (EffectVehicle *v) |
static void | BreakdownSmokeInit (EffectVehicle *v) |
static bool | BreakdownSmokeTick (EffectVehicle *v) |
static void | ExplosionSmallInit (EffectVehicle *v) |
static bool | ExplosionSmallTick (EffectVehicle *v) |
static void | BulldozerInit (EffectVehicle *v) |
static bool | BulldozerTick (EffectVehicle *v) |
static void | BubbleInit (EffectVehicle *v) |
static bool | BubbleTick (EffectVehicle *v) |
assert_compile (lengthof(_effect_init_procs)==EV_END) | |
assert_compile (lengthof(_effect_tick_procs)==EV_END) | |
assert_compile (lengthof(_effect_transparency_options)==EV_END) | |
EffectVehicle * | CreateEffectVehicle (int x, int y, int z, EffectVehicleType type) |
Create an effect vehicle at a particular location. More... | |
EffectVehicle * | CreateEffectVehicleAbove (int x, int y, int z, EffectVehicleType type) |
Create an effect vehicle above a particular location. More... | |
EffectVehicle * | CreateEffectVehicleRel (const Vehicle *v, int x, int y, int z, EffectVehicleType type) |
Create an effect vehicle above a particular vehicle. More... | |
Variables | |
static const BulldozerMovement | _bulldozer_movement [] |
struct { | |
int8 x | |
int8 y | |
} | _inc_by_dir [] |
static const BubbleMovement | _bubble_float_sw [] |
static const BubbleMovement | _bubble_float_ne [] |
static const BubbleMovement | _bubble_float_se [] |
static const BubbleMovement | _bubble_float_nw [] |
static const BubbleMovement | _bubble_burst [] |
static const BubbleMovement | _bubble_absorb [] |
static const BubbleMovement *const | _bubble_movement [] |
static EffectInitProc *const | _effect_init_procs [] |
Functions to initialise an effect vehicle after construction. More... | |
static EffectTickProc *const | _effect_tick_procs [] |
Functions for controlling effect vehicles at each tick. More... | |
static const TransparencyOption | _effect_transparency_options [] |
Transparency options affecting the effects. More... | |
Implementation of everything generic to vehicles.
Definition in file effectvehicle.cpp.
EffectVehicle* CreateEffectVehicle | ( | int | x, |
int | y, | ||
int | z, | ||
EffectVehicleType | type | ||
) |
Create an effect vehicle at a particular location.
x | The x location on the map. |
y | The y location on the map. |
z | The z location on the map. |
type | The type of effect vehicle. |
Definition at line 596 of file effectvehicle.cpp.
EffectVehicle* CreateEffectVehicleAbove | ( | int | x, |
int | y, | ||
int | z, | ||
EffectVehicleType | type | ||
) |
Create an effect vehicle above a particular location.
x | The x location on the map. |
y | The y location on the map. |
z | The offset from the ground. |
type | The type of effect vehicle. |
Definition at line 624 of file effectvehicle.cpp.
EffectVehicle* CreateEffectVehicleRel | ( | const Vehicle * | v, |
int | x, | ||
int | y, | ||
int | z, | ||
EffectVehicleType | type | ||
) |
Create an effect vehicle above a particular vehicle.
v | The vehicle to base the position on. |
x | The x offset to the vehicle. |
y | The y offset to the vehicle. |
z | The z offset to the vehicle. |
type | The type of effect vehicle. |
Definition at line 640 of file effectvehicle.cpp.
Referenced by CrashAirplane(), FloodVehicle(), HandleCrashedTrain(), and RoadVehIsCrashed().
|
static |
Increment the sprite unless it has reached the end of the animation.
v | Vehicle to increment sprite of. |
last | Last sprite of animation. |
Definition at line 31 of file effectvehicle.cpp.
References PalSpriteID::sprite, and Vehicle::sprite_seq.
|
static |
Definition at line 364 of file effectvehicle.cpp.
|
static |
Definition at line 340 of file effectvehicle.cpp.
|
static |
Definition at line 356 of file effectvehicle.cpp.
|
static |
Definition at line 348 of file effectvehicle.cpp.
|
static |
Definition at line 331 of file effectvehicle.cpp.
|
static |
Definition at line 462 of file effectvehicle.cpp.
|
static |
Definition at line 255 of file effectvehicle.cpp.
|
static |
Functions to initialise an effect vehicle after construction.
Definition at line 537 of file effectvehicle.cpp.
|
static |
Functions for controlling effect vehicles at each tick.
Definition at line 554 of file effectvehicle.cpp.
Referenced by EffectVehicle::Tick().
|
static |
Transparency options affecting the effects.
Definition at line 571 of file effectvehicle.cpp.
Referenced by EffectVehicle::GetTransparencyOption().
const { ... } _inc_by_dir[] |