MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetVehicleImageCellSize

Function GetVehicleImageCellSize

src/depot_gui.cpp:162–169  ·  view source on GitHub ↗

* Get the GUI cell size for a vehicle image. * @param type Vehicle type to get the size for. * @param image_type Image type to get size for. * @pre image_type == EIT_IN_DEPOT || image_type == EIT_PURCHASE * @return Cell dimensions for the vehicle and image type. */

Source from the content-addressed store, hash-verified

160 * @return Cell dimensions for the vehicle and image type.
161 */
162VehicleCellSize GetVehicleImageCellSize(VehicleType type, EngineImageType image_type)
163{
164 switch (image_type) {
165 case EIT_IN_DEPOT: return _base_block_sizes_depot[type];
166 case EIT_PURCHASE: return _base_block_sizes_purchase[type];
167 default: NOT_REACHED();
168 }
169}
170
171static void InitBlocksizeForVehicles(VehicleType type, EngineImageType image_type)
172{

Callers 6

UpdateWidgetSizeMethod · 0.85
OnInitMethod · 0.85
GetEngineListHeightFunction · 0.85
DrawEngineListFunction · 0.85
UpdateWidgetSizeMethod · 0.85

Calls 1

NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected