|
OpenTTD Source 20251117-master-g7398d2e290
|
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 |
| struct | EffectProcs |
Macros | |
| #define | MK(x, y, z, i) { x, y, z, i } |
| #define | ME(i) { i, 4, 0, 0 } |
Variables | ||
| static const BulldozerMovement | _bulldozer_movement [] | |
| struct { | ||
| int8_t x | ||
| int8_t 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 const std::array< EffectProcs, EV_END > | _effect_procs | |
| Per-EffectVehicleType handling. | ||
Implementation of everything generic to vehicles.
Definition in file effectvehicle.cpp.
| #define ME | ( | i | ) | { i, 4, 0, 0 } |
Definition at line 327 of file effectvehicle.cpp.
| #define MK | ( | x, | |
| y, | |||
| z, | |||
| i | |||
| ) | { x, y, z, i } |
Definition at line 326 of file effectvehicle.cpp.
|
static |
Definition at line 194 of file effectvehicle.cpp.
|
static |
Definition at line 200 of file effectvehicle.cpp.
|
static |
Definition at line 312 of file effectvehicle.cpp.
|
static |
Definition at line 469 of file effectvehicle.cpp.
|
static |
Definition at line 239 of file effectvehicle.cpp.
|
static |
Definition at line 286 of file effectvehicle.cpp.
|
static |
Definition at line 39 of file effectvehicle.cpp.
|
static |
Definition at line 46 of 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 566 of file effectvehicle.cpp.
References _effect_procs, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::CanAllocateItem(), Vehicle::subtype, Vehicle::tile, Unclickable, EffectVehicle::UpdateDeltaXY(), Vehicle::UpdatePositionAndViewport(), Vehicle::vehstatus, Vehicle::x_pos, Vehicle::y_pos, and Vehicle::z_pos.
Referenced by CreateEffectVehicleAbove(), and CreateEffectVehicleRel().
| 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 594 of file effectvehicle.cpp.
References Clamp(), CreateEffectVehicle(), GetSlopePixelZ(), Map::MaxX(), Map::MaxY(), and TILE_SIZE.
Referenced by CmdClearArea(), DisasterTick_Aircraft(), and DisasterTick_Big_Ufo_Destroyer().
| 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 610 of file effectvehicle.cpp.
References CreateEffectVehicle(), Vehicle::x_pos, Vehicle::y_pos, and Vehicle::z_pos.
Referenced by CrashAirplane(), DisasterTick_Big_Ufo_Destroyer(), DisasterTick_Ufo(), DisasterTick_Zeppeliner(), FloodVehicle(), HandleAircraftSmoke(), Vehicle::HandleBreakdown(), HandleCrashedAircraft(), HandleCrashedTrain(), RoadVehIsCrashed(), Vehicle::ShowVisualEffect(), and SpawnAdvancedVisualEffect().
|
static |
Definition at line 97 of file effectvehicle.cpp.
|
static |
Definition at line 103 of file effectvehicle.cpp.
|
static |
Definition at line 121 of file effectvehicle.cpp.
|
static |
Definition at line 127 of file effectvehicle.cpp.
|
static |
Definition at line 174 of file effectvehicle.cpp.
|
static |
Definition at line 180 of file effectvehicle.cpp.
|
static |
Definition at line 219 of file effectvehicle.cpp.
|
static |
Definition at line 225 of file effectvehicle.cpp.
|
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 29 of file effectvehicle.cpp.
References Vehicle::sprite_cache, and MutableSpriteCache::sprite_seq.
|
static |
Definition at line 144 of file effectvehicle.cpp.
|
static |
Definition at line 150 of file effectvehicle.cpp.
|
static |
Definition at line 67 of file effectvehicle.cpp.
|
static |
Definition at line 73 of file effectvehicle.cpp.
|
static |
Definition at line 370 of file effectvehicle.cpp.
|
static |
Definition at line 362 of file effectvehicle.cpp.
|
static |
Definition at line 338 of file effectvehicle.cpp.
|
static |
Definition at line 354 of file effectvehicle.cpp.
|
static |
Definition at line 346 of file effectvehicle.cpp.
|
static |
Definition at line 329 of file effectvehicle.cpp.
|
static |
Definition at line 460 of file effectvehicle.cpp.
|
static |
Definition at line 253 of file effectvehicle.cpp.
|
static |
Per-EffectVehicleType handling.
Definition at line 543 of file effectvehicle.cpp.
Referenced by CreateEffectVehicle(), EffectVehicle::GetTransparencyOption(), and EffectVehicle::Tick().
| const struct { ... } _inc_by_dir[] |
| int8_t x |
Definition at line 277 of file effectvehicle.cpp.
| int8_t y |
Definition at line 278 of file effectvehicle.cpp.