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

Method getLength

src/OpenLoco/src/Objects/VehicleObject.cpp:669–683  ·  view source on GitHub ↗

0x004B9780

Source from the content-addressed store, hash-verified

667
668 // 0x004B9780
669 uint32_t VehicleObject::getLength() const
670 {
671 auto length = 0;
672 for (auto i = 0; i < numCarComponents; ++i)
673 {
674 if (carComponents[i].bodySpriteInd == 0xFF)
675 {
676 continue;
677 }
678
679 auto unk = carComponents[i].bodySpriteInd & (VehicleObject::kMaxBodySprites - 1);
680 length += bodySprites[unk].halfLength * 2;
681 }
682 return length;
683 }
684}

Callers 14

uncompressFileFunction · 0.45
addFunction · 0.45
scrollMouseOverFunction · 0.45
drawFunction · 0.45
validateChecksumMethod · 0.45
decodeMethod · 0.45
decodeRunLengthMultiMethod · 0.45
encodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected