(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.

This commit is contained in:
rubidium
2007-12-27 13:35:39 +00:00
parent 4e66f5a04b
commit 384503e7d3
82 changed files with 362 additions and 330 deletions

View File

@@ -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);
}
}