MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / Get

Method Get

TombEngine/Game/items.cpp:213–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213ItemInfo* ItemHandler::Get() const
214{
215 if (g_Level.Items.empty() || _index == NO_VALUE)
216 return nullptr;
217
218 if (_index < 0 || _index >= g_Level.Items.size())
219 {
220#if _DEBUG
221 TENLog(fmt::format("Attempt to access invalid item index {}.", _index), LogLevel::Warning);
222#endif
223 return &g_Level.Items[0];
224 }
225
226 return &g_Level.Items[_index];
227}
228
229ItemHandler& ItemHandler::operator=(ItemInfo* ptr)
230{

Callers 15

ClearShadowMapMethod · 0.45
RenderShadowMapMethod · 0.45
DrawGunShellsMethod · 0.45
DrawRatsMethod · 0.45
DrawFishSwarmMethod · 0.45
DrawBatsMethod · 0.45
DrawScarabsMethod · 0.45
DrawLocustsMethod · 0.45
DrawTriangles3DMethod · 0.45
RenderSceneMethod · 0.45

Calls 4

TENLogFunction · 0.85
formatFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected