MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ObjectRepositoryLoadObject

Function ObjectRepositoryLoadObject

src/openrct2/object/ObjectRepository.cpp:631–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629 }
630
631 std::unique_ptr<Object> ObjectRepositoryLoadObject(const RCTObjectEntry* objectEntry, bool loadImages)
632 {
633 std::unique_ptr<Object> object;
634 auto& objRepository = GetContext()->GetObjectRepository();
635 const ObjectRepositoryItem* ori = objRepository.FindObject(objectEntry);
636 if (ori != nullptr)
637 {
638 object = objRepository.LoadObject(ori, loadImages);
639 if (object != nullptr)
640 {
641 object->Load();
642 }
643 }
644 return object;
645 }
646
647 size_t ObjectRepositoryGetItemsCount()
648 {

Callers 1

UpdateRideTypeMethod · 0.85

Calls 4

GetContextFunction · 0.85
FindObjectMethod · 0.80
LoadObjectMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected