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

Method LoadSamplesForObject

src/openrct2/AssetPack.cpp:94–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 void AssetPack::LoadSamplesForObject(std::string_view id, AudioSampleTable& objectTable)
95 {
96 auto it = std::find_if(_entries.begin(), _entries.end(), [id](const Entry& entry) { return entry.ObjectId == id; });
97 if (it != _entries.end())
98 {
99 objectTable.LoadFrom(_sampleTable, it->TableIndex, it->TableLength);
100 }
101 }
102
103 class AssetPackLoadContext : public IReadObjectContext
104 {

Callers 2

LoadMethod · 0.45
LoadMethod · 0.45

Calls 3

LoadFromMethod · 0.80
endMethod · 0.65
beginMethod · 0.45

Tested by

no test coverage detected