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

Function GetRotorImage

src/aircraft_cmd.cpp:187–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result)
188{
189 assert(v->subtype == AIR_HELICOPTER);
190
191 const Aircraft *w = v->Next()->Next();
192 if (IsCustomVehicleSpriteNum(v->spritenum)) {
193 GetCustomRotorSprite(v, image_type, result);
194 if (result->IsValid()) return;
195 }
196
197 /* Return standard rotor sprites if there are no custom sprites for this helicopter */
198 result->Set(SPR_ROTOR_STOPPED + w->state);
199}
200
201static void GetAircraftIcon(EngineID engine, EngineImageType image_type, VehicleSpriteSeq *result)
202{

Callers 4

HelicopterTickHandlerFunction · 0.85
SetAircraftPositionFunction · 0.85
MarkDirtyMethod · 0.85
AfterLoadVehiclesPhase2Function · 0.85

Calls 5

IsCustomVehicleSpriteNumFunction · 0.85
GetCustomRotorSpriteFunction · 0.85
NextMethod · 0.45
IsValidMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected