roadveh.h File Reference

Road vehicle states. More...

#include "vehicle_base.h"
#include "road_type.h"

Go to the source code of this file.

Data Structures

struct  RoadVehicleCache
 Cached oftenly queried (NewGRF) values. More...
struct  RoadVehicle
 Buses, trucks and trams belong to this class. More...

Defines

#define FOR_ALL_ROADVEHICLES(var)   FOR_ALL_VEHICLES_OF_TYPE(RoadVehicle, var)

Enumerations

enum  RoadVehicleStates {
  RVSB_IN_DEPOT = 0xFE, RVSB_WORMHOLE = 0xFF, RVS_USING_SECOND_BAY = 1, RVS_DRIVE_SIDE = 4,
  RVS_IN_ROAD_STOP = 5, RVS_IN_DT_ROAD_STOP = 6, RVSB_IN_ROAD_STOP = 1 << RVS_IN_ROAD_STOP, RVSB_IN_ROAD_STOP_END = RVSB_IN_ROAD_STOP + TRACKDIR_END,
  RVSB_IN_DT_ROAD_STOP = 1 << RVS_IN_DT_ROAD_STOP, RVSB_IN_DT_ROAD_STOP_END = RVSB_IN_DT_ROAD_STOP + TRACKDIR_END, RVSB_TRACKDIR_MASK = 0x0F, RVSB_ROAD_STOP_TRACKDIR_MASK = 0x09
}
 

Road vehicle states.

More...
enum  {
  RDE_NEXT_TILE = 0x80, RDE_TURNED = 0x40, RVC_DEFAULT_START_FRAME = 0, RVC_TURN_AROUND_START_FRAME = 1,
  RVC_DEPOT_START_FRAME = 6, RVC_START_FRAME_AFTER_LONG_TRAM = 21, RVC_TURN_AROUND_START_FRAME_SHORT_TRAM = 16, RVC_DRIVE_THROUGH_STOP_FRAME = 11,
  RVC_DEPOT_STOP_FRAME = 11
}
 

State information about the Road Vehicle controller.

More...
enum  RoadVehicleSubType { RVST_FRONT, RVST_ARTIC_PART }

Functions

void RoadVehUpdateCache (RoadVehicle *v)

Detailed Description

Road vehicle states.

Definition in file roadveh.h.


Enumeration Type Documentation

anonymous enum

State information about the Road Vehicle controller.

Enumerator:
RDE_NEXT_TILE 

We should enter the next tile.

RDE_TURNED 

We just finished turning.

Definition at line 55 of file roadveh.h.

Road vehicle states.

Enumerator:
RVSB_IN_DEPOT 

The vehicle is in a depot.

RVSB_WORMHOLE 

The vehicle is in a tunnel and/or bridge.

RVS_USING_SECOND_BAY 

Only used while in a road stop.

RVS_DRIVE_SIDE 

Only used when retrieving move data.

RVS_IN_ROAD_STOP 

The vehicle is in a road stop.

RVS_IN_DT_ROAD_STOP 

The vehicle is in a drive-through road stop.

RVSB_IN_ROAD_STOP 

The vehicle is in a road stop.

RVSB_IN_DT_ROAD_STOP 

The vehicle is in a drive-through road stop.

RVSB_TRACKDIR_MASK 

The mask used to extract track dirs.

RVSB_ROAD_STOP_TRACKDIR_MASK 

Only bits 0 and 3 are used to encode the trackdir for road stops.

Definition at line 21 of file roadveh.h.


Generated on Sun Nov 14 14:42:06 2010 for OpenTTD by  doxygen 1.6.1