effectvehicle_func.h File Reference

Functions related to effect vehicles. More...

#include "vehicle_type.h"

Go to the source code of this file.

Enumerations

enum  EffectVehicleType {
  EV_CHIMNEY_SMOKE = 0, EV_STEAM_SMOKE = 1, EV_DIESEL_SMOKE = 2, EV_ELECTRIC_SPARK = 3,
  EV_SMOKE = 4, EV_EXPLOSION_LARGE = 5, EV_BREAKDOWN_SMOKE = 6, EV_EXPLOSION_SMALL = 7,
  EV_BULLDOZER = 8, EV_BUBBLE = 9
}
 

Effect vehicle types.


Functions

EffectVehicleCreateEffectVehicle (int x, int y, int z, EffectVehicleType type)
 Create an effect vehicle at a particular location.
EffectVehicleCreateEffectVehicleAbove (int x, int y, int z, EffectVehicleType type)
 Create an effect vehicle above a particular location.
EffectVehicleCreateEffectVehicleRel (const Vehicle *v, int x, int y, int z, EffectVehicleType type)
 Create an effect vehicle above a particular vehicle.

Detailed Description

Functions related to effect vehicles.

Definition in file effectvehicle_func.h.


Function Documentation

EffectVehicle* CreateEffectVehicle ( int  x,
int  y,
int  z,
EffectVehicleType  type 
)

Create an effect vehicle at a particular location.

Parameters:
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.
Returns:
The effect vehicle.

Definition at line 569 of file effectvehicle.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::CanAllocateItem(), INVALID_DIR, MarkSingleVehicleDirty(), Vehicle::subtype, Vehicle::tile, EffectVehicle::UpdateDeltaXY(), VehicleMove(), Vehicle::vehstatus, VS_UNCLICKABLE, 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.

Parameters:
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.
Returns:
The effect vehicle.

Definition at line 598 of file effectvehicle.cpp.

References Clamp(), CreateEffectVehicle(), MapMaxX(), MapMaxY(), 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.

Parameters:
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.
Returns:
The effect vehicle.

Definition at line 614 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(), Vehicle::HandleBreakdown(), HandleCrashedAircraft(), HandleCrashedTrain(), RoadVehIsCrashed(), and Vehicle::ShowVisualEffect().


Generated on Mon May 9 05:19:06 2011 for OpenTTD by  doxygen 1.6.1