summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-06 10:18:47 +0000
committertruelight <truelight@openttd.org>2005-02-06 10:18:47 +0000
commitbd7f37d5926ec9a5798134c4a39ef7b8cd3fd4ea (patch)
tree0b6bfe4dfd7abf3e94d0f7210b1b842e429c4a02 /vehicle.h
parente4913f1de822f64ae31ed697ca8ecff8cf745cce (diff)
downloadopenttd-bd7f37d5926ec9a5798134c4a39ef7b8cd3fd4ea.tar.xz
(svn r1817) -Codechange: Moved depot-functions to depot.c
-Codechange: Added wrappers around depot-access (GetDepot no exists) -Codechange: Made depot-functions a bit more logic (no longer GetDepotByTile crashes your game when you request it on a non-depot tile) -Add: made depots dynamic (yes, 64k depots are possible now)
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h27
1 files changed, 1 insertions, 26 deletions
diff --git a/vehicle.h b/vehicle.h
index 9e056edf9..689118bca 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -200,11 +200,6 @@ struct Vehicle {
#define is_custom_firsthead_sprite(x) (x == 0xfd)
#define is_custom_secondhead_sprite(x) (x == 0xfe)
-struct Depot {
- TileIndex xy;
- uint16 town_index;
-};
-
// train waypoint
struct Waypoint {
TileIndex xy;
@@ -280,14 +275,11 @@ void DeleteVehicleChain(Vehicle *v);
void *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc);
void CallVehicleTicks(void);
-Depot *AllocateDepot(void);
Waypoint *AllocateWaypoint(void);
void UpdateWaypointSign(Waypoint *cp);
void RedrawWaypointSign(Waypoint *cp);
void InitializeTrains(void);
-bool IsTrainDepotTile(TileIndex tile);
-bool IsRoadDepotTile(TileIndex tile);
bool CanFillVehicle(Vehicle *v);
@@ -330,19 +322,15 @@ void EndVehicleMove(Vehicle *v);
bool IsAircraftHangarTile(TileIndex tile);
void ShowAircraftViewWindow(Vehicle *v);
-bool IsShipDepotTile(TileIndex tile);
UnitID GetFreeUnitNumber(byte type);
int LoadUnloadVehicle(Vehicle *v);
-int GetDepotByTile(uint tile);
uint GetWaypointByTile(uint tile);
-void DoDeleteDepot(uint tile);
-
void UpdateTrainAcceleration(Vehicle *v);
int32 GetTrainRunningCost(Vehicle *v);
-int CheckStoppedInDepot(Vehicle *v);
+int CheckTrainStoppedInDepot(Vehicle *v);
bool VehicleNeedsService(const Vehicle *v);
@@ -434,8 +422,6 @@ static inline Vehicle *GetFirstVehicleFromSharedList(Vehicle *v)
return u;
}
-VARDEF Depot _depots[255];
-
// 128 waypoints
VARDEF Waypoint _waypoints[128];
@@ -452,22 +438,11 @@ VARDEF uint16 _aircraft_refit_capacity;
VARDEF byte _cmd_build_rail_veh_score;
VARDEF byte _cmd_build_rail_veh_var1;
-// NOSAVE: Player specific info
-VARDEF TileIndex _last_built_train_depot_tile;
-VARDEF TileIndex _last_built_road_depot_tile;
-VARDEF TileIndex _last_built_aircraft_depot_tile;
-VARDEF TileIndex _last_built_ship_depot_tile;
-
// for each player, for each vehicle type, keep a list of the vehicles.
//VARDEF Vehicle *_vehicle_arr[8][4];
#define INVALID_VEHICLE 0xffff
-#define MIN_SERVINT_PERCENT 5
-#define MAX_SERVINT_PERCENT 90
-#define MIN_SERVINT_DAYS 30
-#define MAX_SERVINT_DAYS 800
-
/* A lot of code calls for the invalidation of the status bar, which is widget 5.
* Best is to have a virtual value for it when it needs to change again */
#define STATUS_BAR 5