#include "depot_type.h"
#include "tile_type.h"
#include "vehicle_type.h"
#include "direction_type.h"
#include "slope_type.h"
Go to the source code of this file.
Functions | |
void | ShowDepotWindow (TileIndex tile, VehicleType type) |
Opens a depot window. | |
void | InitializeDepots () |
void | DeleteDepotHighlightOfVehicle (const Vehicle *v) |
Removes the highlight of a vehicle in a depot window. | |
static bool | CanBuildDepotByTileh (DiagDirection direction, Slope tileh) |
Find out if the slope of the tile is suitable to build a depot of given direction. |
Definition in file depot_func.h.
static bool CanBuildDepotByTileh | ( | DiagDirection | direction, | |
Slope | tileh | |||
) | [inline, static] |
Find out if the slope of the tile is suitable to build a depot of given direction.
direction | The direction in which the depot's exit points | |
tileh | The slope of the tile in question |
00 (exit towards NE) we need either bit 2 or 3 set in tileh: 0x4C >> 0 = 1100
01 (exit towards SE) we need either bit 1 or 2 set in tileh: 0x4C >> 1 = 0110
02 (exit towards SW) we need either bit 0 or 1 set in tileh: 0x4C >> 2 = 0011
03 (exit towards NW) we need either bit 0 or 4 set in tileh: 0x4C >> 3 = 1001
So ((0x4C >> direction) & tileh) determines whether the depot can be built on the current tileh
Definition at line 41 of file depot_func.h.
Referenced by AutoslopeCheckForEntranceEdge(), CmdBuildRoadDepot(), and CmdBuildTrainDepot().
void DeleteDepotHighlightOfVehicle | ( | const Vehicle * | v | ) |
Removes the highlight of a vehicle in a depot window.
*v | Vehicle to remove all highlights from |
Definition at line 1000 of file depot_gui.cpp.
References FindWindowById().
void ShowDepotWindow | ( | TileIndex | tile, | |
VehicleType | type | |||
) |
Opens a depot window.
tile | The tile where the depot/hangar is located | |
type | The type of vehicles in the depot |
Definition at line 981 of file depot_gui.cpp.
References BringWindowToFrontById(), VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.