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

Function getAvailableObjects

src/OpenLoco/src/Objects/ObjectIndex.cpp:574–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572 }
573
574 std::vector<ObjIndexPair> getAvailableObjects(ObjectType type)
575 {
576 std::vector<ObjIndexPair> list;
577
578 for (ObjectIndexId i = 0; i < static_cast<int16_t>(_installedObjectList.size()); i++)
579 {
580 if (_installedObjectList[i]._header.getType() == type)
581 {
582 list.push_back(ObjIndexPair{ i, _installedObjectList[i] });
583 }
584 }
585
586 return list;
587 }
588
589 uint16_t getNumAvailableObjectsByType(ObjectType type)
590 {

Callers 8

selectNewCompetitorFunction · 0.85
populateTabObjectListFunction · 0.85
populateCompetitorListFunction · 0.85
getActiveObjectFunction · 0.85

Calls 3

push_backMethod · 0.80
sizeMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected