MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getBrakingImageIndex

Function getBrakingImageIndex

src/OpenLoco/src/Vehicles/VehicleDraw.cpp:215–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 return pitchImageIndex + roll + cargoIndex;
214 }
215 uint32_t getBrakingImageIndex(const VehicleObjectBodySprite& sprite, const Pitch pitch, const uint8_t yaw)
216 {
217 const auto pitchImageIndex = getPitchBodyImageIndex(sprite, pitch, yaw);
218 // Braking image is the last frame for a rotation
219 return pitchImageIndex + sprite.numFramesPerRotation - 1;
220 }
221
222 constexpr std::array<uint8_t, 8> kUnk500264 = {
223 0,

Callers 2

getDrawItemsForVehicleFunction · 0.85
paintBodyFunction · 0.85

Calls 1

getPitchBodyImageIndexFunction · 0.85

Tested by

no test coverage detected