| 131 | } |
| 132 | |
| 133 | void Ship::GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const |
| 134 | { |
| 135 | uint8_t spritenum = this->spritenum; |
| 136 | |
| 137 | if (image_type == EIT_ON_MAP) direction = this->rotation; |
| 138 | |
| 139 | if (IsCustomVehicleSpriteNum(spritenum)) { |
| 140 | GetCustomVehicleSprite(this, direction, image_type, result); |
| 141 | if (result->IsValid()) return; |
| 142 | |
| 143 | spritenum = this->GetEngine()->original_image_index; |
| 144 | } |
| 145 | |
| 146 | assert(IsValidImageIndex<VEH_SHIP>(spritenum)); |
| 147 | result->Set(_ship_sprites[spritenum] + direction); |
| 148 | } |
| 149 | |
| 150 | static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance) |
| 151 | { |
no test coverage detected