diff options
author | rubidium <rubidium@openttd.org> | 2007-12-27 13:35:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-12-27 13:35:39 +0000 |
commit | 384503e7d37f4b68c1480f6e6ca81adf84ef137d (patch) | |
tree | 7262db82a9e80413b5783b88be96602fdd29a485 /src/vehicle.cpp | |
parent | 4e66f5a04b3b1393a13fa81edfdd10243aaf13a4 (diff) | |
download | openttd-384503e7d37f4b68c1480f6e6ca81adf84ef137d.tar.xz |
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 9091edaed..d001b396b 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -12,7 +12,6 @@ #include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" -#include "vehicle.h" #include "timetable.h" #include "viewport.h" #include "news.h" @@ -43,10 +42,16 @@ #include "functions.h" #include "date_func.h" #include "window_func.h" +#include "vehicle_func.h" #define INVALID_COORD (0x7fffffff) #define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6)) +VehicleID _vehicle_id_ctr_day; +Vehicle *_place_clicked_vehicle; +VehicleID _new_vehicle_id; +uint16 _returned_refit_capacity; + /* Tables used in vehicle.h to find the right command for a certain vehicle type */ const uint32 _veh_build_proc_table[] = { @@ -3182,3 +3187,15 @@ void SpecialVehicle::UpdateDeltaXY(Direction direction) this->sprite_height = 1; this->z_height = 1; } + +void StopAllVehicles() +{ + Vehicle *v; + FOR_ALL_VEHICLES(v) { + /* Code ripped from CmdStartStopTrain. Can't call it, because of + * ownership problems, so we'll duplicate some code, for now */ + v->vehstatus |= VS_STOPPED; + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); + } +} |